How to deploy Home Assistant using Synpse

Published on August 22, 21

Synpse is an end-to-end platform to manage your device fleet that can grow to hundreds of thousands of devices, perform OTA software updates, collect metrics, logs, deploy your containerized applications and facilitate tunnel-based SSH access to any of your device. You can find a Quick Start here .


This article assumes you already have a Synpse enabled device running. If not, please read article How to install Synpse Home Assistant is leading opensource project to build smart homes and more. So it is not a coincidence we will cover how to deploy it first :)

You can find quite a few examples in our public Github repository

Overall you can deploy anything to Synpse as long as you have a working Docker image.

###Create an application

Create an application using UI and wait for it to be deployed:

Create an application
Create an application

Home assistant deployment as a yaml file looks like this: This example uses amd64 image. If you are using arm64 device and OS, you will need to change image to docker.io/homeassistant/raspberrypi4-homeassistant:stable

Example bellow will run this on all available devices, but you can also run it on a specific device. See Scheduling. In addition, we map container port 8123 to host port 9999

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
name: homeassistant
description: Home assistant
scheduling:
  # Schedule on all available devices
  type: AllDevices
spec:
  containers:
  - name: homeassistant
    image: docker.io/homeassistant/home-assistant:stable
    ports:
    - 9999:8123
    volumes:
    - /usr/homeassistant:/config
    - /etc/localtime:/etc/localtime

Go into Allocations page to see the status of your application:

Configure the CLI
Configure the CLI

Once the application is running, you can access it using Synpse CLI or just a browser if a device is in your local network: http://<your_device_ip>:9999, where <your_device_ip> can be found in Devices page.

Configure the CLI
Configure the CLI

If you want to access a device from your local machine from anywhere in the world, you can use Synpse CLI.

Access application via CLI

To access the application via CLI, first you will need CLI to be installed on your device.

  1. Press CLI in the top left corner of the Synpse cloud and choose appropriate platform.
  2. Install Synpse CLI on your device.

Install CLI
Install CLI

  1. Create Access Key for CLI usage and configure CLI to use it

Configure CLI
Configure CLI

once you are done, you can access your application using Synpse CLI:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
$ synpse ps
  NAME           NAMESPACE  SCHEDULING  VERSION  DESCRIPTION    CREATED
  homeassistant  default    alldevices  3        Homeassistant  1 day ago

$ synpse device ps
  NAME                STATUS  IP              OS      LABELS  LAST SEEN       CREATED
  admiring-matsumoto  online  192.168.178.95  Fedora          17 seconds ago  1 day ago

# access application using synpse port forward
synpse device proxy admiring-matsumoto --port 10000:9999
forwarding port (local->remote) 10000 -> 9999

You should be able to access your application from your local machine using http://localhost:10000

Proxy to localhost
Proxy to localhost

###./wrap_up

In this short tutorial we have shown how to deploy Home Assistant and access it. The next steps for you could be looking into how to work with hardware devices and install various HA addons. If you have any questions or suggestions, feel free to start a new discussion in our forum.