Synology NAS as a domotica server
01 Intro
This document describes how to prepare your Synology NAS as a domotica server using Docker containers. All images can be clicked on for a larger version.
For ease of use we will be installing the Docker package so the various components can be added with relative ease. For our domotica package I will be using Home Assistant or more specifically Home Assistant Docker, refer to my blog post on Home Assistant Naming for more info.
Due to my field of interest I will eventually be using the following docker containers
- Home Assistant Docker main domotica software
- MQTT for messaging
- InfluxDB time related database
- Grafana nice graphic time charts
- SBFspot for solar panels using SMA inverter
- WeeWx for my weather station
I already am using the following devices at my place
- HUE lights
- HEOS speakers
- Harmony remote
- Axis cameras
- Alexa
- Android phones, iPad, windows PC
The time frame for installing all these will be long, I just finished a sort of test run with plain Home Assistant using a Docker container successfully by reading a lot of different sources on the internet. But as in these guides mostly the manual approach is used this will conflict a bit with the KISS principle. The underlying idea of the KISS principle is to keep things as simple as possible in order to prevent stupidities. Hence the acronym KISS = Keep It Simple, Stupid.
I like to use as much of the click and run resources as I can, therefore I will try to use the Synology DSM whenever possible for getting all these running.
The hardware used is a Synology DS-218+ with 10GB memory and two 2TB WD-red harddisks running DSM 6.2.2. Although with the imminent release of DSM 7 I might change to use that. Any guides already published will be updated to reflect DSM 7 when a stable release is available.
As you can see in above image I am currently running Home Assistant Docker (first four containers) and WordPress with MariaDB for my website development. This takes just about 1 GB of memory. But I also intend to use InfluxDB and Grafana as well as a few more small specialised containers therefore the standard 2 GB of memory might be on the low side. If you are only running Home Assistant Core or Home Assistant Docker you will not be using much more than 1 GB though.
Setting up the main system
Before we can do anything, we must do some things first.
That is setting up your router and preparing the DiskStation. Most of this is based on the tutorial by Phil Hawthorne https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/.
02 Setting Up Your Router
Your router is connecting all devices together by giving them a unique IP address. These addresses are usually handed out by the DHCP part in your router and are chosen at random from the available pool.
This would make it difficult to find a device by IP address as it might get another address from the router, hence we will set a fixed IP address for our Synology DiskStation. That way we will always be referencing the same unit.
We do this by linking the MAC-address of the DiskStation to an IP-address we choose, then it will always stay the same.
The MAC-address of the DiskStation can be found in the Control Panel – Info Center – Network section.
Setting the MAC-address to a specific IP address in your router can be found in the user guide of your router. The above text can help you find what you need to do and otherwise there are guides on the internet that will help you.
This seems a good one https://www.howtogeek.com/184310/ask-htg-should-i-be-setting-static-ip-addresses-on-my-router/
03 Setting Up Your DiskStation
A few things are needed on your DiskStation before we can start using it as the Domotica server.
Login to your DiskStation from a browser, using the admin account.
a) Enable User Homes
By default, your DiskStation allows basic access to the filesystem. Every user that logs into the DiskStation can access the same files as everyone else. “Homes” is a feature which allows each user to have their own home directory. We’ll need to enable this option, as it will enable us to access more areas of the DiskStation from the file manager.
b) Enable SSH Access
We’ll be logging into the DiskStation using SSH, so we can perform some Linux commands from a terminal window, A good program to do so would be Putty.
- go to Control Panel -> Terminal & SNMP
- be sure the Enable SSH Service is checked
I myself haven’t used this option yet, so you might want to skip it. Note that I might need to activate it at a later stage.
c) Enable access from other computers
Several protocols can be used,
SMB Samba protocol used on many operating systems
AFP an Apple protocol
NFS Network Filing System used on many operating systems
For windows connectivity I normally use the Samba protocol and sometimes NFS therefore I will enable both services. If you are an Apple user you might want to use the AFP protocol only or in addition to the others, please check your manuals on that.
Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.
d) Create a Shared Folder
This will be very handy at a later stage when we are going to install packages and for storing our configuration files. If you also performed the previous step you will be able to easily access it from another computer.
- Go to Control Panel -> Shared Folder
- Select the Create button
- Give it a name, I used Shared
- Fill out the Description if you feel like it
- Never select the Hide this folder / sub-folders checkbox as the purpose of this is to make them available
- Select the Enable Recycle bin if you feel like it
- Select the Next button
- The encryption we can skip, select Next
- The advanced settings don’t need any input, select Next
04 ISSUES
If you’re having issues getting the Docker package to start, check your network settings.
The Docker will not start if you have an OpenVPN network connection enabled. Disabling the OpenVPN network connection, and then starting Docker should work. Once you have Docker running, you can re-connect the OpenVPN connection to encrypt your traffic again.
05 CLosing words
So that’s it, your Synology DiskStation is ready to start acting as a Domotica server using Docker containers. If you have any comments please leave them at the bottom, first time user will need to be approved but thereafter you will see your comments directly.
Make sure to check back and read the next episodes which will install Home Assistant Core as a Docker container followed by the installation of Home Assistant Docker.







Recent Comments