Skip to main content

Configure the database, encryption key and environment variables

This page covers the configuration choices that matter in production, whichever way you run S3 Web UI (Docker or Helm). Environment variables configure how the application is deployed; the Settings panel configures shared S3 keys and runtime options afterwards.

Persistence and database​

The default H2 file database lives in APP_DATA_DIR (/app/data in the container). That directory also holds a generated encryption.key unless APP_ENCRYPTION_KEY is supplied. Persist it, or set a stable externally managed encryption key and use PostgreSQL.

Deployment shapeRequirements
Single replica, H2Persist /app/data; keep replicaCount: 1
Multiple replicasPostgreSQL, shared/sticky HTTP sessions, and a shared APP_ENCRYPTION_KEY
Ephemeral app diskPostgreSQL plus a supplied APP_ENCRYPTION_KEY

H2 tolerates a single writer. PostgreSQL alone does not make browser sessions shared, so an OIDC callback must still return to the same instance unless sessions are shared or the load balancer is sticky.

To supply the encryption key, generate a base64-encoded 32-byte value once and retain it securely:

openssl rand -base64 32

Example with PostgreSQL on Docker:

docker run -d -p 8080:8080 \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/s3webui \
-e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver \
-e SPRING_DATASOURCE_USERNAME=s3webui \
-e SPRING_DATASOURCE_PASSWORD='replace-me' \
-e SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect \
-e APP_ENCRYPTION_KEY='base64-32-byte-key' \
ghcr.io/wenisch-tech/s3webui:latest

Core environment variables​

VariablePurposeDefault
APP_DATA_DIRH2 database and generated encryption key directory./data
ADMIN_EMAIL, ADMIN_PASSWORDFirst administrator only; not a later password resetadmin@s3webui.local, admin
APP_ENCRYPTION_KEYBase64 32-byte key for stored S3 secretsgenerated in APP_DATA_DIR
S3_ACCESS_KEY, S3_SECRET_KEY, S3_ENDPOINT_URLOptional built-in S3 key; set all threeunset
S3_REGIONRegion for the built-in keyus-east-1
S3_INSECURE_SKIP_TLS_VERIFYDisables S3 certificate verificationfalse
IAM_ENABLEDShows storage-backend IAM managementtrue
DISABLE_AUTHENTICATIONMakes all visitors administratorsfalse
AUTOSTOREKEYSSaves S3 keys that a user types in as stored keys, so they appear in the key picker next time. Needs Users may use their own credentials to be on. The desktop edition turns it onfalse

Migration settings​

Server-side migrations can be tuned with these optional variables.

VariablePurposeDefault
MIGRATION_MAX_CONCURRENT_JOBSMigrations that run at the same time; further ones wait2
MIGRATION_THREADS_PER_JOBObjects copied in parallel within one migration4
MIGRATION_MULTIPART_THRESHOLD_MBObjects larger than this are copied as multipart uploads64
MIGRATION_PART_SIZE_MBSize of one multipart part (at least 5)16
MIGRATION_RETENTION_DAYSFinished migrations are removed from the list after this many days30

See Choose a sign-in method for the sign-in modes, and Set up OIDC single sign-on for the OIDC variables.

Health endpoints​

The application listens on port 8080 and exposes health endpoints at /actuator/health/liveness and /actuator/health/readiness. Use them for container or Kubernetes health checks, and keep them on internal routing; health details are not exposed.