I run a Linux box at home with Docker, NPM (Nginx Proxy Manager), and many other containers. I want to add Nextcloud and have almost had success with the beautiful AIO package. Ideally, I’d want Nextcloud to just run locally, and then I can let my reverse-proxy publish it. However, AIO tries to do “something” that upsets it, and it won’t work.
Szaimen’s easy-test is successful though obviously not useful except as proof of concept.
Here are my reproducible steps so far. I would appreciate to learn what my next action could be!
- NPM is already set up with static IP, domain, and auto-renewed wildcard certificate.
- NPM is set to route my Nextcloud sub-domain-tld to my Ubuntu homelab server at 192.168.1.10 port 9028.
- Szaimen’s easy-test works (see exact command below); I can log in as admin and use it. That is obviously not useful but it proves that my setup is good so far. I have stopped & removed that again.
- AIO starts from a customized
docker-compose
file, see below. - AIO runs; I can use my domain URL and submit the sub-domain-tld to create a new AIO instance. That seems to work but the next page won’t load.
- I replace the browser URL with
192.168.1.10:9028
and again submit the sub-domain-tld to create a new AIO instance. This works. - Now I see the
/containers
page. I uncheck all optional containers and set the timezone. Then Idownload and start containers
(with Nextcloud 28). - The containers are starting, and eventually it’s ready to go. So far so good!
- Portainer tells me all is green and
healthy
except fornextcloud-aio-domaincheck
which isexited
. I notice thatnextcloud-aio-apache
is also mapped to the same port9028
that themastercontainer
already uses. - The problems start when I click the button
Open your Nextcloud↗
: It goes to my sub-domain-tld URL but I get a 502 error. - I use Portainer to manually stop
nextcloud-aio-apache
and refresh the browser. Now I see theNextcloud AIO Login
and enter my passphrase. - I am back at the
/containers
page (this time on sub-domain-tld!) and see the buttonOpen your Nextcloud↗
again. I’m stuck in a loop here. - The
/containers
page suggests the Github discussion 2105 which does not apply - there are no Apache container logs because I stopped that container back in step 11.
docker run -it \
-e SERVER_BRANCH=master \
-e TRUSTED_DOMAIN=sub-domain-tld \
--name nextcloud-easy-test \
-p 9028:443 \
--volume="nextcloud_easy_test_npm_cache_volume:/var/www/.npm" \
ghcr.io/szaimen/nextcloud-easy-test:latest
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: unless-stopped
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
## - 80:80 # Can be removed when running behind a web server or reverse proxy
- 9028:8080
## - 8443:8443 # Can be removed when running behind a web server or reverse proxy
environment:
# APACHE_PORT: 11000 # Is needed when running behind a web server or reverse proxy
APACHE_PORT: 9028
APACHE_IP_BINDING: 192.168.1.10 # Should be set when running behind a web server or reverse proxy
NEXTCLOUD_DATADIR: /home/foo/docker/nextcloud-20240614/data
SKIP_DOMAIN_VALIDATION: 1
TRUSTED_DOMAIN: sub-domain-tld