AIO conver to reverse proxy after deployment

Hello there,

I have a Nextcloud AIO all up and running, works like a charm, really good stuff.
I now want to put it behind a reverse proxy:
I spun up another AIO instance to test
Configured haproxy to the test AIO instance
All works okay

What I’m not understanding is how I now convert my original install to be behind the reverse proxy, it’s probably something I don’t understand about Docker tbh:
If I do:
sudo docker run
–init
–sig-proxy=false
–name nextcloud-aio-mastercontainer
–restart always
–publish 8080:8080
–env APACHE_PORT=11000
–env APACHE_IP_BINDING=0.0.0.0
–volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config
–volume /var/run/docker.sock:/var/run/docker.sock:ro
nextcloud/all-in-one:latest

I get:
docker: Error response from daemon: Conflict. The container name “/nextcloud-aio-mastercontainer” is already in use by container “1a47425b0c7f0224569dcefd83ab7e7ece6fe9029b01e9517ed4fb199ad584d3”. You have to remove (or rename) that container to be able to reuse that name.

I’m assuming I don’t want to actually remove the master container, do I?
Any guidance would be welcome please

Thanks

I think stopping and removing the master container is what I need to do, found this GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All-in-One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

1 Like

hmmm I’m getting 503 service unavailable after i’ve changed it to use the proxy. weird as it worked okay on my test instance, maybe something on haproxy has gone wrong.

The AIO interface says that the Apache container is starting, looking at the logs it says ‘waiting for nextcloud to start’

So what does the nextcloud container say then?

last few entries are:
[08-Dec-2023 15:22:49] NOTICE: fpm is running, pid 395
[08-Dec-2023 15:22:49] NOTICE: ready to handle connections
Activating Collabora config…
Activated any config changes

Okay, and if you chech the apache logs again?

Waiting for Nextcloud to start…
Waiting for Nextcloud to start…
{“level”:“info”,“ts”:1702048975.9630623,“msg”:“using provided configuration”,“config_file”:“/tmp/Caddyfile”,“config_adapter”:“”}
{“level”:“info”,“ts”:1702048975.9889185,“msg”:“failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See UDP Buffer Sizes · quic-go/quic-go Wiki · GitHub for details.”}
[Fri Dec 08 15:22:56.089356 2023] [mpm_event:notice] [pid 95:tid 140415938341704] AH00489: Apache/2.4.58 (Unix) configured – resuming normal operations
[Fri Dec 08 15:22:56.090578 2023] [core:notice] [pid 95:tid 140415938341704] AH00094: Command line: ‘/usr/local/apache2/bin/httpd -D FOREGROUND’
{“level”:“info”,“ts”:1702050131.0323539,“msg”:“using provided configuration”,“config_file”:“/tmp/Caddyfile”,“config_adapter”:“”}
{“level”:“info”,“ts”:1702050131.0492795,“msg”:“failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See UDP Buffer Sizes · quic-go/quic-go Wiki · GitHub for details.”}
[Fri Dec 08 15:42:11.097097 2023] [mpm_event:notice] [pid 33:tid 140288274185032] AH00489: Apache/2.4.58 (Unix) configured – resuming normal operations
[Fri Dec 08 15:42:11.098035 2023] [core:notice] [pid 33:tid 140288274185032] AH00094: Command line: ‘/usr/local/apache2/bin/httpd -D FOREGROUND’

Okay, seems to be ronning now

Still get 503 and the Apache container still says starting

And my proxy can’t connect on 11000, seems there’s nothing listening on that port

Can you reload the page and stop and start the containers another time via the aio interface?

I don’t get the option to stop/start the container on the AIO interface.

Hm, then please run sudo docker stop nextcloud-aio-apache, reload the aio interfaceand try to stop them again via the interface

okay, that gave me the option to stop the containers in the AIO interface and they are now stopped

started them up again and all appears to be working now :slight_smile:

Thanks for your help

Can you tell me what happened/went wrong?

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.