This a repository with my installation of my domotica servers. In a fresh install of Ubuntu 20.04 Server I install docker and run the following services:
- Traefik (reversed proxy)
- Pihole (DNS server to block adds)
- Deconz (Service for my Zigbee network)
- Home assistant (My home automation server of choice)
- Visual Studio Code Server (easy editing of configs)
- AppDaemon (automation programming <- this is amazing)
This is a description meant to help me, but it might be useful for you too. Feel free to contact me on LinkedIn.
- Add Openssh
- Do not add docker (it is a Snap app which is annoying)
git clone https://github.com/dennisbakhuis/dotfiles.git cd dotfiles ./install_linux.sh
Open vim and do :PlugInstall Logout and relogin.
When editing I use vim. Feel free to use anything other (i.e. nano).
I followed this guide.
- edit /etc/systemd/resolv.conf and add/change the following:
DNS=1.1.1.1
DNSStubListener=no
- create a symlink to resolv.conf:
sudo ln -sf /run/systemd/resolve/resolv.conf
sudo apt update
sudo apt upgrade
sudo apt install docker docker-compose acl
We also need to add the user to the docker group to use docker without sudo:
sudo gpasswd -a $USER docker
We need a reboot to have port 53 freed. You could however also just restart the network, but a reboot is relatively fast.
sudo reboot
Clone the server setup:
git clone https://github.com/dennisbakhuis/home-server.git
mv ./home-server ./docker
sudo setfacl -Rdm g:docker:rwx ~/docker
sudo chmod -R 775 ~/docker
mkdir -p ~/docker/deconz
mkdir -p ~/docker/pihole/pihole
mkdir -p ~/docker/vscode/storage
mkdir -p ~/docker/pihole/dns-masq.d/
mkdir -p ~/docker/traefik2/acme
touch ~/docker/traefik2/acme/acme.json
Copy example .env file and change the passwords
cd docker
cp env.example .env
vim .env
docker network create --gateway 192.168.90.1 --subnet 192.168.90.0/24 t2_proxy docker-compose pull docker-compose up -d
docker-compose up --force-recreate --build -d docker image prune -f