From 132b97ba201032557a5bdb2ebe9fe9702e5079eb Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 18 Oct 2022 23:50:16 +0200 Subject: [PATCH] add some guides for local dns server Signed-off-by: szaimen --- local-instance.md | 2 +- readme.md | 5 ++++- reverse-proxy.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/local-instance.md b/local-instance.md index ffc6380e..35f6d827 100644 --- a/local-instance.md +++ b/local-instance.md @@ -5,7 +5,7 @@ It is possible due to several reasons that you do not want or cannot open Nextcl The recommended way is the following: 1. Set up your domain correctly to point to your home network 1. Set up a reverse proxy by following the [reverse proxy documentation](./reverse-proxy.md) but only open port 80 (which is needed for the ACME challenge to work - however no real traffic will use this port). -1. 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 +1. 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 (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally) 1. 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. 1. Now, entering the domain in the AIO-interface should work as expected and should allow you to continue with the setup diff --git a/readme.md b/readme.md index 0a11ecc8..5cc231cf 100644 --- a/readme.md +++ b/readme.md @@ -134,7 +134,10 @@ No and they will not be. Please use a dedicated domain for Nextcloud and set it No and it will not be added. Please use a dedicated domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md). ### How can I access Nextcloud locally? -The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. +The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides: +- https://howchoo.com/pi/pi-hole-setup +- https://docs.callitkarma.me/posts/PiHole-Local-DNS/ +- https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/ ### How to skip the domain validation? If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer. diff --git a/reverse-proxy.md b/reverse-proxy.md index 742e1b71..af13cc98 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -118,7 +118,7 @@ You can get AIO running using the ACME DNS-challenge. Here is how to do it. Of course you need to modify `` to the domain on which you want to run Nextcloud. You also need to adjust `` and `` to match your case. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) 1. Now continue with [point 2](#2-use-this-startup-command) but additionally, add `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command which will disable the dommain validation (because it is known that the domain validation will not when using the DNS-challenge since no port is publicly opened. -**Advice:** In order to make it work in your home network, you may add the internal ipv4-address of your reverse proxy as A DNS-record to your domain and disable the dns-rebind-protection in your router. Another way it to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your reverse proxy. If both is not possible, you may add the domain to the hosts file which is needed then for any devices that shall use the server. +**Advice:** In order to make it work in your home network, you may add the internal ipv4-address of your reverse proxy as A DNS-record to your domain and disable the dns-rebind-protection in your router. Another way it to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your reverse proxy (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally). If both is not possible, you may add the domain to the hosts file which is needed then for any devices that shall use the server.