universe docs source
browse docs
docs /extensions /storage-s3

S3 storage

The S3 extension registers a TemplateStorageProvider under the storage key "s3", giving every node in the cluster a single source of truth for templates. Wrappers pull what they need from the bucket instead of relying on host paths or manual sync.

Without remote storage, each Wrapper either keeps its own copy of every template tree or receives them over the cluster sync path. The S3 extension replaces both with a centralized backend: a single bucket holds every template as a ZIP, and any node fetches a template on demand by its group and name. It is the recommended layout for multi-node clusters and for cloud-mode Kubernetes deployments where local host paths are not available.

Configuration

Place extension-storage-s3.jar in ./extensions/, then create ./extensions/s3/config.json:

{
	"bucket": "universe-templates",
	"region": "us-east-1",
	"endpoint": null,
	"accessKey": null,
	"secretKey": null,
	"prefix": "templates/"
}
FieldDefaultPurpose
bucket"universe-templates"S3 bucket name.
region"us-east-1"AWS region. Set a value for MinIO as well.
endpointnullCustom URL for an S3-compatible service (MinIO, Ceph).
accessKeynullAccess credential.
secretKeynullSecret credential.
prefix"templates/"Key path prefix applied to every object.
tip

For MinIO or another S3-compatible service, set endpoint to the service URL and keep region populated. The same provider code handles both.

{
	"bucket": "universe-templates",
	"region": "us-east-1",
	"endpoint": "https://minio.internal:9000",
	"accessKey": "minioadmin",
	"secretKey": "minioadmin",
	"prefix": "templates/"
}

Bucket layout

Each template tree is stored as a single ZIP keyed by group and name, following the pattern {prefix}{group}/{name}.zip. A template at group server, name base with the default prefix lands at templates/server/base.zip:

s3://universe-templates/
  templates/
    server/
      base.zip          ← {prefix}{group}/{name}.zip
      lobby.zip
    proxy/
      velocity.zip

Upload and download

The extension adds two console commands for moving templates between local disk and the bucket:

# Zip the local template and upload it to S3
s3 upload server/base

# Download from S3 and extract into ./templates/
s3 download server/base

Selecting S3 per template

Set "storage": "s3" on a template entry in templateInstallationConfig to fetch that template from the bucket instead of the local cache. Local and remote templates can share the same key, so a configuration can mix both:

{
	"templateInstallationConfig": {
		"allOf": [
			{ "name": "base", "group": "server", "storage": "s3", "priority": 0 }
		]
	}
}
i
info

When both the S3 and Kubernetes extensions are enabled in cloud mode, Universe generates init containers that pull templates on the node where the Pod is scheduled before the main container starts. No extra configuration is needed for that handoff.

Reloading credentials

Rotating keys or changing the bucket does not require a cluster restart. A reload closes the existing clients, re-reads the config, and registers a fresh provider:

extension reload storage-s3