Relay Last verified:

Run Relay on Synology or QNAP

Run Viaalink Relay on a Synology NAS with Container Manager or a QNAP NAS with Container Station, using the Docker Compose setup.

Overview

There is no Viaalink Relay package for Synology or QNAP. On these NAS models you run the Viaalink Relay container image with the NAS’s own Docker app: Container Manager on Synology, Container Station on QNAP. You use the same Docker Compose setup as in Run Relay with Docker.

The container image (viaalink/relay) is published with the first release — ask contact@viaalink.com for early access.

Requirements

  • A NAS with an x86-64 (amd64) or ARM64 processor. The image is built for amd64 and arm64 only; NAS models with a 32-bit ARM processor cannot run it.
  • Synology: DSM with the Container Manager package installed from Package Center.
  • QNAP: QTS or QuTS hero with Container Station installed from App Center.
  • A domain you control with wildcard DNS (see DNS Configuration).
  • At least 128 MB of free RAM (256 MB recommended).

1. Prepare a folder on the NAS

Create a shared folder for the Relay, for example docker/viaalink-relay, with these subfolders:

text

Put the files from Run Relay with Docker in the viaalink-relay folder: docker-compose.yml, Dockerfile.caddy, Caddyfile, and data/config.yml.

2. Free up ports 80 and 443

DSM and QTS use ports 80 and 443 for their own web interfaces, so Caddy cannot take them on the NAS. Change the host side of Caddy’s port mapping in docker-compose.yml, for example:

yaml

On your router, forward external port 80 to NAS port 8880 and external port 443 to NAS port 8843. Forward 2222/tcp to the NAS as well, and — if you enable calls through firewalls — 3478/udp and 49152–49167/udp. See Requirements and Network Architecture.

3. Optional: give the container the NAS’s machine id

A Relay can read the host’s machine id, which identifies the installation for license activation. A container does not see the host’s id unless you mount it. Add this line under volumes: of the relay service:

yaml

Some NAS systems do not have /etc/machine-id. Check first (over SSH: ls -l /etc/machine-id). If the file does not exist, leave the line out: Docker would otherwise create an empty folder at that path on the NAS instead of mounting a file. Ask contact@viaalink.com if your NAS has no machine id.

4a. Synology: Container Manager

  1. Open Container Manager and go to Project.
  2. Click Create, give the project a name (for example viaalink-relay), and set Path to the viaalink-relay folder.
  3. Choose to use the existing docker-compose.yml in that folder, review the settings, and finish the wizard. Container Manager builds the Caddy image and starts both containers.
  4. Open the project’s Log (or the viaalink-relay container’s log) to find the setup link with the setup code. The code is also written to data/license/setup-token.txt.

4b. QNAP: Container Station

  1. Open Container Station and go to Applications.
  2. Click Create, name the application (for example viaalink-relay), and paste the contents of your docker-compose.yml.
  3. Relative paths such as ./data/keys are not guaranteed to point at your shared folder when you paste the file. Replace each ./data/..., ./Caddyfile and the build context: . with the absolute path of your viaalink-relay folder (on QNAP shared folders live under /share/, for example /share/Container/viaalink-relay/data/keys).
  4. Click Create. Open the viaalink-relay container’s log to find the setup link, or read data/license/setup-token.txt.

5. Open the setup dashboard

With DNS and router forwarding in place, open:

text

Settings that need a restart (ports, domain, HTTPS, IP and country rules) make the Relay stop itself; the restart: unless-stopped policy in the Compose file starts it again within seconds.

Updating

Pull the new viaalink/relay image and recreate the containers from your NAS’s Docker app (rebuild the project in Container Manager, recreate the application in Container Station). Your data/ folder is kept, including host keys, approved keys, and the license.

Next steps