Viaalink Relay installeren met Docker
Draai Viaalink Relay in Docker op je eigen Linux-server in vijf stappen en meld je aan op het dashboard. In de les staat elk commando en bestand uit de film, klaar om te kopiëren.
- Duur
- 4:21
- Gepubliceerd
- Taal
- Engels
Uitgeschreven tekst (Engels)
Step one. Check two things. Docker Compose answers with its version. And the server has a machine ID. Your license will be tied to it, so the Relay needs to read it. Step two. Make a folder for the Relay, with a data folder and four folders in it. The Relay does not make all of them itself. Then write compose.yaml. The image is pinned to one version, so an update is always your choice. Host networking lets the Relay listen on the server's own ports, and you change a port later without touching this file.
The data folder keeps keys, license and settings when the container is replaced. The last line lets the Relay read the machine ID. Save the file, and close nano: Ctrl+O, Enter, Ctrl+X. Then the Relay's settings, in data/config.yml. Devices connect on 2222, web traffic uses 80 and 443. Each port has a colon in front, so the Relay listens on every address, not only inside the server. This line accepts Let's Encrypt's terms, so each name gets its own certificate.
Save the file, and close nano. Last, give the Relay a setup code of your own. Without one, it makes a new code every time it starts, and you would chase it after each restart. Step three. Start it, and look at the status. Restarting means it does not stay up. The log says why: address already in use. Another program already holds port 80. This command, ss, shows which program it is. Here, an old web server. Stop that program, or give the Relay other ports in its config. Then restart the Relay, and now it stays up.
Step four. Sign in through an SSH (secure shell) tunnel from your own computer. Your server has no certificate yet, and this way the setup code never crosses the internet unencrypted. Open the dashboard on the tunnel's local port: localhost, port 8081. The page tells you where the code is: in setup-token.txt, next to the license. It is the code you wrote in step two. Copy only the code, paste it, and press Continue. This browser now stays signed in for 30 days.
It opens on the license: without one, the Relay runs for 14 days. Step five. Open the ports: 2222 for devices, 80 and 443 for web traffic, and 3478 UDP for calls through firewalls. This server uses UFW. Because the Relay uses host networking, these rules apply to it. If your hosting provider has a firewall of its own, open them there too. On the Overview, Needs attention lists what is still missing: a domain with its DNS record and its certificate.
You set those up next. To recap. One: Docker Compose and a machine I D. Two: compose dot yaml, the Relay's config, and a setup code of your own. Three: start it, and read the log if it does not stay up. Four: sign in through a secure shell tunnel. Five: open the ports. A question to check yourself. Docker says Restarting. Where do you look first? Pause the film if you like. In the log: docker compose logs relay. It names the reason, such as a port that is already in use.