Home Assistant. Install the snap on Synology NAS on an Ubuntu Virtual Machine

install home assistant virtual machine nas synology ubuntu snapd
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp
Table of Contents

It is very easy to install Home Assistant on a Linux distribution (Ubuntu, Debian, CentOS …) on a virtual machine running on a NAS with snapd. Snaps are packages of desktop, cloud, and IoT apps that are easy to install, secure, cross-platform, and dependency-free. Only one command line is needed to install an application which considerably reduces the difficulties when starting with Linux.


Hassio, the packaged version of Home Assistant integrating the supervisor is very easy to install with Docker. However, when the version of Docker installed on the NAS is too old or the update is late, it is no longer possible to update Hassio (Home Assistant). If your NAS has enough power (at least 8GB of RAM) and supports virtualization (usually NAS equipped with Intel processor), installing Hassio on a Virtual Machine (VM) is a sustainable alternative.

Note. Much like Docker, Home Assistant does not officially develop or maintain a snap for Linux. These are contributors who offer their snaps on the Snapcraft store.

Which NAS to choose to run a VM

Several consumer models may be suitable for running a Linux virtual machine (Debian, Ubuntu …).

Preferably choose a dual bay model to create a RAID 1 or Btrfs volume (more modern) to secure your data.

Best choice
2021 modelsDS220+DS720 +DS920 +
Older generationsDS218 +DS718 +DS918 +
nas synology DS218 plusnas synology ds718 plusnas synology ds918 plus
Average price of bare NAS **~ 340€~ 455€~ 550€
ProcessorIntel Celeron J3355

Dual Core@2.0 GHz

Intel Celeron J3455

Quad Core@2.3 GHz

Intel Celeron J3455

Quad Core@2.3 GHz

Score CPU Benchmark119321262126
Max RAM6 GB  (2 GB + 4 GB)

possible 8GB

6 GB (2 GB + 4 GB)

possible 8GB

8 GB (2 x 4 GB )
VM name max. *224
Max storage28 TO

2 x 14 TO

28 TO

2 x 14 TO

56 TO

4 x 14 TO

Transcoding ***H.264 (AVC), H.265 (HEVC), MPEG-2 and VC-1; maximum resolution: 4K (4096 x 2160) @ 30fpsH.264 (AVC), H.265 (HEVC), MPEG-2 and VC-1; maximum resolution: 4K (4096 x 2160) @ 30fpsH.264 (AVC), H.265 (HEVC), MPEG-2 and VC-1; maximum resolution: 4K (4096 x 2160) @ 30fps
USB 2.0x2
USB 3.0x1x3x2
1GbE Ethernetx1x2x2
Noise19.3 dB(A)18.4 dB(A)19.8 dB(A)
Conso. normal17,23W20.1 watts28.8 watts
Conso. Standby5.4 watts9.1 watts12.6 watts
Technical sheetReadReadRead

(*) requires at least 4GB of RAM.

(**) The NAS is delivered without hard drive and memory expansion.

(***) Makes it possible to greatly reduce the storage space (and therefore the overall cost of the NAS) for video surveillance

Which version of Linux to choose to install Hassio (Home Assistant)?

All versions of Linux will be able to run Home Assistant. If you are just starting out, your best bet is to stick with a distro with a very large community and regular, stable updates.

Ubuntu is a great choice, but it’s really a matter of taste. If the virtual machine is dedicated to Home Assistant, there is no need to bother with the graphical desktop (Desktop version), the Lite / Server version will do the trick … provided you are not afraid of the Terminal, of course. Don’t worry, everything is explained in the tutorial!

Create Ubuntu 20.04 LTS Virtual Machine on Synology NAS

Go to the official Ubuntu site to grab the ISO image of the distribution of your choice. Preferably choose an LTS (Long Time Service) version which will receive security updates for 10 years.

Then create a virtual machine on the Synology NAS as you are used to. Remember to deselect the ISO file from the Ubuntu distribution at the end of the installation.

  • nas synology create vm virtual machine ubuntu 1
  • nas synology create vm virtual machine ubuntu 2
  • nas synology create vm virtual machine ubuntu 3
  • nas synology create vm virtual machine ubuntu 4
  • nas synology create vm virtual machine ubuntu 5

Enable SSH port

By default, Ubuntu does not have an SSH server. Whatever version is installed (Desktop or server), it is much more convenient and faster to install SSH. Start by switching to administrator mode, this will prevent you from having to precede each command with a sudo.

sudo -i

Then we update the system and we install the openssh server

apt update
apt install openssh-server

install openssh server linux ubuntu

Now, we check that the ssh service is started by running the systemctl status ssh command

● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2020-12-14 13:13:35 CET; 4min 17s ago
       Docs: man:sshd(8)
   Main PID: 2961 (sshd)
      Tasks: 1 (limit: 2318)
     Memory: 3.3M
     CGroup: /system.slice/ssh.service
             └─2961 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

déc. 14 13:13:35 vm-ubuntu20 systemd[1]: Starting OpenBSD Secure Shell server...
déc. 14 13:13:35 vm-ubuntu20 sshd[2961]: Server listening on port 22.
déc. 14 13:13:35 vm-ubuntu20 sshd[2961]: Server listening on :: port 22.
déc. 14 13:13:35 vm-ubuntu20 systemd[1]: Started OpenBSD Secure Shell server.

All that remains is to change the firewall settings by allowing SSH

ufw allow ssh

You can now connect SSH to Ubuntu from Terminal on macOS or Linux or using Putty with Windows.

Enable snapd on your linux distribution

Snapd is the background service that automatically manages and maintains your snaps. The (snap) package is independent * of the Linux distribution and the platform (ARM, Intel …), that’s what is great about snap. It even works on the Raspberry Pi!

snapd linux centos debian raspberry pi ubutu fedora

(*) On condition that the software version that interests you exists on the desired platform and that the snap developer has successfully integrated the concerned platform.

If you are using  Ubuntu 16.04 LTS (Xenial Xerus)  or later, including  Ubuntu 18.04 LTS (Bionic Beaver)  and  Ubuntu 20.04 LTS (Focal Fossa), you don’t need to do anything. Snap is already installed and ready to go.

For Ubuntu versions between  14.04 LTS (Trusty Tahr)  and  15.10 (Wily Werewolf) , as well as Ubuntu versions that do not include  snap by default, snap can be installed from the Ubuntu Software Center by searching for  snapd .

ubuntu install snapd

Source: snapcraft.io

  • Ubuntu
  • Debian

You can also install snapd from Terminal by running the following two commands

At the end of the installation, log out and log back in or restart your system to ensure that the snap paths are properly updated.

sudo apt update
sudo apt install snapd

More information here

On Debian 9 (Stretch) and Debian 10 (Buster), snap can be installed directly from the command line:

sudo apt update
sudo apt install snapd

If the sudo command is not installed (usually because a root password was provided during installation), you can install snap by switching to the root account first:

su root
apt update
apt install snapd

Log out and log back in, or restart your system to make sure the snap paths are properly updated. After that, install the snapd corecomponent in order to get the latest snapd version.

sudo snap install core
core 16-2.45.2 from Canonical✓ installed

More information here

Snap can be installed on a Raspberry Pi running the latest Raspberry Pi OS version from the Terminal by executing the commands

sudo apt update
sudo apt install snapd

You will also need to restart the Raspberry Pi by executing the command (be careful to save your documents before executing the command

sudo reboot

After that, install the snapd corecomponent in order to get the latest snapd version.

sudo snap install core
core 16-2.45.2 from Canonical✓ installed

Note. Some snaps require new snapd features and will show an error like snap “lxd” assumes unsupported features “during install. You can resolve this problem by ensuring that the main snap-in is installed (snap install core) and that ‘this is the latest version (snap refresh core).

To test your system, install the hello-world snap and make sure it is working properly

snap install hello-world
hello-world 6.3 from Canonical✓ installed

More information here

In case of installation problem on your Linux distribution, go to this page of the snapcraft documentation.

Install Hassio, Home Assistant, Configurator, HACS snaps

There are (currently) two Home Assistant snaps. You have to install the snaps developed by Joachim Marthinsen Giæver.

I advise you to install the 3 snaps to have a Top configuration.

I suggest that you install the 3 snaps from the Terminal on command line because you will need to enter some parameters during the installation anyway. Note, however, that the 3 Joachim snaps can also be installed from

Click on the magnifying glass and type Home Assistant in the search field to find them.

ubuntu software manager snap home assistant

1 home-assistant-snap the Core of the home assistant home automation server

snap install home-assistant-snap

Upon completion of the installation, Home Assistant starts up as a service. Access to the HTML interface is accessible from a browser at the address IP_UBUNTU: 8123

Once you have created your user account, go to Configuration -> Info to retrieve the path to the Home Assistant configuration.yaml file .

Usually, Home Assistant configuration files and scripts are stored in the /var/snap/home-assistant-snap/101/ folder.

home assistant info path configuration yaml file snap find

2 home-assistant-configurator

The configurator (former File Editor) allows you to modify all configuration files and scripts without leaving the Home Assistant interface

Read Also
Home Assistant. Essential plugins to install. Samba, HACS, File Editor, MQTT Mosquitto
snap install home-assistant-configurator

The two snaps are automatically connected to each other. To check it, run

snap connections

If all went well you should find the following line in the list

content[configurations]   home-assistant-configurator:configurations  home-assistant-snap:configurations

snap home assistant hassio ubuntu linux snapd

If this is not the case, we manually connect the snaps by executing the command

snap connect home-assistant-configurator:configurations home-assistant-snap:configurations

Open the configuration.yaml file

nano /var/snap/home-assistant-snap/101/configuration.yaml

and add the following lines by changing IP_HASSIO to the IP address of your Ubuntu virtual machine on the Synology NAS. Notes:

  • Enter the domain name or IP address only. localhost does not work because Home Assistant integrates the HTML page of the configurator as an iframe.
  • If you have enabled HTTPS support on Home Assistant, you can enter https in the url, otherwise the configurator page will not be accessible
    title: Configurator
    icon: mdi:wrench
    url: http://IP_HASSIO:3218

Save the modification with Ctrl + X (then Y) then restart Home Assistant

sudo snap restart home-assistant-snap

You now have access to all HomeAssistant scripts and YAML files

home assistant configurator snapd ubuntu

3 HACS allows you to install many additional themes and plugins directly from the Home Assistant interface.

The installation of HACS is super simplified using the Joachim snap.

Read Also
Home Assistant Community Store (HACS), easily install themes and components

Run this command to install the HACS snap

sudo snap install home-assistant-hacs

At the end of the installation, restart the server

sudo snap restart home-assistant-snap

Wait for Home Assistant to restart then go to Configuration -> Integration -> + Add integration .

home assistant new integration

Find HACS in the search field and click on the line

home assistant integration hacs

Check to accept all terms of use

hacs accept all condition

You will need a GitHub account (free) to access HACS repositories.

  • hacs activate github 1
  • hacs activate github 2
  • hacs activate github 3
  • hacs activate github 4

Finish by clicking on submit . If everything is correct, you should get a success message. You can associate HACS with a part but it is not mandatory. Finally click on Finish

hacs installe home assistant

You can now add new plugins and themes.

hacs add repository theme home assistant

Read this article to learn more about HACS

Update Home Assistant

For the moment, there is no snap allowing to add the Supervisor which would allow updating Home Assistant from the HTML interface.

The only thing you can do is install the candidate version like this.

Stop the service

sudo snap stop home-assistant-snap

Refresh (update) by adding the –candidate option

sudo snap refresh home-assistant-snap --candidate

Then we restart the server

sudo snap start home-assistant-snap

Some useful commands to manage your snaps

Here are some useful commands

List installed snaps

Stop a snap

sudo snap stop snap_name

All other orders

  • Basic functions: find, info, install, remove, list
  • Advanced: refresh, revert, switch, disable, enable, create-cohort
  • History: changes, tasks, abort, watch
  • Services : services, start, stop, restart, logs
  • Permissions : connections, interface, connect, disconnect
  • Configuration: get, set, unset, wait
  • Aliases : alias, aliases, unalias, prefer
  • User account: login, logout, whoami
  • Snapshots : saved, save, check-snapshot, restore, forget
  • Device : model, reboot, recovery
  • Other: warnings, okay, known, ack, version
  • Development: download, pack, run, try


2021/01/19 Publication of the tutorial

Thanks for reading

Click to rate this post!
[Total: 0 Average: 0]

Thanks for your reading

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
We will be happy to hear your thoughts

      Leave a Reply

      Read more
      Recent posts on the Forum
      Top offers
      DIY Projects
      DIY Projects