Skip to content
← Guide

Connect your machines

One join code per machine, and what each one can publish.

Join the first machine

When it installed, the server printed the line for the first machine. If you lost it or want to add another one, ask for a new one. A code nobody uses for 7 days stops working: asking again for the code of a machine that never joined gives it a new one, with the same settings.

On the VPS

sudo lnkstart server join-code laptop

On your machine

curl -fsSL https://lnkstart.com/install.sh | sh -s -- join LD1.xxxxx app=3000

It installs LnkStart, joins the machine (checking first that the server takes the code), publishes app.<domain> from its port 3000 and leaves it as a service that starts with the computer; on Linux it asks for sudo for that. Change app=3000 to your app's name and port. The code contains the server address and the credential for that machine: share it only with it, and it expires if unused for 7 days. With LnkStart already installed, the same is lnkstart join LD1.xxxxx app=3000 --install.

Join it without copying the code

With the server's console on, the machine can ask to join and you approve it from the browser: nothing long to copy from one terminal to another.

On your machine

curl -fsSL https://lnkstart.com/install.sh | sh -s -- join lnk.tunnels.midominio.com app=3000

It shows a short code (like KQ7M-4PXA) and a link to the console, and waits up to 10 minutes. In the console, open the link or type the code in Machines, give it a name and approve it: the machine gets its join code and carries on by itself, as with the code. Approve it only if the code you see is the one on your screen. With LnkStart already installed, the same is lnkstart join lnk.tunnels.midominio.com app=3000 --install.

Make new machines wait for your approval

If you give codes to other people (technicians, clients), you can make a new machine publish nothing until you accept it: in the console, Settings → New machines. When it first connects, it shows up in Machines with its computer and the address it comes from, and you accept or revoke it. One that was already publishing is not cut off.

On the VPS

sudo lnkstart server token approve office

The same from the terminal. sudo lnkstart server token list says which ones are waiting.

Publish and keep it running

On your machine

lnkstart add app=3000
lnkstart add api=8080 --app web
sudo lnkstart install
lnkstart list

add saves it to services.toml and reserves the name on the server; --app groups it. It is served as soon as this machine runs the agent: install keeps it as a service that starts with the system (on Linux, sudo lnkstart install, which runs as you and does not stop when you log out; on macOS, without sudo). list shows the apps.

On your machine

lnkstart up
lnkstart up web
lnkstart down web
lnkstart app=3000
lnkstart remove app
lnkstart uninstall

up publishes what is saved without installing anything; up and down take the name of an app or a service; the fourth form publishes something loose while you keep it open.

With a .deb or .rpm package

On Debian, Ubuntu, Raspberry Pi OS, Fedora or RHEL, the binary also installs as a package. It only puts /usr/bin/lnkstart in place: sudo lnkstart install sets up the service, as on any Linux. Swap x86_64 for aarch64 on 64-bit ARM, or for armv7 on a Raspberry Pi running a 32-bit system.

On your machine

curl -fsSLO https://lnkstart.com/releases/latest/lnkstart-linux-x86_64.deb
sudo apt install ./lnkstart-linux-x86_64.deb

On Fedora or RHEL, the .rpm with sudo dnf install. The packages are in each release's signed SHA256SUMS. Then lnkstart join <code> app=3000 --install, which joins, publishes and keeps it running as a service.

On a NAS or with Docker

The lnkstart/lnkstart image carries only the binary, for amd64, arm64 and armv7, and does not run as root. It uses the host's network (--network host), so that 127.0.0.1 is the machine itself, and keeps its configuration in a volume mounted at /config.

On the NAS

docker run --rm -v lnkstart:/config lnkstart/lnkstart join LD1.xxxxx
docker run --rm -v lnkstart:/config --network host lnkstart/lnkstart add app=3000
docker run -d --name lnkstart --restart unless-stopped -v lnkstart:/config --network host lnkstart/lnkstart

The first two join and save; the third keeps it publishing and brings it back after a reboot. To add or remove something later, another docker run --rm with add or remove, then docker restart lnkstart. On Synology, Container Manager finds it by searching for lnkstart in the registry: give it the host's network and a volume at /config.

Limit what a machine can publish

On the VPS

sudo lnkstart server join-code office --names nas,cameras
sudo lnkstart server join-code intern --names 'dev-*'

Without --names, that machine can publish any free name.

A name belongs to the machine that published it, and to those you created «like» it (in «Multiple machines for the same thing»): no other code can take it away.

See and remove machines

On the VPS

sudo lnkstart server token list
sudo lnkstart server token revoke office
sudo lnkstart server services list

token list says which one is connected, which one waits for your approval and when an unused code expires. When you revoke, that machine is out in less than 30 seconds.

Remove LnkStart from a machine

On your machine

lnkstart uninstall
rm -r ~/.config/lnkstart
rm "$(command -v lnkstart)"

Removes the service, what it saved (the server, its credential and services.toml) and the binary. If you installed it with sudo, put sudo before the first and last lines.

Its credential stays valid on the server until you revoke it (above): do so if you won't join it again.

See what is going on right now

On the VPS

sudo lnkstart server status

Which services exist, which machine serves each one, over which transport and for how long, how many visits are in flight, and how long the licence has left. DOWN means visitors do not see the app: either no machine is there, or it is and the app does not answer, and the line says which. If the server is stopped it says so on the first line instead of showing stale numbers.

Check what you download

On your machine

lnkstart verify-release --manifest SHA256SUMS

Every release ships a signed SHA256SUMS. Download SHA256SUMS and SHA256SUMS.sig into the same folder and run this there; with --file and the name of the binary you downloaded, it checks its checksum too. The installer checks the signature on its own before installing: with the LnkStart you already have or, the first time, with OpenSSL (the one on macOS cannot, and there it stops at the checksum).