Homarr
Advanced

Environment variables

Homarr offers a few environment variables, which can be used to configure the container.

With docker you can add the _FILE suffix to any environment variable, which will read the value from a file. This is especially useful for docker secrets.

General

Using the PUID and PGID will require you to set the correct permissions on the mounted volumes and if used the docker socket. See more in the Running as a different user documentation.

Environment VariableDescriptionPossible valuesDefault
PUIDUser ID to run the container asAny valid user ID0
PGIDGroup ID to run the container asAny valid group ID0
LOG_LEVELLog level to usedebug / info / warn / errorinfo
BASE_URLPublic Homarr origin used by MCP OAuth metadata and redirects. Set this when a reverse proxy does not preserve the public host and protocol.HTTP(S) origin without a path-
NO_EXTERNAL_CONNECTIONDisables Homarr's internet-backed requests, including update checks, weather, location search, and RSS feedstrue or falsefalse
ENABLE_DNS_CACHINGEnables dns caching. Enabled by default, but if you experience issues with IPv6 or static IPs, see #4006 or disable this flagtrue or falsetrue
HOMARR_DISABLE_IPV6Disables the IPv6 listener of the internal nginx proxy, even when the host supports IPv6. IPv6 is normally disabled automatically when the host has no IPv6 configured. See #4596true or falsefalse
HOMARR_WEBSITE_URLMain Homarr documentation/site base used by runtime links. Must be an absolute HTTP(S) URL.HTTP(S) URLhttps://homarr.dev
WORKSHOP_API_URLPocketBase API used by Homarr and standalone documentation.HTTP(S) URLHOMARR_WEBSITE_URL
WORKSHOP_WEB_URLPublic Workshop website used by links in Homarr, Custom Widgets, onboarding, and assistant context.HTTP(S) URLHOMARR_WEBSITE_URL/workshop

Workshop service operators can find its server-only configuration in the Workshop operator guide.

Workshop service

These variables configure the separate Workshop service, not the Homarr application container.

Environment VariableDescriptionDefault
WORKSHOP_PUBLIC_ORIGINPublic origin used in PocketBase links and emailRequired in production
PB_ALLOWED_ORIGINSBrowser origins allowed to call PocketBase* for the public community
WORKSHOP_IMAGEWorkshop image used by the staging Compose fileghcr.io/homarr-labs/workshop:v2
WORKSHOP_EXPOSE_PORTHost port for the combined staging service8090
PB_EXPOSE_PORTHost port for local PocketBase development8090
DOCS_EXPOSE_PORTHost port for local documentation development3003
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRETOptional GitHub OAuth application credentials-
OPENROUTER_API_KEYServer-only upstream key that enables the Homarr Assistant providerProvider disabled
HOMARR_AI_DAILY_REQUEST_LIMITDaily Assistant request units per user50
HOMARR_AI_GLOBAL_DAILY_REQUEST_LIMITDaily Assistant request units shared by all users10000
HOMARR_AI_OPENROUTER_BASE_URLOpenRouter-compatible provider endpointhttps://openrouter.ai/api/v1
HOMARR_AI_OPENROUTER_MODELUpstream model exposed through the stable homarr/model aliasSelected by the Homarr team
HOMARR_AI_ALLOW_INSECURE_UPSTREAMAllows an HTTP upstream for local provider tests; never use in productionfalse

Authentication

See Single Sign-On for more informations.

Security

The SECRET_ENCRYPTION_KEY is required. If none is specified before starting the container, a random key will be shown in the error message and the container will exit.

Environment VariableDescriptionPossible valuesDefault
SECRET_ENCRYPTION_KEYSecret used to encrypt secrets in database.64 character hex string-

A random secret can be generated by using the following command: openssl rand -hex 32

Docker

Environment VariableDescriptionPossible valuesDefault
DOCKER_SOCKET_PATHSComma-separated mounted Docker-compatible socket paths. Homarr discovers each path as a selectable Docker environmentFor example /var/run/docker.sock,/var/run/podman.sock-
DOCKER_HOSTNAMESComma-separated plaintext TCP hostnames. Pair each hostname with the port in the same position in DOCKER_PORTSFor example localhost,docker.example.com-
DOCKER_PORTSComma-separated plaintext TCP ports paired with DOCKER_HOSTNAMESFor example 2375,2376-
DOCKER_ENDPOINTSOptional advanced JSON configuration for custom names, TLS, or restricted capabilities. It takes precedence over the simple variables above. See the Docker and Podman connection guideA JSON array of endpoint descriptors-

Database

SQLite is the default; PostgreSQL is also supported. Existing MySQL installations must convert to SQLite before upgrading to v2.

Environment VariableDescriptionPossible valuesDefault
DB_DRIVERDatabase driver to use. Use better-sqlite3 for SQLite or node-postgres for PostgreSQLbetter-sqlite3 / node-postgresbetter-sqlite3
DB_DIALECTDatabase dialect to use.sqlite / postgresqlsqlite
DB_URLDatabase URL to connect to.Any valid database URL/appdata/db/db.sqlite
DB_HOSTDatabase host to connect to.Any valid database host-
DB_PORTDatabase port to connect to.Any valid database port-
DB_NAMEDatabase name to connect to.Any valid database name-
DB_USERDatabase user to connect with.Any valid database user-
DB_PASSWORDDatabase password to connect with.Any valid database password-

You can either use the url or host, port, name and credentials combined. The URL will be prioritized over the other values.

Redis

By default Redis is running within the installation. (for example in Docker). However for example for K8s it can be useful to use an external Redis instance.

External redis is currently not supported with Proxmox Community Scripts

Environment VariableDescriptionPossible valuesDefault
REDIS_IS_EXTERNALWhether Redis is running externally.true / falsefalse
REDIS_HOSTHostname of the Redis instance.Any valid hostname-
REDIS_PORTPort of the Redis instance.Any valid port6379
REDIS_USERNAMEUsername to connect to the Redis instance.Any valid username-
REDIS_PASSWORDPassword to connect to the Redis instance.Any valid password-
REDIS_DATABASE_INDEXSelect which database of your redis instance should be used.Any numeric index-
REDIS_TLS_CACA certificate for Redis TLS connections. If a certificate is specified the connection will use TLS.Any valid CA certificate-

Proxy

Environment VariableDescriptionPossible valuesDefault
HTTP_PROXYHTTP proxy to useAny valid HTTP proxy URL-
HTTPS_PROXYHTTPS proxy to useAny valid HTTPS proxy URL-
NO_PROXYComma separated list of hosts that should be excluded from proxyingAny valid hostnames-

Advanced deployments

The advanced deployments environment variables should only be used if you know what you are doing.

Environment VariableDescription
DB_MIGRATIONS_DISABLEDDisable db migrations. For example for helm charts.

All public URL variables reject non-HTTP protocols, embedded credentials, query strings, and fragments, and normalize trailing slashes when Homarr or the documentation site starts.

On this page