all-in-one/local-instance.md
szaimen a864e74105 fix some links
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-07-21 01:31:50 +02:00

1.8 KiB

Local instance

It is possible due to several reasons that you do not want or cannot open Nextcloud to the public internet. However AIO usually requires a valid certificate to work correctly. Below is discussed how you can achieve both: Having a valid certificate for Nextcloud and only using it locally.

The recommended way is the following:

  1. Set up your domain correctly to point to your home network
  2. Set up a reverse proxy by following the reverse proxy documentation but only open port 80 (which is needed for the ACME challenge to work - however no real traffic will use this port).
  3. Set up a local DNS-server like a pi-hole and configure it to be your local DNS-server for the whole network. Then in the Pi-hole interface, add a custom DNS-record for your domain and overwrite the A-record (and possibly the AAAA-record, too) to point to the local ip-address of your reverse proxy
  4. Enter the the ip-address of your local dns-server in the deamon.json file for docker so that you are sure that all docker containers use the correct local dns-server.
  5. Now, entering the domain in the AIO-interface should work as expected and should allow you to continue with the setup

2. Use the ACME DNS-challenge

You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge

3. Use Cloudflare

If you do not have any contol over the network, you may think about using Cloudflare Argo Tunnel to get a valid certificate for your Nextcloud. However it will be opened to the public internet then. See https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-argo-tunnel how to set this up.