Table of Contents
Raspberry PI Setup
The first thing to do is setup your Raspberry PI. For that it is enough to use a firmware version without a desktop installed since it will not be used anyway. It is also advised to setup connecting to the PI using
After the initial setup connect to the PI using
sudo apt update
sudo apt upgrade
Install Docker
Now that we are setup we can install docker onto the PI using:
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
The commands should have added the
exit
ssh pi@your-ip
groups
The output of the
Portainer Installation
Now we can add portainer to the installation. This will be the user-friendly
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
--restart=always -v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce:latest
After the command is done you can access the portainer interface using your webbrowser at
Add Containers
Upon opening the website you will be taken to the
To add a new container click on
Useful default settings for containers
Setting | Area | Set to |
---|---|---|
Always pull the image | Top | True |
Access control | Top | False |
Restart Policy | Advanced -> Restart Policy | Unless stopped |
Pi-Hole
The first container we will install is a simple Ad-Blocker called Pi-Hole.
Pi-Hole Pre-Requirements
To get the container to work correctly we first have to do some pre-requirements. First we will create all the needed directories. Just enter following commands in the terminal:
mkdir -p /home/pi/data/pi-hole/dnsmasq
mkdir -p /home/pi/data/pi-hole/etc
touch /home/pi/data/pi-hole/etc/resolv.conf
echo $'search fritz.box\nnameserver 127.0.0.1' > /home/pi/data/pi-hole/etc/resolv.conf
Please swap the
Pi-Hole Installation
The Installation itself is pretty straight forwards thanks to
Pi-Hole Settings
Setting | Area | Set to |
---|---|---|
Name | Top | Pi-Hole |
Image | Top | pihole/pihole:latest |
hostname | Advanced -> Network | pi-hole |
Next are the
Pi-Hole Ports
Port Host | Port Container | Protocol |
---|---|---|
443 | 443 | tcp |
4711 | 4711 | tcp |
53 | 53 | tcp |
80 | 80 | tcp |
53 | 53 | udp |
547 | 547 | udp |
67 | 67 | udp |
The next part is to setup some enviroment variables. These can be found under
Pi-Hole Ports
Name | Value |
---|---|
TZ | Europe/Berlin |
WEBPASSWORD | your-password |
The last part are the paths which will be linked from inside the container to the outside. These are found under
Pi-Hole Paths
Container | Host |
---|---|
/etc/dnsmasq.d | /home/pi/data/pi-hole/dnsmasq |
/etc/pihole | /home/pi/data/pi-hole |
/etc/resolv.conf | /home/pi/data/pi-hole/etc/resolv.conf |
The setup is now finished and we can press on
Home-Assist
Home-Assist Pre-Requirements
To get the container to work correctly we first have to do some pre-requirements. First we will create all the needed directories. Just enter following commands in the terminal:
mkdir -p /home/pi/data/home-assist/config
Home-Assist Installation
We now just add a new container and apply the mentioned default settings like shown here. Afterwards just apply the following settings:
Home-Assist Settings
Setting | Area | Set to |
---|---|---|
Name | Top | Home-Assist |
Image | Top | homeassistant/home-assistant:latest |
Network | Advanced -> Network | host |
The next part is to setup some enviroment variables. These can be found under
Home-Assist Ports
Name | Value |
---|---|
TZ | Europe/Berlin |
The last part is a single path which will be linked from inside the container to the outside. These are found under
Home-Assist Paths
Container | Host |
---|---|
/config | /home/pi/data/home-assist/config |
The setup is now finished and we can press on