
Deploying with systemd
This guide walks through installing S3 Orchestrator as a systemd service on a bare-metal or virtual machine using the Debian package. The package ships a systemd unit, sample configuration, and maintainer scripts that create a dedicated system user with filesystem hardening out of the box.
Overview
The Debian package installs:
/usr/bin/s3-orchestrator— the statically linked binary/etc/s3-orchestrator/config.yaml— sample configuration (preserved on upgrade)/etc/default/s3-orchestrator— environment variable overrides for secrets/usr/lib/systemd/system/s3-orchestrator.service— systemd unit with security hardening/var/lib/s3-orchestrator/— working directory for the service user
The package maintainer scripts create a dedicated s3-orchestrator system user and group, enable the service, but do not start it — giving you a chance to configure everything first.
Prerequisites
- Debian or Ubuntu-based Linux distribution
- PostgreSQL accessible from the host
- One or more S3-compatible storage backends with credentials
- Root or sudo access for package installation
Step 1: Install the Package
Download the .deb from the GitHub Releases page:
Tip
You can also build the package from source with make deb. This requires Go and GoReleaser installed locally.
After installation, the service is enabled but not yet running:
Step 2: Set Credentials
Secrets are stored in /etc/default/s3-orchestrator and injected into the config via ${VAR} expansion. Edit the file and uncomment the variables you need:
The file is installed with 0640 permissions (root-owned, readable by the s3-orchestrator group) so credentials are not world-readable.
Tip
Generate strong credentials with openssl rand -hex 20 for access keys and openssl rand -base64 30 for secret keys.
Step 3: Configure the Service
Edit the main configuration file:
The sample config ships with all options documented and commented. Here is a production-ready example:
Add more backends by defining BACKEND2_* variables in /etc/default/s3-orchestrator and adding corresponding entries to the backends list.
Step 4: Prepare the Database
Create the PostgreSQL database and user:
Database migrations are embedded in the binary and applied automatically on startup — no manual migration step is needed.
Step 5: Start the Service
Check the logs:
You should see the startup sequence: database migrations, backend connectivity checks, and the listening address.
Step 6: Verify
Systemd Security Hardening
The shipped systemd unit includes several security features:
The service runs with the minimum permissions needed. The config directory /etc/s3-orchestrator is owned by root:s3-orchestrator with mode 0750, so the service can read but not modify its own configuration.
Configuration Reload
The orchestrator supports hot configuration reload via SIGHUP. When you change config.yaml, reload without restarting:
This re-reads the configuration file and applies changes to rate limits, routing strategy, backend settings, and UI options without dropping active connections. TLS certificates are also hot-reloaded if configured.
Adding TLS
For direct TLS termination (without a reverse proxy), add TLS configuration to config.yaml:
Set up the certificate files:
Certificates are reloaded on SIGHUP, so you can renew them (e.g., with certbot) and reload without downtime:
Adding Encryption
For server-side encryption with a local master key:
Add to config.yaml:
Note
The master_key_file is validated at startup — the service will refuse to start if the file does not exist or is not exactly 32 bytes. Ensure the key file is in place before starting the service.
For Vault Transit encryption, see the Deploying on Nomad with Vault guide — the encryption config is the same regardless of deployment method.
Upgrades
To upgrade, download the new .deb and install it over the existing package:
The package uses config|noreplace for /etc/s3-orchestrator/config.yaml and /etc/default/s3-orchestrator, so your configuration is preserved across upgrades. Database migrations are applied automatically on startup.
Important Notes
- The service does not start automatically after installation — configure it first, then run
systemctl start - Environment variables in
/etc/default/s3-orchestratorare expanded inconfig.yamlat startup, not on reload — restart the service after changing environment variables - The
s3-orchestratoruser has no login shell (/usr/sbin/nologin) and no home directory creation — it exists solely for service isolation - Logs go to the systemd journal by default — use
journalctl -u s3-orchestratorto view them - Pin to a specific version when deploying to production rather than always using the latest release