Skip to content

docker-compose and basic config to kick off some services I want to run at home

Notifications You must be signed in to change notification settings

afharo/dockerized-smarthome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Smarthome

This repo is essentially listing all the services I want to run in my smart-home server in a docker-compose format.

Services

Listing all the services included so far in the docker-compose, a small note of why/what I'm going to use it for, and some installation notes in case any further step is needed.

Zigbee2MQTT

URL: https://www.zigbee2mqtt.io/

Why: So far I've been a HomeKit hard user, and I'm looking forward to Matter and Thread will keep making life easier and cheaper for me.

However, there is a moment in the HomeKit user where you wonder what if there was a communication layer that is more or less standard, so I can rely on different brands and vendors without buying hubs for each one of them?.

It looks like Z2M is the answer for Zigbee-based devices.

Installation: Copy the configuration.base.yaml to data/zigbee2mqtt/configuration.yaml

cp data/zigbee2mqtt/configuration.base.yaml data/zigbee2mqtt/configuration.yaml

⚠️ Make sure the ttyUSB0 still matches the name associated with your Zigbee dongle (sudo dmesg can help with figuring it out). This check needs to happen in configuration.yaml and docker-compose.yml.

Mosquitto

URL: https://mosquitto.org

Why: Simply because I need an MQTT server for Zigbee2MQTT and it's the suggested one by Zigbee2MQTT docs.

Home Assistant

URL: https://www.home-assistant.io/

Why: Home Assistant is the most powerful platform for managing your smart home. Such power comes at the cost of a steep learning curve, but it's worth it, and you can go at your own pace. It's very addicting, and it'll organically grow on you. Trying this service out was the best thing I could have done for my smart home.

Matter Server

URL: https://github.com/home-assistant-libs/python-matter-server

Why: Needed by Home Assistant to support Matter devices (docs).

Duplicati

URL: https://www.duplicati.com

Why: We all need a backup! All the services in this project generate a lot of files worth creating backups of: secrets, pairing tokens, autogenerated configurations (from UI actions), and DBs. The idea is to back up the entire /data directory.

Installation:

  1. Copy the duplicati.base.env to ./data/duplicati/duplicati.env
cp ./data/duplicati/duplicati.base.env ./data/duplicati/duplicati.env

And set the environment variables as needed.

  1. Once the container is running, open http://host:8200 in your browser to set up (or restore) the backups. If restoring a previous backup, make sure the affected service is stopped before restoring the files.

DISCLAIMER: Duplicati dropped support for the architecture linux/arm/v7 because managing the underlying libraries and dependencies in this architecture was too complex. If running on a Raspberry Pi, make sure it's running a 64-bit OS.

Homebridge

URL: https://homebridge.io

Why: As a HomeKit user, there are devices that would make a great addition to my automations, but they are not officially supported by this platform. I've been using this project for a long while, and I've already found out Home Assistant cannot fully replace it.

Installation: Copy the homebridge.base.env to ./data/homebridge/homebridge.env

cp ./data/homebridge/homebridge.base.env ./data/homebridge/homebridge.env

And set the environment variables as needed.

DISCLAIMER: I'm using a private Docker image for the time being. So other folks might not be able to run it. I'll try to anonymize the other project, so I can make it public, and so the Docker image.

AdGuard Home

URL: https://github.com/AdguardTeam/AdGuardHome

Why: Free local DNS-based ad-blocker that I can set at the router level. Do I need to explain why?

Installation: Once running, set the router to the IP of the host running this service.

Remote Access

For remote access, I need to use 2 additional services: a Dynamic DNS and a VPN.

Dynamic DNS: DuckDNS

URL: https://www.duckdns.org

Why: We need a service that allows us to have a domain that points to our public IP. Typically, the public IP in our router is not static and rotates from time to time. This service would make sure we can point to a static DNS that translates to the current public IP.

Installation: Copy the duckdns.base.env to ./data/duckdns/duckdns.env

cp ./data/duckdns/duckdns.base.env ./data/duckdns/duckdns.env

And set the environment variables as needed. Documentation on the settings of this service can be found in the official README: https://hub.docker.com/r/linuxserver/duckdns

Typically, it's just defining the subdomain that was created in the website, and the token retrieved from the website.

VPN: WireGuard

URL: https://www.wireguard.com

Why: I may need remote access to the system from time to time in case something doesn't work as expected. I've read that WireGuard is better than OpenVPN, and much simpler to use, so I looked no more.

Installation: Copy the wireguard.base.env to ./data/wireguard/wireguard.env

cp ./data/wireguard/wireguard.base.env ./data/wireguard/wireguard.env

And set the environment variables as needed. Documentation on the settings of this service can be found in the official README: https://github.com/linuxserver/docker-wireguard

Typically, it's just about updating the SERVERURL to match the domain obtained from DuckDNS.

⚠️ Remember to enable port forwarding to 51820/udp in the router.

Hotspot

I'm using a hotspot service so my RPi can expose a Wi-Fi AP that I can connect to when I need to take it to a place with no internet.

I'm leveraging the profiles feature of docker-compose to avoid running this image all the time. To enable it, I need to run either:

docker-compose up hotspot -d

or

docker-compose --profile no-network up -d

About

docker-compose and basic config to kick off some services I want to run at home

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages