RocketChat/Rocket.Chat · warning

FileUpload_S3_BucketURL "${BucketURL}" has no scheme; defaul

Error message

FileUpload_S3_BucketURL "${BucketURL}" has no scheme; defaulting to "https://${BucketURL}".

What it means

While configuring the S3 upload store, a custom FileUpload_S3_BucketURL was provided without an http(s):// scheme. AWS SDK v2 tolerated scheme-less endpoints but v3 rejects them, so Rocket.Chat prepends 'https://' and warns so the effective endpoint is not a surprise (e.g. for local MinIO where you may want http://).

Source

Thrown at apps/meteor/server/lib/media/file-upload/config/AmazonS3.ts:120

		config.connection.region = 'us-east-1';
		SystemLogger.warn(
			'FileUpload_S3_Region is empty and AWS_REGION is not set; defaulting to us-east-1. Set FileUpload_S3_Region or AWS_REGION to silence this warning.',
		);
	}

	if (AWSAccessKeyId && AWSSecretAccessKey) {
		config.connection.credentials = {
			accessKeyId: AWSAccessKeyId,
			secretAccessKey: AWSSecretAccessKey,
		};
	}

	// Back-compat: AWS SDK v2 accepted scheme-less endpoints; v3 throws.
	if (BucketURL) {
		const isValidScheme = hasScheme(BucketURL);
		config.connection.endpoint = isValidScheme ? BucketURL : `https://${BucketURL}`;
		if (!isValidScheme) {
			SystemLogger.warn(`FileUpload_S3_BucketURL "${BucketURL}" has no scheme; defaulting to "https://${BucketURL}".`);
		}
	}

	AmazonS3Uploads.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3Uploads.name, config);
	AmazonS3Avatars.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3Avatars.name, config);
	AmazonS3UserDataFiles.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3UserDataFiles.name, config);
}, 500);

settings.watchByRegex(/^FileUpload_S3_/, configure);

View on GitHub (pinned to b2c16d5842)

Solutions

  1. Edit FileUpload_S3_BucketURL to include the scheme explicitly: 'https://minio.internal:9000'
  2. Use 'http://' only for local/testing endpoints; keep 'https://' for anything remote
  3. Re-save the S3 settings so the watcher reconfigures the stores with the corrected endpoint
  4. Upload a test file afterwards to confirm the endpoint and path-style settings work together

Example fix

// before
FileUpload_S3_BucketURL: 'minio.internal:9000'

// after
FileUpload_S3_BucketURL: 'https://minio.internal:9000'
Defensive patterns

Strategy: validation

Validate before calling

const hasScheme = (url: string): boolean => /^https?:\/\//i.test(url);

const bucketURL = settings.get<string>('FileUpload_S3_BucketURL');
if (bucketURL && !hasScheme(bucketURL)) {
  // reject the save or prompt the admin instead of silently guessing https://
  throw new Error(`FileUpload_S3_BucketURL "${bucketURL}" must include http:// or https://`);
}

Prevention

When it happens

Trigger: Entering a BucketURL like 'minio.internal:9000' or 's3.example.com' (no scheme) in the S3 storage settings — typical with MinIO/Ceph endpoints copied from configs originally written against SDK v2.

Common situations: Migrating file storage configs from older installs; internal MinIO endpoints where the admin omitted the scheme; endpoints behind TLS-terminating proxies where the intended scheme is ambiguous.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/99a5d829eb99530a. Report an issue: GitHub.