Skip to content
  • English Deutsch

benjamin-abt.com

Performance is a feature | Cloud - AI - Azure - .NET - Sustainability

  • Home
  • Blog
  • Portfolio
    • Overview
    • Workshops & Training
    • Publications
  • Contact
  • Home
  • Blog
  • Install Home Assistant on Synology NAS with Docker

Install Home Assistant on Synology NAS with Docker

Install Home Assistant on Synology NAS with Docker
December 27, 2025 9 min read BEN ABT
Self-Hosting Home Assistant Synology Docker NAS Smart Home

Die deutsche Version ist hier verfügbar: Home Assistant via Docker auf einer Synology NAS installieren

Home Assistant connects smart home devices and runs automations. An existing Synology NAS can host it, without the need for an additional computer.

This guide covers installation with Synology Container Manager and Docker Compose. It starts with a working installation on the home network, followed by backups, updates, and an optional HTTPS connection through the NAS reverse proxy.

How the setup works

Home Assistant runs in a container. Its settings are defined in docker-compose.yml. Container Manager reads this file and manages the installation as a project.

The data is stored separately in a folder on the NAS. Settings, automations, and the local database therefore survive when an update replaces the container.

The guide uses these example values:

SettingExample value
NAS IP address192.168.1.50
Project folder/volume1/docker/homeassistant
Data folder/volume1/docker/homeassistant/config
Address on the home networkhttp://192.168.1.50:8123
Optional local DNS name for HTTPShomeassistant.abt

The IP address, volume, and DNS name are adjusted to match the local environment.

What the container installation includes

This installation type is called Home Assistant Container. It provides integrations, dashboards, and automations. It does not include the management of additional apps, formerly called add-ons, available in Home Assistant OS. Any additional services are run separately. The installation overview explains the differences.

Prerequisites

The setup requires a compatible Synology NAS, a DSM version with Container Manager, and access to DSM administration. The package is installed through Package Center. It is not supported on every NAS model.

A fixed IP address makes access easier. A DHCP reservation on the router ensures that the NAS always receives the same address. Enough resources should also be available for both Home Assistant and the other NAS services.

1. Create the project and data folders

In File Station, a homeassistant subfolder is created inside docker, followed by a config folder inside it. The completed structure looks like this:

1/volume1/docker/homeassistant/
2├── docker-compose.yml
3└── config/

The config folder must exist before startup. The docker-compose.yml file is created in the next step. If the NAS uses another volume, such as volume2, the path changes accordingly.

2. Create the Compose file

The docker-compose.yml file in the project folder contains:

YAML
 1services:
 2  homeassistant:
 3    container_name: homeassistant
 4    image: ghcr.io/home-assistant/home-assistant:stable
 5    network_mode: host
 6    restart: unless-stopped
 7    stop_grace_period: 60s
 8    environment:
 9      - TZ=Europe/Berlin
10    volumes:
11      - ./config:/config
12      - /etc/localtime:/etc/localtime:ro

The main settings serve the following purposes:

SettingMeaning
imageSelects the container template. stable refers to the current stable version when downloaded.
network_mode: hostLets the container use the NAS network directly.
restart: unless-stoppedStarts the container after a NAS restart unless it was manually stopped beforehand.
stop_grace_period: 60sGives Home Assistant up to 60 seconds to shut down, including closing its database cleanly.
TZ=Europe/BerlinSets the container’s time zone.
./config:/configConnects the data folder next to the Compose file to /config inside the container.
/etc/localtime:/etc/localtime:roMakes the NAS local time configuration available as read-only.

Why this setup uses host networking

Home Assistant can discover devices through protocols such as mDNS and SSDP. These use network messages that do not always reach a separate container network without additional configuration.

With network_mode: host, Home Assistant uses the NAS network directly. It is available at the NAS IP address on port 8123. No additional ports mapping belongs in the Compose file with this network mode. The official installation guide also covers running Home Assistant on Synology.

3. Start the project in Container Manager

Project setup is available under Container Manager → Project → Create. The project name can be homeassistant, and its path is the prepared project folder.

The wizard uses the existing docker-compose.yml. Depending on the DSM version, the option is labeled along the lines of Use existing Compose file. The project is then created and started.

Container Manager downloads the image and creates the container. Initial startup can take a few minutes. If the project fails to start, the project or container logs show the cause.

4. Open Home Assistant for the first time

After startup, the interface is available on the home network at http://192.168.1.50:8123, using the actual NAS IP address.

The setup wizard guides account creation and basic configuration. Discovered devices can then be added, followed by initial automations. A lamp or sensor provides a simple functional test: its state should appear correctly in the interface.

The DSM firewall must allow access from the intended home network to port 8123. This local setup does not require port forwarding on the router.

5. Set up backups and updates

Back up the data

In this setup, Home Assistant stores its data in config, including hidden files and directories. The backup also includes docker-compose.yml, so the container can be recreated with the same settings.

For a simple file backup, the project is stopped briefly, the entire project folder is backed up, and the project is started again. This avoids copying the local database while it is being written to. Automations and the interface are unavailable during this time.

Synology Hyper Backup can transfer the backup to an external drive or another system. Additional services or an external database require their own backups.

To restore the installation, the project folder is restored while the container is stopped. Container Manager then starts the project again with the appropriate settings. A restore test confirms whether the backup is complete.

Update Home Assistant

An update starts with a backup and a review of the release notes. The new image is downloaded in Container Manager. The container must then be recreated from that image; restarting the existing container does not apply a new image. The data folder remains mounted.

Alternatively, the following commands can run over SSH from the project folder:

Bash
1cd /volume1/docker/homeassistant
2docker compose pull
3docker compose up -d

The stable tag does not enable automatic updates. Downloading the image and recreating the container applies the update. A specific version number can replace stable when a fixed version is needed.

After the update, the interface, devices, and important automations are checked. Returning to an older version may require both its image and a matching backup. The maintenance guide for Home Assistant Container provides further details.

6. Optional: Set up HTTPS through Synology Reverse Proxy

The address used so far provides unencrypted HTTP. HTTPS also encrypts the connection between the device and the NAS. Synology Reverse Proxy accepts HTTPS requests and forwards them internally to Home Assistant.

Prepare the local name and certificates

A record on the local DNS server maps the chosen name to the NAS:

homeassistant.abt → 192.168.1.50

A server certificate is issued for that name. The following guides cover creating a private certificate authority and issuing certificates:

  • Create a Custom Root Certificate Authority
  • Create HTTPS Certificates with a Custom Root CA

The public Root CA certificate is installed as trusted on the connecting devices. The Root CA’s private key remains secret. On iPhone and iPad, full trust must also be enabled in Certificate Trust Settings after the profile is installed.

The server certificate contains DNS:homeassistant.abt in the Subject Alternative Name (SAN) field. IP:192.168.1.50 is an optional additional entry. A validity period of one year is sufficient for this example; the certificate needs renewal before it expires.

Import the certificate and create the proxy rule

Under Control Panel → Security → Certificate → Add → Import certificate, the server certificate homeassistant.abt.crt and its private key homeassistant.abt.key are imported. If an intermediate CA was used, its certificates belong in the corresponding field.

A new rule is then created under Control Panel → Login Portal → Advanced → Reverse Proxy, with these values:

SettingSource: device connectionsDestination: Home Assistant on the NAS
ProtocolHTTPSHTTP
Hostnamehomeassistant.abt127.0.0.1
Port4438123

Custom Header → Create → WebSocket adds WebSocket support, which the interface needs to communicate with Home Assistant.

After the rule is saved, the imported certificate is assigned to the homeassistant.abt service under Security → Certificate → Settings.

Configure Home Assistant to trust the proxy

Home Assistant must explicitly accept requests forwarded by the proxy. Since version 2026.8, HTTP settings are available under Settings → System → Network. Trust for X-Forwarded-For is enabled there. For this local connection, the trusted proxies are 127.0.0.1 and ::1.

Older versions use the same settings in config/configuration.yaml:

YAML
1http:
2  use_x_forwarded_for: true
3  trusted_proxies:
4    - 127.0.0.1
5    - ::1

An existing http section is extended rather than duplicated. A restart applies the change. The Home Assistant HTTP documentation also explains the migration from YAML to the interface.

The interface should now open at https://homeassistant.abt without a certificate warning. A VPN can provide access from outside the home network. It must make both the NAS and the local DNS server reachable. HTTPS alone does not provide remote access.

Common problems and their causes

The container reports a missing folder

A Bind mount failed error means the configured data folder is missing or its path is incorrect. The checks include the project folder, its config subfolder, and the correct volume. The container also needs write access to the data folder.

The interface is unreachable

The first checks are container status and logs. Next are the NAS IP address, port 8123, and the DSM firewall. A port already in use or separate network segments can also prevent access.

Devices are not discovered automatically

The network mode must be host. If devices are in other VLANs, discovery can still fail: the router or firewall must allow the required network messages between those networks. Some integrations can also be configured manually using a device’s IP address.

A Zigbee or Z-Wave USB stick is missing

The Compose example does not configure USB access. DSM drivers, the device path, and container permissions must match the particular stick. A mapping such as /dev/ttyUSB0 alone is not enough if DSM does not recognize the device.

HTTPS shows a warning or proxy access is rejected

For certificate warnings, the checks are Root CA trust, the DNS name, the expiry date, and certificate assignment. For rejected proxy requests, the Home Assistant logs help identify the cause. If they name a different proxy IP, that specific trusted address needs to be allowed. Trusting the entire home network is unnecessary.

Conclusion

A Compose file and a persistent data folder make it possible to run Home Assistant on an existing Synology NAS. The configuration is documented in the file and can be reused when updates replace the container.

After a successful device test, regular backups and updates become part of maintenance. An optional reverse proxy adds HTTPS, while a VPN provides access away from home.

Related articles

Home Assistant via Docker auf einer Synology NAS installieren

Dec 27, 2025 - 8 min read

Home Assistant via Docker auf einer Synology NAS installieren

You can find the English version of this guide here: Install Home Assistant on Synology NAS with Docker Home Assistant verbindet …

Vaultwarden on a Synology NAS with Docker

Oct 22, 2025 - 15 min read

Self-Hosting Vaultwarden (Bitwarden) with Docker on Synology NAS

You can find the German version of this guide here: Vaultwarden auf Synology mit Docker selbst hosten I wanted to manage my passwords on my …

Vaultwarden auf einer Synology NAS mit Docker

Oct 22, 2025 - 13 min read

Vaultwarden (Bitwarden) mit Docker auf Synology NAS selbst hosten

You can find the English version of this guide here: Self-Hosting Vaultwarden (Bitwarden) on Synology NAS with Docker Ich möchte meine …


BEN ABT

BEN ABT

Ben is Chief Engineering Officer and Principal Software Engineer at Medialesson.de, with a strong focus on .NET and Microsoft Azure. In his professional role, he designs and builds highly scalable platforms for hybrid and cloud-based scenarios. He also advises companies and C-levels on migrating to the sovereign cloud.

He runs myCSharp.de, the largest and most active German-speaking C# community forum, actively contributes to both his own and external open-source projects and regularly shares his knowledge through his blog, at community events, conferences and as a writer for technical magazines.

Let's Work Together

Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

New Platforms

Modernization

Training & Consulting

Contact Me
X Facebook LinkedIn WhatsApp
Back Next Blog Post

Open for work!

Architecture, .NET, Azure & Workshops for your team.

Contact Me
BEN ABT BEN ABT Software Engineer · Microsoft MVP Passionate about .NET, Azure, performance optimization and sustainable software engineering.

Medialesson GmbH Logo

Microsoft MVP Logo

Recent posts

View all
RAG in Memory: Embeddings and Vector Search with IEmbeddingGenerator

RAG in Memory: Embeddings and Vector Search with …

Dec 5, 2026
Chat with Local Data: Context Stuffing with IChatClient

Chat with Local Data: Context Stuffing with IChatClient

Dec 3, 2026
Azure SDK Clients and Dependency Injection in .NET

Azure SDK Clients and Dependency Injection in .NET

Dec 1, 2026
A Console Chat with IChatClient: Ollama and Microsoft Foundry

A Console Chat with IChatClient: Ollama and Microsoft …

Dec 1, 2026
When to Use Unio with C# 15

When to Use Unio with C# 15

Nov 30, 2026

Tags

.NET (203) C# (108) ASP.NET Core (52) Azure (44) DevOps (17) Docker (15) Microsoft (14) Security (14) AI (13) EF Core (11) Microsoft MVP (11) .NET 11 (10) Architecture (10) GitHub (10) GitHub Copilot (10) ASP.NET (9) Synology (9) Raspberry (8) Azure Functions (7) Cloudflare (7)
benjamin-abt.com

About BEN

Benjamin Abt is a Software Engineer, Platform Architect and Microsoft MVP specializing in .NET, Azure, cloud architecture, performance optimization and sustainable software development.

Connect

  • Follow me on GitHub
  • Follow me on LinkedIn
  • Follow me on Mastodon
  • Microsoft MVP profile
  • Follow SchwabenCode on GitHub
  • Follow me on X

Quick Links

  • Portfolio
  • Blog
  • Workshops & Training
  • Publications
  • Get in Touch
  • Sitemap
Open for Work

© Copyright Benjamin Abt & SchwabenCode | 2011 - 2026

Content licensed under CC BY 4.0 unless otherwise noted.

  • Impressum
  • Privacy
  • Contact