Skip to main content

Environment Variables

caution

To change environment variables, you must recreate the Wizarr containers. Just restarting the containers does not replace the environment within the container!

In order to recreate the container using docker compose, run docker compose up -d. In most cases docker will recognize that the .env file has changed and recreate the affected containers. If this should not work, try running docker compose up -d --force-recreate.

Docker Compose

VariableDescriptionDefaultContainers
WIZARR_VERSIONImage tagsreleaseserver
STORAGE_DIRHost Path for uploadsserver
DB_DIRHost Path for Postgres databasedatabase
tip

These environment variables are used by the docker-compose.yml file and do NOT affect the containers directly.

General

VariableDescriptionDefaultContainersWorkers
TZTimezone*1servermicroservices
WIZARR_ENVEnvironment (production, development)productionserverapi
WIZARR_LOG_LEVELLog Level (verbose, debug, log, warn, error)logserverapi
WIZARR_CONFIG_FILEPath to config fileserverapi
WIZARR_API_METRICS_PORTPort for the OTEL metrics8081serverapi
WIZARR_MICROSERVICES_METRICS_PORTPort for the OTEL metrics8082servermicroservices
WIZARR_PROCESS_INVALID_IMAGESWhen true, generate thumbnails for invalid imagesservermicroservices
WIZARR_TRUSTED_PROXIESList of comma separated IPs set as trusted proxiesserverapi
WIZARR_IGNORE_MOUNT_CHECK_ERRORSSee System Integrityserverapi

*1: TZ should be set to a TZ identifier from this list. For example, TZ="Etc/UTC". TZ is used by exiftool as a fallback in case the timezone cannot be determined from the image metadata. It is also used for logfile timestamps and cron job execution.

Ports

VariableDescriptionDefault
WIZARR_HOSTListening host0.0.0.0
WIZARR_PORTListening port5690 (server)

Database

VariableDescriptionDefaultContainers
DB_URLDatabase URLserver
DB_HOSTNAMEDatabase Hostdatabaseserver
DB_PORTDatabase Port5432server
DB_USERNAMEDatabase Userpostgresserver, database*1
DB_PASSWORDDatabase Passwordpostgresserver, database*1
DB_NAMEDatabase Namewizarrserver, database*1
DB_VECTOR_EXTENSION*2Database Vector Extension (one of [pgvector, pgvecto.rs])pgvecto.rsserver
DB_SKIP_MIGRATIONSWhether to skip running migrations on startup (one of [true, false])falseserver

*1: The values of DB_USERNAME, DB_PASSWORD, and DB_NAME are passed to the Postgres container as the variables POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB in docker-compose.yml.

*2: This setting cannot be changed after the server has successfully started up.

info

All DB_ variables must be provided to all Wizarr workers, including api and microservices.

DB_URL must be in the format postgresql://wizarrdbusername:wizarrdbpassword@postgreshost:postgresport/wizarrdatabasename. You can require SSL by adding ?sslmode=require to the end of the DB_URL string, or require SSL and skip certificate verification by adding ?sslmode=require&sslmode=no-verify.

When DB_URL is defined, the DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD and DB_NAME database variables are ignored.

Redis

VariableDescriptionDefaultContainers
REDIS_URLRedis URLserver
REDIS_SOCKETRedis Socketserver
REDIS_HOSTNAMERedis Hostredisserver
REDIS_PORTRedis Port6379server
REDIS_USERNAMERedis Usernameserver
REDIS_PASSWORDRedis Passwordserver
REDIS_DBINDEXRedis DB Index0server
info

All REDIS_ variables must be provided to all Wizarr workers, including api and microservices.

REDIS_URL must start with ioredis:// and then include a base64 encoded JSON string for the configuration. More info can be found in the upstream ioredis documentation.

When REDIS_URL or REDIS_SOCKET are defined, the REDIS_HOSTNAME, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD, and REDIS_DBINDEX variables are ignored.

Redis (Sentinel) URL example JSON before encoding:

JSON
{
"sentinels": [
{
"host": "redis-sentinel-node-0",
"port": 26379
},
{
"host": "redis-sentinel-node-1",
"port": 26379
},
{
"host": "redis-sentinel-node-2",
"port": 26379
}
],
"name": "redis-sentinel"
}

Prometheus

VariableDescriptionDefaultContainersWorkers
WIZARR_TELEMETRY_INCLUDECollect these telemetries. List of host, api, io, repo, job. Note: You can also specify all to enable allserverapi
WIZARR_TELEMETRY_EXCLUDEDo not collect these telemetries. List of host, api, io, repo, jobserverapi

Docker Secrets

The following variables support the use of Docker secrets for additional security.

To use any of these, replace the regular environment variable with the equivalent _FILE environment variable. The value of the _FILE variable should be set to the path of a file containing the variable value.

Regular VariableEquivalent Docker Secrets '_FILE' Variable
DB_HOSTNAMEDB_HOSTNAME_FILE*1
DB_NAMEDB_NAME_FILE*1
DB_USERNAMEDB_USERNAME_FILE*1
DB_PASSWORDDB_PASSWORD_FILE*1
DB_URLDB_URL_FILE*1
REDIS_PASSWORDREDIS_PASSWORD_FILE*2

*1: See the official documentation for details on how to use Docker Secrets in the Postgres image.

*2: See this comment for an example of how to use use a Docker secret for the password in the Redis container.