This page is in English — onze technische documentatie voor ontwikkelaars en beheerders is in het Engels.

Relay Laatst gecontroleerd:

Lesson: give someone their own device

Let someone else put their laptop on your Viaalink Relay: make a join code with their label, choose how their app names look, send them the command, and revoke codes nobody used. The text of the film 'Give someone their own device'.

Bekijk de film op YouTube (Engels) (3:08) Opent YouTube in een nieuw tabblad.

After this lesson someone else’s laptop (here Anna’s) is on your Relay, and every app she publishes gets a name of her own, such as notes-anna.

You need a Viaalink Relay on its own domain, with its dashboard at https://<your domain>/_relay/dashboard, and Anna needs the Viaalink CLI (via) on her laptop. Lesson: your first device online shows how to install it.

Why a suffix

Your Relay only lets in devices it knows. A join code lets one new device register itself, and it works once.

Anna and Ben both call their app notes. Your Relay has one domain, and a name exists only once on it. A suffix adds the person’s label to every name they publish: notes-anna and notes-ben.

1. Make a join code

In your dashboard, open People, then the Join codes tab.

  1. Label: Anna. The suffix comes from this label.
  2. Valid for: 15 minutes by default. Anna is not at her computer yet, so choose 24 hours (or 7 days).
  3. Names: leave it on End in a suffix (the other choice is Short).
  4. Suffix: leave it on Their name, so notes becomes notes-anna. The other choices are a random code or a value you type.

Click New join code. The code is shown only this once, so click Copy command now.

2. Send it to Anna

Send that command to Anna in a private message. Anyone who has it can register a device until it runs out or is used, so keep it private.

3. Anna adds her laptop

On her laptop, Anna pastes the command into a terminal. It has this shape:

bash

The link stays in single quotes, because it contains a #. When she presses Enter, her laptop makes a key of its own and registers it with your Relay.

4. Anna publishes an app

With an app running on her laptop (here on port 9000), Anna publishes it under the name notes:

bash

The Published: line shows notes-anna on your own domain.

5. See her device and her row

  • Under Devices, her laptop stands under Anna, with the name notes-anna.
  • Under People › Users, Anna has a row of her own, and her names end in -anna. You can change her Names setting there later; names her device already holds stay until it reconnects.

6. Revoke codes nobody used

Under People › Join codes, Anna’s code reads used. A code you made earlier for Ben was never used. While it is valid it can still add a device, so click Revoke on its row; it stops working at once.

Your turn

Make a join code for someone you trust, and watch their device arrive.

Check yourself

Tom gets a join code with the label Tom, and he publishes notes too. What will his address be?

notes-tom on your domain: the suffix comes from his label.

Read on