Files and storage, checked 2026-09-07

Nextcloud: Docker configuration reference

Self-hosted file sync, share and collaboration platform with calendar, contacts and mail apps.

At a glance

Ports

Ports
PortWhat listensSource
80HTTP listener on the apache variant, which is the default for the latest and unqualified version tags.source for port 80
9000FastCGI port exposed by the fpm variant. Needs a separate webserver in front to serve static assets and proxy PHP requests here; do not map it to the host.source for port 9000

Environment variables

Environment variables
VariableRequiredWhat it doesExampleSource
TRUSTED_PROXIESNoSpace-separated list of reverse proxy addresses to trust for X-Forwarded-* headers. CIDR is supported for IPv4. Used together with APACHE_DISABLE_REWRITE_IP.172.18.0.0/16source for TRUSTED_PROXIES
APACHE_DISABLE_REWRITE_IPNoDisables the apache image's default rewrite of the remote address from X-Real-IP for proxies in the private IP ranges. Needed to pick up X-Forwarded-Host/Proto/For instead.1source for APACHE_DISABLE_REWRITE_IP
OVERWRITEPROTOCOLNoForces config.php's overwriteprotocol when automatic scheme detection behind the proxy is wrong, which otherwise generates http links behind a TLS-terminating proxy.httpssource for OVERWRITEPROTOCOL
NEXTCLOUD_TRUSTED_DOMAINSNoSpace-separated list of hostnames added to trusted_domains after install. Requests to an untrusted domain are rejected.cloud.example.comsource for NEXTCLOUD_TRUSTED_DOMAINS
POSTGRES_HOSTNoTogether with POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD, auto-configures the database on first run and skips the setup wizard's database step. All four must be set or none are used.dbsource for POSTGRES_HOST

Volumes that must persist

Volumes
PathWhat is in itSource
/var/www/htmlMain install directory. Files here are overwritten on upgrade except paths listed in upgrade.exclude, so config, data, custom_apps and themes should be mounted as their own volumes.source for /var/www/html
/var/www/html/dataUser file data. Overridable with NEXTCLOUD_DATA_DIR.source for /var/www/html/data
/var/lib/postgresql/data (db)Database volume when using the PostgreSQL auto-configuration path.source for /var/lib/postgresql/data

Behind a reverse proxy

What it needs alongside it

Dependencies
DependencyWhySource
MySQL/MariaDB or PostgreSQL (SQLite for testing only)Auto-configured via matching sets of MYSQL_* or POSTGRES_* environment variables; only one database type should be configured at a time.source for MySQL/MariaDB or PostgreSQL (SQLite for testing only)

Release timeline

Releases
VersionDateBreakingWhat changedSource
v34.0.32026-08-13NoPoint release on the 34.0 line, published together with matching point releases for the 33.0 and 32.0 supported lines.source for release v34.0.3
v34.0.22026-07-23NoPoint release on the 34.0 line.source for release v34.0.2
v34.0.12026-06-25NoPoint release on the 34.0 line.source for release v34.0.1

If it is not coming up

Read from the upstream documentation, repository and container registry by Keita Emsden on 2026-09-07. Every row links the page it came from. Upstream changes without telling anyone, so check the source link before you rely on a value.

Other app references

All app references