AIO installation using only one IP address - how?

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

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:

(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. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • AIO current
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • AIO
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • none yet
  • PHP version (e.g, 8.3):
    • AIO
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • at installation
  • 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:

Hello, I am trying to follow the AIO instructions to install nextcloud via docker. However, on this server I already have an apache2 running serving other websites. This apache uses a dedicated private address 192.168.123.11 . I issued a separate address 192.168123.112 to use with the AIO nextcloud. I installed using

docker run --init --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --env APACHE_IP_BINDING=192.168.123.112 --publish 192.168.123.112:443:443 --publish 192.168.123.112:80:80 --publish 192.168.123.112:8080:8080 --publish 192.168.123.112:8443:8443 --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /var/run/docker.sock:/var/run/docker.sock:ro ghcr.io/nextcloud-releases/all-in-one:latest

but then I always get “Domaincheck container is not running. This is not expected. Most likely this happened because port 443 is already in use on your server.“

But when the container is stopped, there is no process that uses port 443 on the IP address 192.168.123.112. So I must do something wrong. I see

docker-pr 17507     root    8u  IPv4 109570      0t0  TCP 192.168.123.112:http (LISTEN)
docker-pr 17519     root    8u  IPv4 109586      0t0  TCP 192.168.123.112:https (LISTEN)
docker-pr 17531     root    8u  IPv4 108765      0t0  TCP 192.168.123.112:http-alt (LISTEN)
docker-pr 17543     root    8u  IPv4 108781      0t0  TCP 192.168.123.112:8443 (LISTEN)

after I start the master container, so probably my “run” instruction is wrong as the master container seems to block port 443? How do I issue a run command that just uses the IP 192.168.123.112 and starts all containers correctly ?

Thank you, regards, Jakob

Steps to replicate it (hint: details matter!):

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

PASTE HERE

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

With such a setup you will always run into some trouble.

1 Like

Hi @jcol, please check out all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub

1 Like

I followed that guide, but I thought I could include a dedicated IP address when setting up so that I can run several instances in parallel using the separate IP address to access the m (instead of using different ports). But from the “multiple instances” documentation, it seems that this is not supported. I am now thinking of going the classical installation way inside a webserver instead of deploying an AIO instance.

If you want to run several instances in parallel using the separate IP address a very good option would be the use of QEMU/KVM. You will have one physical hardware but several VM’s and can have for each of them its own IP Addresses. It works with both classical installation as well as AIO or snap.

1 Like

IP addresses are not a great way to use web applications like Nextcloud unless you’re only using them locally. But even then, it’s usually much nicer to have a domain name instead of having to remember IP addresses.

And yes, AIO doesn’t really support using IP addresses. The main reason is that AIO requires a valid TLS certificate, and you can’t obtain publicly trusted certificates for local IP addresses.

With a manual installation, you can use self-signed certificates or even no TLS at all. However, the former will result in browser warnings and potential issues with certain mobile apps and operating systems, while the latter is generally not recommended (even in a LAN, in my opinion), since everything is transmitted unencrypted.

My recommendation would therefore be to use a public domain name. That way, you can run as many instances as you like on the same local (or public) IP, and the web server/reverse proxy will route requests via Server Name Indication (SNI), i.e., based on the URL (e.g., cloud1.yourdomain.tld, cloud2.yourdomain.tld, etc.) to the correct instance.

Another advantage of this would be that you can use Let’s Encrypt certificates, which are automatically trusted by all browsers and operating systems.

By the way, using a public domain doesn’t necessarily mean your instances have to be exposed to the internet. See here: https://github.com/nextcloud/all-in-one/blob/main/local-instance.md#3-use-the-acme-dns-challenge

1 Like