Brewblox install on a Synology NAS offical guide

I’m creating a new topic for instructions to install Brewblox on a Synology NAS so I can keep this post up-to-date with the latest instructions.

Here are my notes from my latest install:

  1. Docker
    Install docker from the package center.

  2. Official python3 package
    Install python3 package from the official synology packages. This is needed for wheels

  3. Unofficial newer python 3 package
    Download the latest python 3.6 here: https://synocommunity.com/package/python3. The official python 3 package is too old.
    To install the downloaded file, click ‘Manual Install’ in the package center (top right)

  4. Log in via SSH, using the same username/password that you use to log into the web interface. If SSH is not enabled, go to DSM > Control Panel > Terminal & SNMP > Terminal , and tick Enable SSH service

  5. Alias for python3
    Create an alias for python3 in ~/.bashrc, so you’ll always use this newer package. The path for your installed package might be different, please verify it.
    echo "alias python3=/volume1/@appstore/python3/bin/python3" >> .bashrc
    Reload .bashrc:
    source ~/.bashrc
    Now test whether it works:
    python3 --version

  6. Upgrade pip
    python3 -m pip install --user --upgrade pip

  7. Install brewblox-ctl
    python3 -m pip install --user --upgrade brewblox-ctl

  8. Create an alias for brewblox-ctl
    echo "alias brewblox-ctl=\"python3 -m brewblox_ctl\"" >> ~/.bashrc
    and reload .bashrc again.
    source ~/.bashrc

  9. Install brewblox:
    brewblox-ctl install --no-docker-user --no-reboot

This post is a Wiki. You can welcome to improve the instructions while you try them!

2 Likes

I think for most people with smaller sized Synology servers this will be volume1.

Yes probably. I’ll make that the default. I have a 4 bay NAS, don’t know why it is volume2 for me.

Hi, how do you get from step 3 to step 4? I’ve got docker running (synology DS218+), and have installed python3 as well as the manual update for v3.5.6-8 (they both show as installed in package center). Should I be using the “brewblox/brewblox-service” container (from registry) within Docker to enter to commands listed (via the terminal tab in the container details)?

(please excuse my complete lack of linux/docker knowledge, I managed to get brewpi running on a raspberry pi but that’s about the extent of my abilities…)

Just run the commands listed under step 4?

Brewblox service is a base image for development, it is unrelated to installing and not for end users.

How do I run these commands? That’s where I’m lost…do I need to run them in a docker container? If so, which one? Or should I be using putty from windows to log into DSM with root permission via SSH
and run there?

The second. You’ll want to run commands in an SSH session.

Ok, Thanks! That’s the part I was missing…will try again tonight

so I made it all the way to the last step before I hit a snag:

root@Unicron:~# echo “alias brewblox-ctl=“python3 -m brewblox_ctl”” >> ~/.bashrc
root@Unicron:~# brewblox-ctl install --no-docker-user --no-reboot
-ash: brewblox-ctl: command not found

(the back slashes are actually there for the echo command, they are just not showing up in comment?)

I also just realized that I have python 3.5.6-8 installed (via the synology package center), not 3.6 from step 3. Clicking the link provided above takes me to a web page that does not appear to have any downloadable file for python3.6.8-9, how do I download the updated python version?

Noticed this warning after step 6:
WARNING: The script dotenv is installed in ‘/root/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

This warning was repeated for chardetect, jsonschema, distro, docker-compose, and brewblox-ctl scripts

Update: figured out how to add /root/.local/bin to the $PATH and I think the brewblox-ctl script now starts but returns “brewblox-ctl should not be run as root”

I think I know where I went wrong in logging into root…can/should I delete or otherwise worry about what has been done?

It is better to login as your normal user, not root. Sorry I read over that.
It also seems that the instructions are missing source ~/.bashrc after creating this alias to reload the bash config.

I still run brewblox on a raspberry pi. But I have a synology NAS and I am thinking of installing brewblox on the NAS. The only thing thats holding me back is that I now have a Tilt which uses the bleutooth of the raspberry pi. So is it possible to log the tilt data via a usb bleutooth dongle connected to the NAS?

It may require some additional packages, but running BT om the NAS should work.
An alternative is to only run the Tilt service on the Pi, and let it publish data to Brewblox on the NAS.

I think running the Tilt service on a separate device will be the more likely option. I’m not sure how compatible the synology NAS OS’s bluetooth stack will be with the current Tilt service implementation.

FWIW: I cannot get the tilt service run on ubuntu 20.04 with a Plugable BT USB device. The problem seems to be the ibeacon format that the Tilt is sending.

@Bob_Steers: How do I publish the Tilt data from raspberry to Brewblox on the ubuntu?

On the Pi, create a docker-compose.yml file (outside any existing brewblox dir), with only the tilt in it:

version: "3.7"
services:
  tilt:
    image: j616s/brewblox-tilt:latest
    restart: unless-stopped
    privileged: true
    depends_on:
      - history
    network_mode: host
    command: -p 5001 --eventbus-host=UBUNTU_ADDRESS
    volumes:
      - ./tilt:/share

Start/stop with docker-compose up -d / docker-compose down.

Currently there is a fermentrack image on that pi.The pi is only used to get data from the Tilt.

So, I create a fresh brewblox install on the Tilt pi, (without Spark service), with the above docker-compose.yml file? Why can’t the docker-compose.yml reside in the brewblox dir?

If you’re only running that forwarding Tilt, you don’t need a brewblox dir at all.
You can still run brewblox-ctl install as a convenient way to install docker / docker-compose.
Afterwards, just remove the brewblox dir without running brewblox-ctl setup.

@Bob_Steers: I get an error on history service:

ERROR: Service 'tilt' depends on service 'history' which is undefined.

Looks like copy-paste error on my side. The depends_on: shouldn’t be there.

version: "3.7"
services:
  tilt:
    image: j616s/brewblox-tilt:latest
    restart: unless-stopped
    privileged: true
    network_mode: host
    command: -p 5001 --eventbus-host=UBUNTU_ADDRESS
    volumes:
      - ./tilt:/share

should the tilt service in the docker-compose.yml on the ubuntu machine stay or should it be removed there?