Nextcloud AIO and NGINX reverse proxy installation – Bad Gateway
Hi everybody,
I have installed Nextcloud AIO on Ubuntu 24.04 LTS Base using docker container with a compose file. As a reverse proxy I installed Nginx 1.24.0 with " apt install nginx " on Ubuntu and not as a container.
I thought about it, but I didn’t find any other configuration for Apache container or how you can start apache after running AIO container in official documents.
As I wrote here, I’m new in this field and I don’t know how can I start it separately, if it should be done.
It would be great if you have comment for it.
Thank you for your reply! And thank you for your posts (they could help me as beginner).
I’ve read all your posts in github and as you recomannded I installed at first Caddy as reverse proxy server, but I faced an issue and checked your post here:Caddy Docker Compose Example · nextcloud/all-in-one · Discussion #575 · GitHub
Unfortunately I was not able to open nextcloud.
Hence I decieded to check it with Nginx and again faced “Bad Gateway”.
I checked it with IP and port, but it will be refused, because nginix will only listen to 443 (or 80).
My main purpose is that, I would install Gitlab and Nextcloud in this server using Docker Compose. Obviously I need a revers proxy for this.
AIO without reverse proxy was working fine. A connection between reverse proxy and container will be dropped (I don’t know whay), but I’m sure I’m configuring anything wrong or need more configuration.
As a history, I installed Gitlab and Nextcloud (not AIO) on this server with Nginx and they were working fine, except Talk. I tried to install TURN Server, but I could not make it.
Hence I decided to install an All-In-One solution. But again same problem:No connection between Nginx and Container.
This Ubuntu is installed newly.
I can send you more logs and configuration, if it’s needed.
Thank you in advance.
Tell me, after the initial launch of containers, did you go to the address: IP of your server:8080
for the initial setup of the instance?
Port 11000 for Apache is raised only after the initial setup. Perhaps this is the problem.
No, after the initial launch of container, I tried open set up page with https://server.ip.address:8080 to begin the setup, but I got Bad Gateway. Nginx is configured to listen 443 and it was normal that I could not open initial set up. https://domain was not working.
I see other posts, under which Szaimen is written, are working with this configuration and didn’t face Bad Gateway like my case. It’s very peculiar.
in your output the container is listening on port 8080.
Everything turned out to be simpler, you need to type in the address bar https://ip:8080 the browser will complain about the wrong certificate and everything will work.
Sorry, I ran out of options, I installed a fresh copy of Ubuntu 24.04 on a VM and then, following the instructions, everything started up the first time.
Thank you vawaver for your post!
My config is same as your config, except you used Nginix manager and I’m using Nginx.
From videos in your post, I noticed that I should set up initial set up of nextcloud and then go through the configuring nginx.
I will chech it and update this post.
I uninstalled nginx und tried to reach initial set up page, it was not accessible and I got the same message.
To isolate my problem I installed a Ubuntu again and configured the compose file, as @szaimen explaind. No nginx or other proxy or webserver are installed, but I can not open this page through server’s public ip. The server is hosted in internet and my Ubunto has no graohical environment, hence I can not reach it locally and I should use public IP of server.
Firewall on server and Ubuntu are open and Container are listening 8080 (via docker-proxy process,).
Output of “docker logs nextcloud-aio-mastercontainer”:
Trying to fix docker.sock permissions internally...
Creating docker group internally with id 988
Could not reach https://auth.docker.io.
Most likely is something blocking access to it.
You should be able to fix this by using https://github.com/nextcloud/all-in-one/tree/main/manual-install
Could not reach https://auth.docker.io.
Most likely is something blocking access to it.
You should be able to fix this by using https://github.com/nextcloud/all-in-one/tree/main/manual-install
Could not reach https://auth.docker.io.
Most likely is something blocking access to it.
You should be able to fix this by using https://github.com/nextcloud/all-in-one/tree/main/manual-install
Hi Simon @szaimen,
I checked it withot compose file and installed it to the fresh Ubuntu 24.04 acording to the instraction, but the https://ip:8080 was not reachable.
I think it can be a bug. Unfortunately I could not install aio ver. 10.1.0 (which I installed on dec. and it was working fine) to check it on same server, if the last version has a bug.
Ich will check it with a base version.
It took me awhile to get everything including nginx working with Docker but chat gippity and I eventually got it all going. I’m running nginx in a container if my memory serves correctly. I also created plenty of certs for everything and made sure my dns had entries for everything. If you’d like my yaml I’d be happy to share. It may reveal something.
thanks for your kind reply and the offer!
The problem is without nginx I could not open https://ip:8080/. In this phase, we don’t need certs. I checked it on a new fresh linux with docker, but no answer.
Yes, it would be great to have your config.
Best,
Here is my config. Just to note, I remember struggling with getting browsers to connect over https because of things like missing common name in the certificate. Today’s browsers will refuse to connect over plain http for the most part with only something like Firefox allowing you to turn that off. And, of course, you may have to consider the relationship between your DNS / hostname and the name of your SSL (TLS) certificate as well as the full trust chain of the certificate if you are using self-signed certs. I’m sure you know this but wanted to mention it.