Add host system configuration

This commit is contained in:
2021-04-15 06:30:38 +00:00
parent 8d3b886607
commit ff1c4f8de2

View File

@@ -1,17 +1,35 @@
# Pi-hole deployment
## Requirements
* Ubuntu Server 20.04 LTS
## Quick Start
1. Copy `env.example` to `.env`
1. Disable systemd-resolved name server
2. Edit `.env` to adapt the Fully Qualified Domain Name (FQDN) of the Pi-hole
```sh
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
sudo systemctl restart systemd-resolved
```
2. Setup a password for the web admnistration interface
```sh
echo "MyAwesomePassword" > conf/webpassword
```
3. Copy `env.example` to `.env`
4. Edit `.env` to adapt the Fully Qualified Domain Name (FQDN) of the Pi-hole
container.
This is used by Traefik to redirect requests to the web interface.
3. `docker-compose up -d`
5. `docker-compose up -d`
4. Go to the Web interface at https://pi-hole.example.net, and adapt
6. Go to the Web interface at https://pi-hole.example.net, and adapt
the settings as needed for your setup.
For example:
@@ -25,4 +43,25 @@
* **Settings** -> **DHCP**:
Disable **DHCP server enabled** if you are using another DHCP server,
which is assumed in this repository.
7. Configure the host server to use Pi-hole as well:
Edit `/etc/netplan/00-installer-config.yaml` with:
```yaml
network:
ethernets:
ens160:
dhcp4: true
dhcp4-overrides:
use-dns: false
nameservers:
addresses: [127.0.0.1]
version: 2
```
8. Apply the network configuration with:
```sh
sudo netplan apply
```