Support intro
Sorry to hear you’re facing problems. 
The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.
If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.
Getting help
In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
Before clicking submit: Please check if your query is already addressed via the following resources:
- Official documentation (searchable and regularly updated)
- How to topics and FAQs
- Forum search
(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. ![]()
The Basics
- Nextcloud Server version (e.g., 29.x.x):
Nextcloud AIOv13.5.0
- Operating system and version (e.g., Ubuntu 24.04):
- Debian GNU/Linux 12 (bookworm)
- Web server and version (e.g, Apache 2.4.25):
N/A
- Reverse proxy and version _(e.g. nginx 1.27.2)
- traefik:v3.6
- PHP version (e.g, 8.3):
not sure
- Is this the first time you’ve seen this error? (Yes / No):
No
- When did this problem seem to first start?
Whenever I stop apache and start traefik
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
AIO
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
I have been running Nextcloud on my self-hosted server using Apache for years, and I recently switched to AIO, following instructions for docker compose. Early this week, I found instructions on how to replace Apache proxying by Traefik, but none of the instructions I found worked out of the box. Following traefik-best-practice/docker-traefik-dashboard-letsencrypt/docker-compose.yml at main · bluepuma77/traefik-best-practice · GitHub, I and managed to create a docker-compose.yml that imports ssl certificates from letsencrypt and runs the test whomi image on my public domain. Now, removing the whoami image and following instructions at all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub , I tried to run my original Nextcloud AIO along with a modified Traefik configuration, but every time I want to access my public domain, I only get a “404 page not found”, whereas I can access the configuration site through localhost:8080.
Can anyone spot the problem in my config? I have tried all three options mentioned wrt the ip and network setting for a proxy server running on the same server in a Docker container, the below is the third one, none of them worked. The same compose.yml works if I switch to Apache proxy, so I assume that I missed something in my traefik setup. Thanks for any hints I can get!
Traefik docker-compose.yml:
services:
traefik:
image: traefik:v3.6
ports:
- 80:80
- 443:443
networks:
#- proxy
- nextcloud-aio
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "./letsencrypt:/letsencrypt"
- "./conf:/conf"
- ./log:/log
command:
- --api.dashboard=true
- --log.level=DEBUG
- --log.filepath=/log/traefik.log
- --accesslog=true
- --accesslog.filepath=/log/traefik-access.log
#- --providers.docker.network=proxy
- --providers.docker.network=nextcloud-aio
- --providers.docker.exposedByDefault=false
- --providers.file.directory=conf
- --providers.file.watch=true
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entryPoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- --entrypoints.websecure.asDefault=true
# https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# replaced https by websecure and http by web
#- --entrypoints.https.address=443
- --entrypoints.websecure.transport.respondingTimeouts.readTimeout=3610s
- --entrypoints.websecure.http.encodedCharacters.allowEncodedSlash=true
- --entrypoints.websecure.http.encodedCharacters.allowEncodedQuestionMark=true
- --entrypoints.websecure.http.encodedCharacters.allowEncodedPercent=true
- --entrypoints.websecure.http.tls.certresolver=le
# Let's Encrypt configuration
- "--certificatesresolvers.le.acme.email=mymail@somewhere.com" # replace with your actual email
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le.acme.tlschallenge=true"
labels:
- traefik.enable=true
- traefik.http.routers.mydashboard.rule=Host(`traefik.mydomain.eu`)
- traefik.http.routers.mydashboard.service=api@internal
- traefik.http.routers.mydashboard.middlewares=myauth
- traefik.http.middlewares.myauth.basicauth.users=name:$$hash
networks:
nextcloud-aio:
name: nextcloud-aio
external: true
volumes:
letsencrypt:
name: letsencrypt
conf:
name: conf
Here is my .conf/nextcloud.yml:
# https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
web:
routers:
nextcloud:
rule: "Host(`www.mydomain.eu`)"
entrypoints:
- "https"
service: nextcloud
middlewares:
- nextcloud-chain
tls:
certresolver: "le"
services:
nextcloud:
loadBalancer:
servers:
- url: "http://nextcloud-aio-apache.nextcloud-aio:11000" # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
middlewares:
nextcloud-secure-headers:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"
customRequestHeaders:
X-Forwarded-Proto: "https"
https-redirect:
redirectscheme:
scheme: https
nextcloud-chain:
chain:
middlewares:
# - ... (e.g. rate limiting middleware)
- https-redirect
- nextcloud-secure-headers
And finally, in a separate folder, my Nextcloud compose.yml, put together from all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub and all-in-one/compose.yaml at main · nextcloud/all-in-one · GitHub
name: nextcloud-aio # Add the container to the same compose project to which all the sibling containers are added automatically
services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:latest # This is the container image used. You can switch to ghcr.io/nextcloud-releases/all-in-one:beta if you want to help testing new releases. See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel
init: true # This setting makes sure that signals from main process inside the container are correctly forwarded to children. See https://docs.docker.com/reference/compose-file/services/#init
restart: always # This makes sure that the container starts always together with the host OS. See https://docs.docker.com/reference/compose-file/services/#restart
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
network_mode: bridge # This adds the container to the same network as docker run would do. Comment this line and uncomment the line below and the networks section at the end of the file if you want to define a custom MTU size for the docker network
# networks: ["nextcloud-aio"]
ports:
# - "80:80" # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
- "8080:8080" # This is the AIO interface, served via https and self-signed certificate. See https://github.com/nextcloud/all-in-one#explanation-of-used-ports
# - "8443:8443" # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# security_opt: ["label:disable"] # Needed when using SELinux. See https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled
environment: # This line is needed (has to be uncommented) when using any of the options below
# AIO_DISABLE_BACKUP_SECTION: false # Setting this to true allows to hide the backup section in the AIO interface. See https://github.com/nextcloud/all-in-one#how-to-disable-the-backup-section
APACHE_PORT: 11000 # Needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
APACHE_IP_BINDING: 0.0.0.0 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# APACHE_ADDITIONAL_NETWORK: proxy # (Optional) Connect the apache container to an additional docker network. Needed when behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) running in a different docker network on same server. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
NEXTCLOUD_DATADIR: /home/user/nextcloud_aio_data # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work
# # Adjust the MTU size of the docker network. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-mtu-size-of-the-docker-network
# networks:
# nextcloud-aio:
# name: nextcloud-aio
# driver_opts:
# com.docker.network.driver.mtu: 1440
proxy:
name: proxy
external: true