Docs / Communities / Your own community server

Your own community server

A community server lets your contacts reach you over the internet when nobody is nearby. You run it yourself, on a home PC or a server you control, for a household, a small team or anyone else you choose to invite.

Markdown source Windows and Linux
A home computer linked by dotted lines to phones at a beach, a bus stop and a desk

If you only want to reach people, you don't need to run a server. Isolink runs a free community at isolink.app that anyone can join from the app. See The isolink.app community. This page is for running a server of your own.

How it works

Each of your devices keeps one connection open to the server. It is a WebSocket over TLS, at /v1/relay under the server's address. Isolink tries Wi-Fi and Bluetooth first. It uses the server when nothing nearby works.

The server can also run chat bots, keep a card library, hold members' encrypted backups, and host News and forums. When it is hosted with push credentials, it can wake phones instead of keeping them connected. Each is described below.

What you need

You don't need a domain of your own, a certificate or port 80. The server makes its own certificate, and invites carry its fingerprint. For a certificate browsers trust, so passkeys work on the admin page, add a free one from Let's Encrypt at any time with isolink-relay certs. See Let's Encrypt.

Where things live

WhatWindowsLinux
ProgramC:\Program Files\IsolinkRelay/usr/local/lib/isolink-relay/isolink-relay
The isolink-relay commandThe same folder, added to PATH/usr/local/bin/isolink-relay
Data folderC:\ProgramData\IsolinkRelay/var/lib/isolink-relay
Settings filerelay.json in the data folderrelay.json in the data folder
Serviceisolink-relay, run by WinSWisolink-relay.service, run by systemd
Runs asLocalSystemThe isolink-relay system user
LogsThe program folder, next to isolink-relay-service.exejournalctl -u isolink-relay

The server listens on every network address of the machine, on the one port you choose.

Give another data folder with --data, or with the ISOLINK_RELAY_DATA environment variable. Without either, a server you run by hand on Linux uses /var/lib/isolink-relay as root. As any other user, it uses $XDG_DATA_HOME/isolink-relay, or ~/.local/share/isolink-relay. On Windows it always uses %ProgramData%\IsolinkRelay.

Install on Windows

  1. Open an administrator PowerShell: right-click Start and choose Terminal (Admin).
  2. Install it. This downloads the latest version from isolink.app and checks it against the release's SHA-256 checksum. It installs it in C:\Program Files\IsolinkRelay as a Windows service that starts with Windows. It lets isolink-relay.exe through the firewall and adds the folder to PATH.
irm https://isolink.app/relay/install.ps1 | iex
  1. Set it up. It asks a few questions, restarts the service and offers your first invite. Then join from the app.
isolink-relay setup
  1. On your router, forward TCP port 8443 to this PC. Look for "Port forwarding" or "Virtual servers" in the router's settings.

Run every isolink-relay command in an administrator PowerShell. Running the install command again updates the server in place and starts the service.

Install it by hand instead

Download the Windows zip above and unzip it. Move the folder inside it somewhere it can stay. Keep isolink-relay.exe, isolink-relay-service.exe and isolink-relay-service.xml together. In an administrator PowerShell in that folder, run:

.\isolink-relay.exe init --url https://yourname.tplinkdns.com:8443 --name "Our house"
.\isolink-relay-service.exe install
.\isolink-relay-service.exe start
New-NetFirewallRule -DisplayName "Isolink relay" -Direction Inbound -Protocol TCP -LocalPort 8443 -Action Allow
.\isolink-relay.exe invite --admin --name "Your name"

isolink-relay-service.exe is WinSW. It also takes stop, restart, status and uninstall.

Install on Linux

  1. Install it. This checks for x86_64 and systemd, downloads the latest version and checks its SHA-256 checksum. It adds the isolink-relay command, an isolink-relay system user with its data folder, and a systemd service.
curl -fsSL https://isolink.app/relay/install.sh | sudo sh
  1. Set it up. It asks a few questions, then enables and starts the service. The service starts again on every boot.
isolink-relay setup
  1. Forward TCP port 8443 on your router to this machine. If the machine runs a firewall, allow the port there too, for example with sudo ufw allow 8443/tcp.

The isolink-relay command runs the server program as the isolink-relay user, on /var/lib/isolink-relay. It asks for your password with sudo when it needs to. isolink-relay update runs as root, because it replaces the program.

The service is locked down. It can write only its data folder, and it can't see /home. It may listen on a port below 1024, such as 443.

Install it by hand instead

Download the Linux tarball above, then:

tar xzf isolink-relay-*-linux-x86_64.tar.gz
sudo ./isolink-relay-*-linux-x86_64/install.sh

Running install.sh on a server that is already set up updates it and restarts the service.

Your own service manager

The install scripts set up systemd or WinSW for you. If you run the server under something else, such as a container, it must run isolink-relay serve. The bare command only prints the help. Give a container a restart policy, such as --restart unless-stopped, so a restart from the app or isolink-relay restart brings it back.

To let admins restart the server from the app, set ISOLINK_RELAY_SERVICE to any value in the server's environment. Your service manager must then start it again when it exits with an error. To restart, the server exits with code 75.

Set it up

isolink-relay setup asks these questions. Press Enter to take the answer in brackets. Run it again at any time to change the answers.

QuestionWhat to give
The address devices use: your dynamic DNS name or domainFor example yourname.tplinkdns.com.
The port forwarded to this machineThe default is 8443. The server listens on this port, and devices connect to it.
A name for the server, such as Our houseShown with invites and in the app. Optional. Without one, devices show the address.
A line about it for members (Enter for none)Up to 280 characters.
Set up a certificate now (or Change it now)Optional: Enter skips it. A new server then makes a self-signed certificate, and a server set up before keeps the one it has. Answer y for the same guide as isolink-relay certs: Let's Encrypt, self-signed, your own files, or none behind a proxy.
Who else may use it, as a guest, to reach membersAnyone with Isolink (open), only people you allow (allowlist), or members only (members).

Then it saves the answers and starts or restarts the service. Last, it offers an invite. While the server has no owner, that invite makes whoever joins with it an owner. It works once, for 3 days.

When the address stays the same and you leave the certificate alone, setup keeps it. Invites already sent keep working.

A new address means a new certificate. Every invite already sent stops working, and every member needs a new invite.

init: the same set-up as flags

init takes the main answers as flags, for scripts. It doesn't set the description or the guest policy. Set those with profile and config.

FlagWhat it does
--url https://…Required. The address devices use, with its port, such as https://yourname.tplinkdns.com:8443.
--port NThe port to listen on. The default is the URL's port, or 8443. Use it when the router forwards a different outside port.
--name NA name for the server, shown with invites.
--cert F --key FYour own certificate and key, as PEM files. Both are needed. They must load, or init stops.
--plainPlain HTTP, behind a proxy that does TLS. See Certificates and proxies.
--acmeA certificate from Let's Encrypt, which the server gets and renews itself. See Let's Encrypt.
--acme-http-port NWith --acme: the port on this machine that port 80 on your router reaches. The default is 80.
--acme-dns-hook FWith --acme: prove the name with a DNS TXT record, set by this program, instead of over port 80.
--acme-email EWith --acme: an address Let's Encrypt can reach you at.
--acme-directory UWith --acme: another ACME certificate authority, or staging for Let's Encrypt's staging service, to try things without its rate limits.
--forceReplaces an existing set-up. Members are kept.
isolink-relay init --url https://yourname.tplinkdns.com:8443 --name "Our house"
isolink-relay invite --admin --name "Your name"

On Linux, the isolink-relay command starts the service after init and setup. On Windows, setup restarts the service, and init doesn't.

init --force always makes a new self-signed certificate, even for the same address. Every member then needs a new invite. To keep the certificate, use setup.

Join from the app

invite prints a QR code in the terminal, and a code starting isolink-relay: below it.

  1. In Isolink, go to You → Communities.
  2. Tap Scan a code and point the camera at the QR code. Or tap Paste an invite and paste the code.
  3. After a moment the server shows as Connected.

One invite covers one person. Their other linked devices, such as a laptop, join on their own. Your contacts learn about your community the next time you're connected to them, nearby or over the internet.

You → Communities lists each server you belong to, whether you're connected, and your role. About this community shows who runs it, its version, who may be a guest, how long it keeps messages and how much space you use. A server that wakes the device by push shows as Asleep · wakes by push while the app is in the background.

The same screen also offers the isolink.app community, when it is taking new members. Members can belong to your community and to isolink.app at once.

Members and guests

Invites

Make one invite per person, for example invite --name "Alex". Send it to them, or let them scan it. Each invite works once, for one person and all of their devices. It expires after 3 days. Change that with --days.

The name on the invite becomes the member's name on the server. Without one, the server takes the name from their device.

invites lists the invites nobody has used yet. revoke <id> cancels one. Members with the invite right make invites from the app too, for 1 to 30 days.

An invite shared from the app or the admin page is also a link on the server's own address, such as https://myrouter.tplinkdns.com:8443/join/…. It opens a join page with Open in Isolink, the invite's QR code and how to get the app, or says the invite was used or has expired. The app takes the link in a chat, with Paste an invite, or by scanning it with Scan a code, which reads every kind of Isolink code.

Everyone's messages stay their own. Members can't read each other's messages, and neither can whoever runs the server. Bots and the card library are the exceptions: see Privacy.

Removing someone

remove <account> removes a member. The start of their account id is enough. members lists the ids.

Removing a member deletes every message held for their devices, and their backup on the server. A member who taps Leave this community in the app loses the same.

A removed member's devices become guests. They can still connect if the guest policy lets them in.

Who may connect as a guest

Members' devices always connect. The guests setting decides who else may.

ValueWho connects
open (default)Any Isolink device. Guests can only reach members, or leave mail for them.
membersMembers' own devices only.
allowlistMembers, plus the accounts and devices on the allow list.

The server checks this when a device signs in, after the device has proved its account and device ids with its keys. A refused device gets members only or not on the allow list. The server logs its ids.

Change the policy with isolink-relay config set guests members, then restart the server. From the app, it counts at once.

The allow list

isolink-relay config set guests allowlist
isolink-relay allow 3f9a2c --name "Sam"          # an account: all its devices
isolink-relay allow --device 81be07 --name "Sam's phone"   # one device only
isolink-relay allowed                            # the list, and guests refused lately
isolink-relay disallow 3f9a2c

The start of an id is enough when the server knows it: a member's account or device, or a guest refused in the last week. Otherwise give the whole 32-character id. To find someone's ids, ask them to try connecting once, then run allowed.

Changes to the list count at each device's next sign-in, with no restart. A device that is already connected stays until it reconnects.

To lock the server to your own hardware, use allow --device. Each device id comes from that device's own signing key.

Owners and admins

Members can manage parts of the server from the app. What each may do is a set of rights.

RightWhat it lets them do
inviteMake invites, see used and unused ones, and cancel unused ones.
membersSee the members and their devices, and remove members.
guestsChoose the guest policy, and look after the allow list.
settingsChange every setting but guests, and the server's name, description and icon.
botsAdd and remove bots. Set their greetings, voice notes and videos, and the tools they may ask for. Add, move and remove fixed replies.
announcePost to News, and edit or delete what is there.
cardsRemove anyone's card from the card library.
forumsMake forums, remove any post or comment, pin posts, and lock, edit and delete any forum.
maintainUpdate and restart the server, when it runs as a service.
grantGive or take rights.

Owners

Admins

Managing from the app

A member with any right sees Manage community on the Communities screen. It shows the devices online, guests, the space in use and a health word. Each part shows only with its right. Someone with grant sets a member's rights under What they can do.

The server checks every request itself. A guest gets members only. A member without the right gets not allowed. Every change goes to the server's log, with who made it.

From the app, nobody can remove an owner, a bot or themselves. Nothing in the app can add a rule that asks a model or runs a command line, an LLM profile or a key. Only isolink-relay on the server machine can. A rule made in the app can run a program the server allows. Only owners allow programs from the app, and only from the programs folder. See Programs the app may use.

The admin page

The server serves an admin page at /admin/, such as https://myrouter.tplinkdns.com:8443/admin/. It does everything Manage community in the app does, as your account, with the same rights. It can't post to News or forums, which are end-to-end encrypted.

Its pages cover the overview, members, join requests, invites, guests, name and picture, settings, policy, bots and their programs, the card library and templates, error reports and the log. Members are listed with the start of their account id, flagged when two share a name, so you can tell them apart. Open a member to see their devices, change their rights, or restart their phone's background service; each device then shows whether it restarted, put it off until later, or couldn't.

When the server starts, it prints a one-time login: a link that works once within 24 hours. Make another with isolink-relay admin-login. Open it, then scan the code the page shows in Isolink with Scan a code under You → Communities, or paste it. The server ties the page to your account and makes you an owner. Then add a passkey under Your account to sign in again. Passkeys need a certificate your browser trusts, not the self-signed one: get one from Let's Encrypt with isolink-relay certs letsencrypt. Any admin can also sign in by scanning the code on the sign-in page with Scan a code in the app and approving it.

Asking to join

The server's address on its own shows a home page with a code to scan or paste in the app. On a server that takes members by invite, it asks to join: admins let people in from Join requests on the admin page, and they finish joining by using the same code again. On a server anyone may join, it joins at once.

Certificates and proxies

Self-signed (the default)

init and setup make a self-signed certificate for your host name. It is valid for 10 years. Its pin is the SHA-256 of the certificate. Every invite carries the pin, and the app trusts that exact certificate instead of a certificate authority.

The certificate and key are cert.pem and key.pem in the data folder. When the server starts, its log shows the first 8 characters of the pin. Devices show the same in their debug report.

The web app checks HTTPS with the browser’s trusted certificates. To use a private certificate authority, configure the browser to trust it. The fingerprint in an invite alone cannot establish that trust.

Joining a plain HTTP relay on your network

If your relay runs on HTTP, issue an invite with its private IP address or .local name. In the Isolink web app, open You → Communities → Paste an invite and allow local network access when the browser asks. Use a loopback address only when the relay runs on the same machine as the browser. For public addresses, or browsers that block local HTTP connections, use HTTPS with a certificate the browser trusts.

Let's Encrypt

Let's Encrypt gives the server a certificate every browser and device trusts, for free. The server gets it, renews it about a month before it runs out, and serves the new one without a restart. With it, passkeys work on the admin page, and the web app at isolink.app can reach the server. The guide sets it up:

isolink-relay certs letsencrypt

The address must be a host name, such as a dynamic DNS name. Let's Encrypt doesn't make certificates for IP addresses or local names. Before it gives one, it checks that the name is yours, in one of two ways.

Over HTTP (port 80)

Let's Encrypt connects to http://yourname.tplinkdns.com/ on port 80. That is always port 80, whatever port the server itself uses: a server on https://yourname.tplinkdns.com:8449 still gets a certificate, and the certificate works on 8449. The server listens for the check only while it renews.

isolink-relay init --url https://yourname.tplinkdns.com:8449 --acme --acme-http-port 8080 --force

Over DNS (no port 80)

Let's Encrypt looks for a TXT record at _acme-challenge. and your name. The server runs a program you give to set it: PROGRAM set _acme-challenge.NAME VALUE, and PROGRAM clear _acme-challenge.NAME VALUE afterwards. The program must only finish once the record is published. It suits a domain of your own at a DNS provider with an API, and DuckDNS. Most dynamic DNS services, tplinkdns.com and No-IP among them, can't set TXT records: use port 80 with those.

For DuckDNS, with your subdomain and token:

#!/bin/sh
# /usr/local/bin/duckdns-txt
if [ "$1" = set ]; then txt="$3"; clear=false; else txt=""; clear=true; fi
curl -fsS "https://www.duckdns.org/update?domains=yourname&token=YOUR-TOKEN&txt=$txt&clear=$clear"
[ "$1" = set ] && sleep 60
isolink-relay init --url https://yourname.duckdns.org:8443 --acme --acme-dns-hook /usr/local/bin/duckdns-txt --force

Checking on it

Moving from self-signed

New invites carry no pin. Members who joined with the self-signed certificate keep connecting with Isolink 0.21.0 or later, which trusts the server once its certificate is publicly trusted for its name. Anyone on an older version needs to update first. Moving back to self-signed means a new invite for every member.

Your own certificate

isolink-relay init --url https://relay.example.com --cert /etc/isolink-relay/fullchain.pem --key /etc/isolink-relay/privkey.pem --force

Devices then check the certificate against public certificate authorities. Renewing it needs no new invites. isolink-relay certs own sets it up with a guide.

Behind a reverse proxy

A proxy such as Caddy or nginx can do TLS for the server. Set the server up with --plain:

isolink-relay config set trust_proxy true
isolink-relay init --url https://relay.example.com --port 8443 --plain --force

On Windows, restart the service afterwards.

The server listens on every address. Block its port from the outside, so only the proxy reaches it. With trust_proxy on, anyone who reaches the port directly can claim any address.

Caddy gets a certificate and passes WebSockets through on its own:

relay.example.com {
	reverse_proxy 127.0.0.1:8443
}

nginx needs the upgrade headers set:

server {
    listen 443 ssl;
    server_name relay.example.com;
    ssl_certificate     /etc/letsencrypt/live/relay.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/relay.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8443;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 1h;
    }
}

Command reference

Run each one as isolink-relay <command>. On Windows, use an administrator PowerShell. A command that fails prints why and exits with code 64.

Where a command takes an account, device, invite or rule, the start of its id is enough when only one matches. A bot can also be named by its name.

Options for every command

OptionWhat it does
--data <folder>The data folder. Beats ISOLINK_RELAY_DATA and the default.
--config <file>The settings file. The default is relay.json in the data folder.
--help, -hPrints the help and every flag.
--versionPrints the version.

Setting up and running

CommandWhat it does
isolink-relayPrints the help, then one line on how the server is doing: running or not, its address, members and devices online. Before set-up it says Not set up yet. Run: isolink-relay setup. It never starts the server.
setupAsks a few questions and sets the server up, or changes it. See Set it up.
init --url U [--port N] [--name N] [--cert F --key F | --plain | --acme …] [--force]The same set-up, as flags.
certsShows the certificate, then guides you through changing it: Let's Encrypt, self-signed, your own files, or none behind a proxy. A running server restarts to use it.
certs letsencrypt | self-signed | own | proxyThe guide for one kind.
certs statusWhere the certificate is from, until when it's good, and for Let's Encrypt how the last try went.
certs renewGets a new Let's Encrypt certificate now, and the running server serves it at once.
serve [--<setting> value]…Runs the server. The service does this for you. Each setting is also a flag, such as --mail-ttl 3d. A flag beats the settings file.
profileShows the server's name, description and icon. See Greeting, News and forums.
profile [--name N] [--description D] [--icon F | --icon-clear] [--emoji E] [--color #rrggbb]Changes them. Members see the change when their devices next connect.
configShows every setting, its value, its default and what it does.
config set <key> <value>Checks the value and writes it to relay.json. Restart the server for it to count.
config unset <key>Puts a setting back to its default. Restart the server for it to count.

Invites and members

CommandWhat it does
invite [--name N] [--days 3]Makes a one-time invite and prints its QR code and code.
invite --adminAn invite whose member becomes an owner.
invite --scope S [--scope S]…An invite whose member gets these rights. admin stands for every right but grant.
invitesLists unused invites: id, name, whether it makes an owner, its rights, who made it and when it expires.
revoke <id>Cancels an unused invite.
membersLists the accounts that joined: id, name, owner or bot, devices, when they joined and their rights.
remove <account>Removes a member, with their held messages and their backup. Their devices become guests.
devices [<account>]Each member's devices: online now, when last seen, and whether removed.

Rights

CommandWhat it does
admin <account>Makes a member an owner.
admin <account> --offTakes owner away, and every right with it.
admin-loginPrints a one-time login for the admin page. See The admin page.
grant <account> <right>…Gives rights: invite, members, guests, settings, bots, announce, cards, forums, maintain, grant, or admin for all but grant. Separate them with spaces or commas.
grant <account> <right>… --offTakes rights away.
revoke-scope <account> <right>…Takes rights away. The same as grant --off.

Guests

CommandWhat it does
allow <id> [--name N]Adds an account or device to the allow list. The server works out which it is, if it can.
allow --account <id>The id is an account's: all its devices may connect.
allow --device <id>The id is one device's: only that device may connect.
disallow <id>Takes an account or device off the allow list.
allowedShows the guest policy, the allow list, and guests refused in the last week with their ids.

News and forums

CommandWhat it does
announce "text"Posts to News, up to 2000 characters. It isn't end-to-end encrypted: the server machine has no server key.
announceShows the newest post.
announce --clearDeletes the newest post.
newsLists News with each item's id.
news delete <id>Deletes an item from News. The start of its id is enough.
forum add --name N [--about A] [--emoji E]Makes a forum. Like announce, it isn't encrypted.
forum listLists the forums, with their posts and how many joined.
forum remove <forum>Deletes a forum with its posts and files. Name it by its id, or the start of a name made on the machine.
forum lock <forum> [--off]Locks a forum: only members with the forums right post in it. --off unlocks it.

Bots

CommandWhat it does
bot add --name N [--house] [--media audio,video]Adds a chat bot. --house makes it the server's main bot. --media lets it take voice notes (audio), videos (video), both, or none.
bot listLists the bots: id, name, house or not, how many rules, its account and the hosts it sends messages to.
bot remove <bot>Removes a bot, its keys and its chats.
bot greeting <bot> "text"What the bot says to each new contact, up to 2000 characters. With no text, the default comes back.
bot stop [<bot>]Stops what a bot, or every bot with none named, is working on now: its models and programs. Their chats see "Stopped." Members can send /stop, and admins can stop a bot from Server admin in the app.
bot code <bot>Shows the bot's contact code and QR code, once the server has run it.
bot media <bot> [audio,video | audio | video | none]Turns voice notes and videos on or off. With no value, shows what it takes.
bot groups <bot> on|offLets a bot answer in group chats. Off until turned on. See Bots in groups.
bot scripts <bot> on|offLets a bot's models send scripted cards. Off until turned on.
bot card install <bot> <card.json>Installs the named actions a card declares, so its ctx.bot(name) calls run through the server. Key values packaged in the card move into the env store. bot card list <bot> shows the actions and any key still to set. bot card remove <bot> <action> takes one away.
bot log <bot> [-n 100] [-f]What a bot did with each message, and why it answered or didn't. See Health, status and logs.
bot transcribe <bot> <profile> | noneWrites out voice notes for the bot's --llm rules, and turns voice notes on. See Voice notes, written out. bot add takes --transcribe <profile> too.
bot docs add <file.md> [--name N]Adds a doc for models to read. See Docs for models.
bot docs listLists the docs, built in and your own, and which bots read each.
bot docs remove <name>Removes one of your docs.
bot docs use <bot> [doc,… | all | none]Chooses the docs a bot's models can read. All by default.
bot tools <bot> [tool,… | all | none]Chooses the tools on members' devices a bot may ask for. With no value, shows them. See Tools on devices.
bot rule add <bot> …Adds a rule. See Rules.
bot rule list <bot>Lists a bot's rules with their ids.
bot rule remove <bot> <rule>Removes a rule.
bot programs allow <path> --name N [--about "…"] [--arg A]… [--env NAME]… [--timeout 20] [--params "<city> <units?>"]Allows a program for rules made in the app. --arg gives arguments it always gets first. --params gives the arguments it takes, which every rule that runs it takes too. Allowing a name again changes it. See Programs the app may use.
bot programs listLists the allowed programs, with their paths.
bot programs disallow <name>Takes a program off the list. Rules that run it stop working.
rule add --relay …Adds a rule every bot follows, after its own. It takes the same flags as bot rule add.
rule list --relayLists the server's rules.
rule remove --relay <rule>Removes one of the server's rules.

Models and secrets

CommandWhat it does
llm add <name> --provider anthropic|openai|gemini …Adds an AI model for bots to use. See An AI model.
llm listLists the models and where each key comes from. It never prints a key.
llm remove <name>Removes a model. It refuses while a rule still uses it.
llm test <name> "hello"Asks the model once and prints its answer.
llm level [<level> <model>]Shows or sets which model each level means. See Model levels.
bot level <bot> [low|medium|high|xhigh|own]The level a bot's AI rules answer with.
stt add <name> --openai-compatible URL … or --run <program> …Adds a speech-to-text service or program. See Voice notes, written out.
stt listLists them and the bots that use each. It never prints a key.
stt remove <name>Removes one. It refuses while a bot still uses it.
stt test <name> <audio file>Writes out the file once and prints the text.
env set NAMEKeeps a secret in the env store. It asks for the value without showing it, or reads it from stdin.
env listLists the names and when each was set. Never the values.
env unset NAMERemoves a value.
env import <file>Reads NAME=value lines from a .env file.

Maintenance

CommandWhat it does
restartRestarts the running server and waits for it to come back. Devices reconnect within seconds. Admins can do it from the app or the admin page too: Manage community → Restart relay. Both follow it until the server is back online, then show its new start time and version, or say what went wrong.
updateInstalls the latest release and restarts the service. Run it as root or administrator. See Updates.
update --checkOnly says whether there is a newer release.
update --no-restartInstalls it, but leaves the service running the old version until you restart it.
version, --versionPrints the version.

Finding faults

CommandWhat it does
status [--json]Running or not, version, devices online, each bot's state and updates.
doctor [--json]Checks what usually goes wrong and says how to fix it. Exits with 1 when something fails.
logs [-n 100] [-f]The server's recent log, scrubbed of keys and tokens. -f follows it.
errors list, errors show <id>, errors export [-o file.json]The problems members' apps reported. See Error reports.
report [-o file.json]One file with the status, the doctor's checks, settings, bots, error reports and recent logs, to share when asking for help.

Environment variables

VariableWhat it does
ISOLINK_RELAY_DATAThe data folder, when --data isn't given. The Linux service sets it to /var/lib/isolink-relay.
ISOLINK_RELAY_ACME_DIRECTORYThe ACME certificate authority certs letsencrypt sets up, in place of Let's Encrypt.
ISOLINK_RELAY_SERVICETells the server a service manager restarts it. Admins can then restart it from the app, and update it where it may replace its own file. The systemd unit and the WinSW file set it.

A server hosted from its environment reads more variables, such as RELAY_DATABASE_URL and the push credentials. See Hosting: database and nodes.

Settings reference

The server's limits, guest policy, joining and policies live in relay.json in the data folder. With no file, every setting has its default. isolink-relay config lists them all, with their values and defaults.

Sizes take KB, MB or GB (32MB), or a plain number of bytes. 1 KB is 1024 bytes. Times take s, m, h or d (7d), or a plain number of seconds, up to 3650 days. Numbers must be whole and above 0. Flags take true or false. Text settings take up to 1000 characters.

A bad key or value stops serve with a message saying which one.

Joining and policies

KeyDefaultWhat it does
presethomeWhich defaults the server starts from: home for a server you invite people to, global for one anyone may join. Set on the machine only. See Open joining.
hostingself (service under global)How the app shows the server to members: self for one people run for themselves, with every detail; service for one run for customers, which shows their account, the service's status and where to get help instead of how the server is set up.
plannoneThe members' plan a service shows, such as Free.
support_url, status_url, privacy_url, terms_urlnonehttps:// links the app shows under Help: where to get help, the status page, the privacy policy and the terms.
joininviteHow someone becomes a member: invite, open (any device that asks) or paused (nobody new joins by asking; members carry on).
joins_per_ip5Accounts one address can join an hour, while joining is open.
member_prune_after3650dHow long a member who joined by asking may stay unseen before the server removes them, with what it holds for them.
min_appnoneThe oldest app version, such as 0.15.0, that should be offered open joining. Given in /v1/status. Older apps see no offer.
status_notenoneA short line /v1/status gives for the app to show, such as planned maintenance.
policynoneWho may see or use each event, request and property, as key=level pairs over the preset. See Policies.
guestsopenWho may connect without being a member: open, members or allowlist.

Connections

KeyDefaultWhat it does
max_devices2000Devices connected at once. More are turned away as busy.
auth_timeout10sTime a device has to sign in after it connects.
hello_bytes16KBLargest message accepted before a device signs in. Anything bigger, or any binary data, ends the connection unread.
waiting_per_ip8Connections one address can have open before signing in. More get HTTP 429.
connects_per_ip60New connections one address can make a minute. More get HTTP 429.
online_per_ip32Devices one address can have connected at once.
devices_per_account32Devices one account can have connected at once.
trust_proxyfalseTake the address from X-Forwarded-For. Only behind your own reverse proxy, with --plain: anyone can set that header.
ping_interval25sHow often idle connections are pinged to keep them open.
max_frame_bytes5MBLargest piece of data passed along a connection.
circuits_per_device64Connections one device can have open at once.
circuits_per_target8Connections one device can open to a single other device.
opens_per_minute120Connections one device can open a minute.

Held messages and files

KeyDefaultWhat it does
drops_per_hour1200Messages one device can leave an hour. Pieces of files don't count.
file_pieces_per_minute300Pieces of files one device can send a minute.
mail_item_bytes256KBLargest single held message, or piece of a file.
mail_items_per_device500Messages held for one member device.
mail_bytes_per_device32MBSpace for messages held for one member device.
mail_bytes_total1GBSpace for messages held for all devices together.
mail_ttl7dLongest a message or file is held. A sender can ask for less.
file_bytes_per_device256MBSpace for files held for one member device, on top of its messages. A file that won't fit is refused whole, and phones carry it instead.
file_bytes_total4GBSpace for files held for all devices together.
file_abandon_after6hHow long a file left part way waits for its next piece before it is dropped. A sender that stops or deletes a file takes its pieces back at once.

Push wakes

KeyDefaultWhat it does
wake_every30sLeast time between two pushes that wake the same device for mail.
call_wait25sHow long a call to a sleeping device waits for it to wake and connect.
pushed_mail_ttl24hHow long a message that went out inside a push is kept, in case the device never says it arrived.

Members' features

KeyDefaultWhat it does
greetingnoneA welcome members see when they join, up to 1000 characters. Write \n for a new line.
bot_guestsfalseLet guests add the server's bots, not just members.
bot_file_bytes10MBLargest file a bot takes or sends.
programs_dirnoneFolder owners may allow bot programs from, in the app. Empty means programs in the data folder. A relative path is in the data folder. Set it on the machine only.
card_keys_from_appfalseLet owners put key values for card actions into the env store from the app. Set it on the machine only.
cards_per_account50Cards one account can publish to the card library.
cards_total2000Cards the card library holds in all.
themes_per_account20Themes one account can leave in the theme gallery.
themes_total500Themes the theme gallery holds in all.
theme_bytes2MBLargest theme the theme gallery takes.
templates_total100Card templates the server hosts for its members.
backup_bytes_per_account64MBSpace for one account's encrypted backups, every version together.
backup_bytes_total4GBSpace for all encrypted backups together.
backup_versions10Backup versions kept for each account, to roll back to.
news_keep500News items kept. The oldest go first, with their files.
forums_by_membersfalseLet every member make forums, not just those with the forums right.
forum_file_bytes25MBLargest photo, video or file in News or a forum.
forum_bytes_per_account500MBSpace for one account's files in News and forums.
forum_bytes_total5GBSpace for all files in News and forums together.
forum_ttl3650dHow long a post is kept after its last comment. Checked at start and once a day.
error_reportstrueTake anonymous error reports from members' apps. See Error reports.
error_ttl30dHow long an error report is kept after the problem was last reported.
user_reportstrueTake reports members send from the app: a problem or an idea, with a screenshot and debug report. See Reports from the app.
user_report_ttl90dHow long a report sent from the app is kept.
log_ttl30dHow long lines in the server's log and its bots' debug logs are kept. Older lines are cleared about once an hour. See Health, status and logs.
stt_max_seconds300Longest voice note a bot writes out, in seconds.
bot_answer_seconds300Longest a bot works on one answer before it stops and says it took too long, in seconds. Time spent waiting for the person doesn't count.
auto_updatefalseInstall new releases by itself, and restart, when it can update itself. Members with maintain change it.
update_every1hHow often the relay looks for a new release, to show it in the app or install it with auto_update.
beta_updatesfalseTake beta releases too, to try the next relay version early.

Before a device signs in, the server knows only its address. hello_bytes, waiting_per_ip and connects_per_ip keep strangers from tying it up. A household or office behind one router shares an address. Signing in takes well under a second, so the defaults leave plenty of room.

Policies

Everything a server sends or takes has a key. The policy setting decides who may see or use each one. Use it to make a server quieter, for example to stop "Sam joined" lines in News, or to show the member count to admins only.

LevelWho passes
everyoneAny device that signed in, guests included.
membersMembers' devices.
adminsMembers who hold at least one right, and owners.
ownersOwners only.
offNobody. The server never sends it, writes it or takes it.

A level is the least a device must be. The server's own checks, such as rights and the guest policy, still apply on top.

GroupWhat it coversExamples
news.*The server's own lines in News. Default members.news.member ("Sam joined"), news.bot, news.update, news.forum, news.renamed, news.program. Admins also switch each one under Notices in News in the community's Settings in the app. In News they fold into one small line between posts.
event.*Things the server tells connected devices. Default everyone.event.botJoined, event.newsItem, event.forumReply, event.keyWanted
prop.*Parts of what the server says about itself. Default everyone.prop.relay.members (the member count), prop.relay.online, prop.relay.owners, prop.welcome.botNews
request.*Every request a device can make, by its name. Default everyone.request.forumCreate, request.cardPublish, request.adminBotAdd, request.keyClaim
push.*Push wakes. See Push wakes.push.register (handing the server a push token, default members), push.payload (messages inside the push, default off), push.call (waking a device for a call, checked against the caller, default members)

isolink-relay config lists every key with its level, its default and what it does. Set keys on the command line, or in relay.json:

isolink-relay config set policy "news.member=off,prop.relay.members=admins"
isolink-relay config set policy "news.member=default"   # puts one key back to its default
{
  "policy": {
    "news.member": "off",
    "prop.relay.members": "admins"
  }
}

config set policy changes only the keys you name, and keeps the rest. An unknown key or level stops serve with a message.

The global preset's policy

A server with preset set to global starts from a quiet policy. Anything you set in policy goes on top of it.

KeysLevelEffect
news.member, news.bot, news.forum, news.renamed, news.program, event.botJoined, prop.welcome.botNewsoffNo "Sam joined" or other member and bot lines.
prop.relay.members, prop.relay.online, prop.relay.ownersadminsMember and online counts, and owners' names, for admins only.
request.forumCreate, request.cardPublish, request.themePublish, request.adminBotAdd, request.keyClaimoffNo new forums, no publishing to the card library or theme gallery, no bots added from the app, and no server key for encrypted News and forums.
push.payloadmembersMembers may choose to receive small messages inside the push.

Open joining

By default, people become members with an invite. A server can instead take anyone who asks, as the isolink.app community does.

With join set to open, anyone with Isolink who knows the address can become a member, and use the server's space and features as members do. Use it with the global preset or a policy you have checked.

The app asks to join only the isolink.app community. A server of your own still takes members by invite in the app, whatever join says.

The status endpoint

The server answers GET /v1/status to anyone, with no sign-in. It says only whether the server takes new people, never who is on it. The app reads it before it offers a community, so a server that is down, paused or too new for the app is simply not offered.

curl https://relay.example.com/v1/status
{"v": 1, "joining": true, "minApp": "0.15.0", "note": "Maintenance on Sunday from 02:00 UTC.", "push": ["fcm"]}
v
The server protocol version, now 1.
joining
true when join is open. false for invite and paused.
minApp
The min_app setting. Left out when empty.
note
The status_note setting. Left out when empty.
push
The push services the server can send through: fcm, apns, or none.

The answer is application/json, may be cached for 60 seconds, and allows any origin.

The global preset

preset set to global is for a server that serves everyone, such as Isolink's own at relay.isolink.app. Set it on the machine only. It changes these defaults, and starts from the quiet policy. Anything you set yourself still wins.

Keyhomeglobal
joininviteopen
max_devices200050000
online_per_ip3264
mail_bytes_per_device32MB8MB
mail_bytes_total1GB4GB
file_bytes_per_device256MB64MB
file_bytes_total4GB64GB
backup_bytes_per_account64MB32MB
backup_bytes_total4GB256GB
backup_versions103
member_prune_after3650d90d
error_reportstruefalse
auto_updatefalsefalse

Push wakes

Without push, each phone keeps a connection open to every community it belongs to. A server with push set up lets phones disconnect in the background. It wakes a phone when something arrives for it.

  1. When a member's device connects, the app hands the server its push token. The server seals the token at rest with PUSH_TOKEN_KEY, so a copy of the server's records alone can't push anyone.
  2. When mail comes for a device that isn't connected, the server sends a push that says only "wake" and the server's own host name. It sends at most one every wake_every for each device.
  3. The phone connects, fetches what is waiting, and goes back to sleep. In case a push is lost, the app also visits a sleeping server every 30 minutes, and keeps every server connected while it is on screen.
  4. A call to a sleeping device sends a call push and waits up to call_wait for the device to connect. push.call decides which callers may wake a device: members, by default.

A member can also turn on Messages in notifications in the app. If push.payload allows it, a message small enough rides inside the push itself: up to 3000 characters of the sealed message, never a file. It is still end-to-end encrypted, but Google or Apple then carry the sealed message and see its size. The server keeps the message until the phone next connects and confirms it, or for pushed_mail_ttl. push.payload is off by default, and members with the global preset.

Tokens the push service rejects are dropped. The phone registers again when it next connects. On the phone, Save battery lets a server that pushes sleep, and is on unless the member turns it off. Each device chooses for itself.

What push needs

VariableWhat it is
FCM_SERVICE_ACCOUNTA Firebase service account's JSON key, for Android.
APNS_KEY, APNS_KEY_ID, APNS_TEAM_IDAn Apple push key (the .p8 file's contents), its key id and the team id, for iPhone.
PUSH_TOKEN_KEY32 random bytes as base64, to seal push tokens at rest. Without it, tokens are stored as they are.

Without push credentials the server works as before, and phones stay connected.

Push is read from the environment by isolink-relay hosted only (see Hosting). isolink-relay serve doesn't send pushes yet. Push credentials also only reach apps built for the same Firebase project and Apple team. The Isolink apps from the stores are registered to Isolink's own, so a server you run yourself can't wake them by push. Members' phones simply stay connected to it.

Hosting: database and nodes

For a container platform, run isolink-relay hosted from the Linux release instead of serve. It needs no setup. It is set up entirely from its environment, listens on plain HTTP, and expects the platform to do TLS. Isolink's own server runs this way.

VariableWhat it does
RELAY_URLRequired. Where devices reach it, such as https://relay.example.com.
PORTWhere it listens. The default is 8080.
RELAY_NAMEIts name in the app. The default is Isolink.
RELAY_SETTINGSSettings as relay.json JSON, over the global preset with trust_proxy on. For example {"join": "paused"}.
RELAY_DATAWhere it keeps records as files when there is no database. The default is /data.
RELAY_DATABASE_URLPostgres, for members, invites, mail and push registrations. Shared by every node.
RELAY_DATABASE_CAThe database's CA certificate, as PEM. With it, the server checks the server's certificate against that CA.
SPACES_ENDPOINT, SPACES_BUCKET, SPACES_KEY, SPACES_SECRETAn S3-compatible bucket for backups and forum files, which a container's disk would lose.
RELAY_NODE, RELAY_NODE_URLThis node's name, and the address that reaches it alone, when there are several.
FCM_SERVICE_ACCOUNT, APNS_KEY, APNS_KEY_ID, APNS_TEAM_ID, PUSH_TOKEN_KEYPush. See Push wakes.
RELAY_URL=https://relay.example.com \
RELAY_NAME="Example relay" \
RELAY_SETTINGS='{"join": "paused"}' \
./isolink-relay hosted

In a container, copy isolink-relay from the release into the image and make isolink-relay hosted its command. Give it a folder for RELAY_DATA that outlives the container, unless it keeps its records in Postgres.

It answers /v1/relay, /v1/status and /healthz. It doesn't update or restart itself from the app: deploy a new image instead.

More than one node

Every node keeps the records in memory and writes changes behind, in batches. Postgres tells the other nodes what changed. Nodes that share a database form one server:

The isolink-relay commands work on a data folder. They don't reach records kept in Postgres.

Bots

A bot is a real Isolink account that the server runs inside its own process. It connects to the server as a member, through a socket in memory. It answers in chats, for example with opening hours or the Wi-Fi password.

isolink-relay bot add --name "House" --house
isolink-relay bot rule add House --command /hours --reply "The shop opens at 9."
isolink-relay bot rule add House --contains wifi --reply "The password is on the fridge."
isolink-relay bot greeting House "Hi! Send /help to see what I can do."

Members see the server's bots under You → Communities, and add one with one tap. Chats with a bot are end-to-end encrypted like any other chat. The bot's keys sit in bots/<id>/ in the data folder.

Whoever runs the server, or has a copy of its data folder, can read what people send to its bots.

Adding bots

Rules

A rule has one trigger and one answer. Give the program for --run last on the line.

TriggerMatches
--command /hoursThe message's first word. A slash, then 1 to 32 letters, digits, _ or -. Arguments may follow: --command "/shout <person> <when?>". See Command arguments.
--exact "text"The whole message, trimmed.
--contains "text"Text anywhere in the message.
--regex "pattern"A regular expression found anywhere in the message.
--has-file image|video|audio|file|anyA message with a file of that kind, or any file.
--anyAny message no other rule answers.

Matching ignores case. Trigger text is 1 to 200 characters. Only the first 500 characters of a message are matched.

AnswerWhat answers
--reply "text"Fixed text, 1 to 4000 characters.
--llm <profile>An AI model. See An AI model.
--run <program> [args…]A program. See A program.
Other flagWhat it does
--account <id>Only this member gets the rule. Repeat it for more. The start of an id is enough.
--about "text"What a command does, in a few words, for the list in the app. Up to 120 characters.
--params "<person> <when?>"The arguments a command takes, if they aren't after it in --command. See Command arguments.
--card file.jsonAn interactive card sent with the answer, up to 768 KB. The server passes it on unread.
--file FWith --reply: a file from the server's data folder, sent after the text. Copy it into the data folder first.
--tool <tool> --args '{…}'With --reply: asks the member's device for a tool first. See Tools on devices.
--timeout NWith --run: seconds the program may take, 1 to 300. The default is 20.
--shellWith --run: runs the line through a shell.
--external hostWith --run: a host the program sends messages to. Members are told. Repeat it for more.
--env NAMEWith --run: one value from the env store the program gets. Repeat it for more.

A bot can have 100 rules. The server can have 100 rules of its own.

Which rule answers

  1. /help is built in, and always answers. It lists the commands the person asking can use, and what the bot takes.
  2. The bot's own rules, in order, then the server's rules (rule add --relay). The first match answers.
  3. If nothing matched, the bot's own --any rule, then the server's.
  4. If still nothing matched and the message starts with /, the bot says "I don't know /x. Send /help to see what I can do."

A rule limited with --account doesn't answer anyone else. It stays out of /help and out of the command list in the app for everyone else.

isolink-relay rule add --relay --command /wifi --reply "The password is on the fridge."
isolink-relay bot rule add House --command /door --account 3f9a2c --run /usr/local/bin/open-door

Command arguments

A command can say what it takes after its name, each argument in angle brackets:

isolink-relay bot rule add House --command "/shout <person> <when?>" --reply "HEY {person}! {when}"
isolink-relay bot rule add House --command /remind --params "<who> <when?=tonight> <note...?>" \
  --run /usr/local/bin/remind
WrittenMeans
<person>Required.
<when?>Optional: it may be left out.
<when?=now>Optional, and now when left out.
<note...>Every word left on the line. Add ? to make it optional.

Names are a letter, then letters, digits or _, up to 32. text, name, chat, result and answer are taken. A command takes at most 12. Required ones come first: the server refuses an optional argument before a required one, and a <x...> that isn't last, and says what to change.

Members give arguments in order, or by name in any order. Giving one by name is how an optional one is given without the ones before it:

/shout John now
/shout "John Smith" 'next week'
/shout person="John Smith" when=now
/shout when=later John

Quotes keep spaces in. A quoted "when=now" is a value, not a name. Arguments are checked before anything runs: a message that doesn't fit gets what to send instead, such as "/shout needs <person>. Send it as /shout <person> <when?>." A command with no arguments works as before.

The app's / list shows each command with its arguments. Once a command and a space are typed, a line over the message field shows its usage with the next argument picked out, offers name= as a word starts one, and says what's wrong as it's typed.

Photos, files, voice notes and videos

Bots in groups

A bot answers only in its own chats until you allow it in groups, with bot groups House on (or off), or from the bot's page in the app. Until then, the app leaves it out of the people offered for a new group, and a group it is already in says it won't answer there.

Bot limits

When changes count

Rule, greeting and media changes count at the bot's next message. A bot added or removed starts or stops within half a minute while the server runs.

Models and programs

A rule can answer with an AI model (--llm) or with a program (--run) instead of fixed text.

These end the privacy of a bot's chats. With --llm, the server sends each message, the sender's earlier turns and your system prompt to that model's service. With --run, the program runs as the server's own user, with that user's rights over its files and network. Only run programs you trust. Only add models you'd trust with what members send.

Members are told. A bot with an --llm rule, a --run rule marked --external, or a speech-to-text service, lists those hosts in the app. A model on the same machine (localhost or 127.x) isn't listed.

Only isolink-relay on the server machine can add --llm and --run rules, models, speech-to-text profiles, docs and keys. Admins see such rules in the app with a lock, as Runs door.sh (set on the server machine). They can move other rules around them, but can't change or remove them.

An AI model

Add a model once, then use it in any bot's rules:

# Anthropic. The key goes in the env store, not in bots.json.
isolink-relay env set ANTHROPIC_API_KEY
isolink-relay llm add claude --provider anthropic --key-env ANTHROPIC_API_KEY --system "Keep it short."
isolink-relay llm test claude "hello"
isolink-relay bot rule add House --any --llm claude

# Ollama, or any OpenAI-compatible service
isolink-relay llm add local --provider openai --model llama3.2 --url http://localhost:11434/v1
isolink-relay bot rule add House --command /ask --llm local

# Google's Gemini API
isolink-relay env set GEMINI_API_KEY
isolink-relay llm add gemini --provider gemini --model <model> --key-env GEMINI_API_KEY
FlagWhat it does
<name>The profile's name: 1 to 32 letters, digits, _ or -.
--provideranthropic, gemini, or openai for any OpenAI-compatible Chat Completions service.
--model MThe model. Required, except for Anthropic, where the default is claude-opus-5-5.
--url UThe service's base address, http:// or https://. The provider's own by default.
--key-env VARReads the key from VAR in the env store, or else from the server's own environment.
--key-file PATHReads the key from this file. Make it readable only by the server.
--system "…"The system prompt, up to 20000 characters.
--max-tokens NThe longest answer, 1 to 128000 tokens. The default is 8000.
--history NEarlier turns of each conversation sent along, 0 to 100. The default is 10.
--effort EAnthropic only: low, medium, high, xhigh or max. The default model is asked with low.
--accepts kindsThe files the model takes: image, pdf, text, audio, video.
--advisor MAnthropic only: a stronger Claude model it may ask for advice when it gets stuck, through Anthropic's advisor tool. Never sent to other providers or services.

Model levels

Bots and cards ask for a level, not a model: low, medium, high or xhigh. You say what each level means, as a model name (run with the provider and key of the bot's own model) or one of your models by name. A card's bot slot asks with model: 'low'; a bot gets one with bot level or in its settings.

# What each level means now
isolink-relay llm level
# Sonnet answers, and asks Opus when it gets stuck
isolink-relay llm level medium claude-sonnet-5-5 --advisor claude-opus-5-5
# One of your own models, used whole
isolink-relay llm level low local
# Back to the default
isolink-relay llm level low default

Keys

Files to a model

ProviderTakes by defaultCan also take
anthropicimage, pdf, textnothing else
openaiimage, textaudio (WAV and MP3)
geminiimage, pdf, text, audio, videonothing else

Voice notes and videos reach a model only when the bot takes them. Gemini gets big files through its File API. Anything a model doesn't take gets "I can't read that kind of file yet." or "I can't take voice notes or videos." Nothing goes to the model then. A model can answer with files too.

Conversations

Voice notes, written out

A bot can turn voice notes into text for its --llm rules. Add a speech-to-text profile once, then give it to a bot:

# OpenAI's Whisper, or any service with the same /v1/audio/transcriptions
# (faster-whisper-server, LocalAI, Speaches)
isolink-relay env set OPENAI_API_KEY
isolink-relay stt add openai --openai-compatible https://api.openai.com/v1 --model whisper-1 --key-env OPENAI_API_KEY
isolink-relay stt add local --openai-compatible http://localhost:8000/v1 --model Systran/faster-whisper-small

# A program on this machine, such as whisper.cpp. It gets the audio file's path last
# and prints the text. -nt leaves out timestamps.
isolink-relay stt add cpp --run /usr/local/bin/whisper-cli -m /opt/whisper/ggml-base.en.bin -nt

isolink-relay stt test openai voice.m4a
isolink-relay bot transcribe House openai        # or: bot add --name House --transcribe openai
isolink-relay bot transcribe House none
FlagWhat it does
--openai-compatible URLThe service's base address. The server posts to URL/audio/transcriptions.
--model MThe model. The default is whisper-1.
--key-env NAMEReads the key from NAME in the env store, or else from the server's own environment. Local services need none.
--runThe program and its arguments, last on the line. It runs without a shell.
--timeout NSeconds it may take, 1 to 600. The default is 120.

Files from a model

A model can send files with the server's send_file tool: name, content and an optional mime. It is for text: Markdown (.md) and code (.py, .dart, .js, .json, .sh, .csv, .txt and more).

Docs for models

The server keeps docs its models can read with a read_doc tool. Each model gets a short list of their names and first lines, and reads one only when it helps. These are built in:

DocWhat it covers
cardsInteractive cards: the JSON, every block, answers and limits.
card-scriptsCard scripts: the language, state, buttons, reaching web sites.
formattingHow messages show: bold, italic, strike, code, quotes, bullets.
markdownMarkdown files: what shows and how to send one.
bot-toolsThe bot's own tools, on the server and on members' devices.

Add your own, in Markdown, up to 64 KB each and 20 in all:

isolink-relay bot docs add house-rules.md          # called house-rules
isolink-relay bot docs add notes.md --name bins
isolink-relay bot docs list
isolink-relay bot docs remove bins
isolink-relay bot docs use House house-rules,cards  # or: all (the default), none

They live in bot-docs/ in the data folder. Every bot reads every doc unless you choose some with bot docs use.

A program

--run takes the program and its arguments, last on the line. The server starts it directly, without a shell. The message never goes into its arguments. It arrives on stdin, and in these environment variables:

VariableValue
ISOLINK_TEXTThe whole message.
ISOLINK_COMMANDThe first word, in lower case, when it starts with /. Otherwise empty.
ISOLINK_ARGSThe rest of the message after the command, or all of it when there is none.
ISOLINK_ARG_<NAME>For a command with arguments: each one given, its name in capitals. Defaults are filled in.
ISOLINK_ARGS_JSONThe same, as one JSON object: {"person":"John"}.
ISOLINK_FROMThe sender's account id.
ISOLINK_NAMEThe sender's name, as the bot knows it.
ISOLINK_BOTThe bot's id.
ISOLINK_CHATThe chat's id.
ISOLINK_REPLY_TEXTWhen the message is a reply: the message it quotes.
ISOLINK_REPLY_FROMWho wrote the quoted message, by account id.
ISOLINK_REPLY_NAMETheir name, as the bot knows it.
ISOLINK_FILESThe paths of the files the message brought, one a line.
ISOLINK_FILE_NAMESTheir names as sent, one a line.
ISOLINK_OUTA fresh folder for this run. Files the program writes there go back as attachments.
Your --env namesEach value from the env store the rule names. Only those.

From the server's own environment it keeps only PATH, LANG, LC_ALL and TZ, plus the usual system variables on Windows. HOME is the run folder.

A tiny program that answers /shout:

#!/bin/sh
# /usr/local/bin/shout: prints the message after /shout in capitals.
printf '%s\n' "$ISOLINK_ARGS" | tr a-z A-Z
isolink-relay bot rule add House --command /shout --run /usr/local/bin/shout
isolink-relay bot rule add House --command /weather --timeout 10 --external wttr.in --run /usr/local/bin/weather

--shell runs the line through sh -c, or cmd /c on Windows. Use it for pipes. Quote the whole line.

With --shell, never put $ISOLINK_TEXT or another message variable unquoted into the line. The message still reaches the program only on stdin and in the variables.

Add --external host when the program sends messages somewhere. Members are told.

Programs the app may use

The app can't type a command line. It picks from a list of allowed programs. Each has a name, a fixed path, fixed first arguments, the env store names it gets, and a short description. The list lives in bot-programs.json in the data folder.

The server machine allows a program anywhere:

isolink-relay bot programs allow /usr/local/bin/weather --name weather \
  --about "Today's weather" --arg --units --arg metric --env WEATHER_KEY
isolink-relay bot programs list
isolink-relay bot programs disallow weather

Owners can also allow programs in the app, under Manage server › Bots › Programs. Only a file in the programs folder counts: programs in the data folder, or programs_dir. Put the file there on the machine, then tap Allow. The server checks it each time, and before every run:

The owner sets its name, description, first arguments and env store names in the app. The app sees the names in the env store, never the values. Programs allowed on the machine show Set on the server machine and can't be changed in the app. Members with only bots see the list, read-only. Every change goes to the server's log with who made it, and a line in News tells every member who allowed, changed or disallowed what.

A program's own arguments. --params, or Arguments in the app and the relay console, says what a program takes, written as for a command. Every rule that runs it takes them too, unless the rule gives its own. {city} in its --arg words is what was given, one argument of its own, and it gets ISOLINK_ARG_CITY as well.

isolink-relay bot programs allow /usr/local/bin/weather --name weather \
  --params "<city> <units?=metric>" --arg --city --arg "{city}" --arg --units --arg "{units}"

An owner's phone can now turn on any program in the folder. Keep the folder writable by the server's user and root only. Put in it only programs you'd let run.

In a bot's rule editor, Run a program picks an allowed program. After the program's own arguments, the rule may add up to 8 more. Each is one argument of its own, never through a shell:

WordWhat it becomes
{text}The message after the command.
{name}The sender's name.
{chat}The chat's id.
{city}One of the command's arguments, or the program's.
a plain wordItself: letters, digits and . , : = + -, not starting with -.

The server refuses anything else, and checks the program is on the list. The message still arrives on stdin and in the ISOLINK_ variables. Timeouts, output limits and the run folder are as for --run. A message can start with -, so put -- last in --arg if the program reads options. If a program is disallowed, or its file fails the checks, its rules answer "That didn't work." and the log says why.

With no programs allowed, the rule editor says so, and how to allow one.

Tools on members' devices

A bot can ask a member's device to do a few fixed things. A bot names a tool and gives its arguments. It can never send code to run.

ToolArgumentsWhat comes back
get_locationnonelat, lon, accuracy_m. Rounded to about 1 km unless the member chose exact.
set_remindertext, atA reminder for the member in the bot's chat.
ask_choicequestion, options (2 to 10)choice: the option tapped.
ask_textquestionThe text the member typed.
send_cardcardAn interactive card sent from the member into the chat. message is its id.
pick_fileprompt, kindsThe member picks a file. It arrives as an attachment. Its name comes back.
open_linkurlThe link shows, and opened comes back when tapped.
schedule_messagetext, atA message from the member to the bot, sent at at.
run_commandname, args?Computers only. Runs one of the commands the member set up, with its arguments by name: {"city": "Paris"}. exit and stdout come back, up to 4 KB. A wrong or missing argument comes back as an error with the usage.

A member gives a command on their computer Arguments under Bot commands, such as weather <city> <units?>. {city} in its line is what the bot gave, as one word of its own, and the program also gets ISOLINK_ARG_CITY. A line run in a shell only gets the variables.

Times are ISO 8601 with a time zone, such as 2026-10-19T09:00:00+01:00.

Which tools a bot offers

New bots offer ask_choice, ask_text, send_card and set_reminder. The rest are off until you turn them on:

isolink-relay bot tools House                       # what it offers now
isolink-relay bot tools House get_location,ask_choice
isolink-relay bot tools House all                   # or: none

Admins with the bots right set the same from the bot's page in the app.

Who asks

isolink-relay bot rule add House --command /day --about "Pick a day" \
  --tool ask_choice --args '{"question": "Which day?", "options": ["Sat", "Sun"]}' \
  --reply "See you on {result}."

The bot must offer the tool, or rule add refuses and says how to add it.

What the member decides

The env store

Secrets for bots, such as API keys, live in env.json in the data folder. On Linux it has mode 600 and belongs to the isolink-relay user. On Windows only LocalSystem and Administrators can read it.

isolink-relay env set ANTHROPIC_API_KEY        # asks for it without showing it
printf '%s' "$KEY" | isolink-relay env set GEMINI_API_KEY
isolink-relay env import keys.env              # NAME=value lines
isolink-relay env list                         # names, and when each was set
isolink-relay env unset GEMINI_API_KEY

Anyone with root or administrator rights on the machine can read the store.

Greeting, News and forums

Greeting

isolink-relay config set greeting "Welcome to our relay.\nSay hi to the house bot."

Members see the greeting on the Communities screen. With a house bot, someone who joins also finds it in the bot's chat. Restart the server after setting it on the machine. From the app it counts at once.

News

News is one read-only chat per server, at the top of Chats in the app. It holds posts from members with the announce right (text, and one photo or file) and short lines from the server itself: a bot or someone joined, the server was updated or renamed, a forum was made. Members can't reply or react. The app raises one notification for each new post.

isolink-relay announce "text" posts to News from the machine. Connected members get it within half a minute, and the rest when they next connect. Older apps show the newest post as the server's announcement. An encrypted one reads "A new post is in News. Update Isolink to read it."

Forums

End-to-end encrypted

What people write in News and forums is end-to-end encrypted with one key per server. Only members' devices hold it. The server keeps ciphertext. It sees who posted, when, how big things are, votes and counts. Files are sealed with a key of their own, which travels inside the encrypted post.

The first member to post makes the key. A new member's device asks for it, and the server passes the ask to members' devices that hold it. One of them checks the new device's keys and seals the key to it. Until then, the app says it is waiting for a member's device to share the key. The key is in members' chat backups.

The server's profile

A server has a name, a short description and an icon. Members see them in the app in place of the server's address.

isolink-relay profile --name "Our house" --description "The relay for the Hill Street household."
isolink-relay profile --icon house.png          # or --icon-clear
isolink-relay profile --emoji 🏡 --color "#3366ff"
isolink-relay profile                           # shows them

Members with the settings right change these from Manage community.

Card library

Members share cards on the server. Anyone on it can browse and save them. Guests can't use it.

Cards in the library aren't encrypted for the server. Whoever runs it can read them.

Backups on your community

Members can keep their chat backup on their community. In the app, go to You → Chat backup and turn on Keep a copy online.

The app shows a server backup code. It holds the server's address, its certificate pin, a random slot id and a secret. Save it somewhere away from the phone.

Leaving the server, or being removed from it, deletes your backup there.

To restore on a new phone, set up Isolink, then go to You → Chat backup → Restore from an online backup. Enter the code and your passphrase. The server hands the backup over only to a device that proves it holds the secret. The new phone needs no invite. This works on a server that takes no guests.

Five wrong proofs close the connection. An unknown slot and a wrong proof get the same answer.

Once a passkey, password manager or saved passphrase holds the backup's passphrase, the app backs up by itself: about 15 minutes after the last change, at most hourly, and at least daily while anything changes. It skips the upload when nothing changed, and holds off on battery saver below 20%. To roll back, go to You → Chat backup → Earlier versions. Your current chats go up as a new version first, so a roll back can be undone.

Passkeys and password managers

Under Protect it with, the app can keep the code and passphrase for the member, in one or more ways. It suggests keeping at least two.

The server never sees the passphrase or the passkey's output.

Recovering the account with a passkey

A backup holds chats, not the account. Restored onto a new phone, it normally lands in a new account: contacts see a new person to verify, and groups need a new invite. A member can change that with Recover my account with this passkey, under the backup's passkeys. It is off unless they choose it, because whoever holds the passkey can then be them.

The server keeps up to 16,384 characters of meta for each backup. A server older than this release keeps less, and refuses the recovery data. Update the server before members turn this on.

Error reports

When something goes wrong in a member's app, such as a crash or a Bluetooth link that fails, the app leaves an anonymous report on each server its account is a member of, the next time it is connected. Members with the maintain right read them under Manage community → Error reports, or on the admin page's Error reports, a table of problems with their kind, version, platform, count and when last seen. Open one for its full details and stack trace, copy it into a bug report, or clear them.

On a small server a report can still hint at who sent it, for example a problem only one member's platform has. Members turn reports off in the app under Settings → Server and advanced → Error reports to communities. Turn them off for the whole server with isolink-relay config set error_reports false.

Reports from the app

A member can tell the server's admins what went wrong or what would help: shake the phone twice, or tap Report a problem or idea in Settings. Shaking opens the report with a screenshot of the screen they were on, which they can draw on to circle what they mean, or leave out. They can add the app's debug report too, and see exactly what goes with it before sending. The debug report screen also has Send to relay.

Updates

The server checks isolink.app for a new version when it starts and then every hour, or as often as update_every says. When one is out, it writes a line to its log:

isolink-relay 0.7.18 is available (this is 0.7.17): run isolink-relay update

To install it:

isolink-relay update
  1. It reads the update feed at https://isolink.app/download/latest.json.
  2. It downloads the release for your system and checks it against the feed's SHA-256 checksum. On a mismatch, nothing changes.
  3. It swaps in the new program. On Windows the old one is moved aside to isolink-relay.exe.old, and deleted at the next start.
  4. It restarts the service: systemctl restart isolink-relay, or isolink-relay-service.exe restart.

Your settings, members and held messages stay as they are. Running the install command again does the same. Use isolink-relay --version to see which version you have.

From the app

When a newer release is out, Manage community offers to update, for members with the maintain right. The app and the admin page follow it step by step, downloading, restarting and back online, then show the new version. If the server comes back on the old version, they say the update didn't take. That needs the server to run as the service.

Updating by itself

Turn on Update by itself under Maintenance in Manage community, or run isolink-relay config set auto_update true. The server then installs each new release as soon as it finds it, and restarts. It is off by default.

Restarting from the app also needs the service. The server exits, and systemd or WinSW starts it again.

Running version 0.4.0? It doesn't have update yet. Run the install command for your system once. It updates the server in place and keeps your settings. After that, update does it for you.

Signed updates

Every update is checked against the SHA-256 in the update feed. That proves the download arrived intact, but not who made it. Signed updates add that proof: each release is signed with a key only Isolink holds.

A server whose build carries Isolink's update key installs an update only when its signature checks out. A server without one keeps working on the checksum alone, and says so in its log.

Health, status and logs

Health check

The server answers GET /healthz with ok and the number of devices connected now. The server's own bots count as devices.

curl -k https://localhost:8443/healthz
# ok 7

-k skips the certificate check, for a self-signed server. Behind a proxy, use http://localhost:8443/healthz. Besides /v1/relay and the public /v1/status, any other path gets not found.

isolink-relay on its own asks the health check for you. It prints Running at … · 3 members · 7 devices online, or Not running · … Start it: isolink-relay serve, or start the service.

Members with any right see a health word in Manage community. It says full when mail, files or backups use 90% of their total space. It says busy when 90% of max_devices are connected. Otherwise it says good.

Finding faults

When something doesn't work, start with these:

isolink-relay doctor        # what's wrong, and how to fix it
isolink-relay status        # running, version, devices online, each bot's state
isolink-relay bot log House # what a bot did with each message
isolink-relay logs -f       # the relay's log as it happens

The running server writes how it is doing to status.json in the data folder every 30 seconds, for status and doctor.

Logs

On Linux:

journalctl -u isolink-relay -f

On Windows, the logs are .log files next to isolink-relay-service.exe in the program folder. Each rolls over at 10 MB, and 5 old files are kept.

The log records, among other things:

Back up, move or remove the server

What the data folder holds

File or folderWhat it is
config.jsonThe address, port, name, certificate paths and pin.
cert.pem, key.pemThe self-signed certificate and its private key.
relay.jsonThe settings.
profile.jsonThe description, icon, emoji and colour.
members/One file per member: name, account keys, devices and rights.
invites/, invites-used.jsonUnused invites, kept as hashes, and who joined lately.
mail/Sealed messages held for each member device.
allowed/, refused/The allow list, and guests refused lately.
news.json, bot-news.jsonNews, and news of bots that joined. An announcement.json from before News moves into News.
key.jsonWhich server key is in use: its id, never the key.
forums/, forum-posts/, forum-files/Forums, their posts and comments, and sealed files. What members wrote is encrypted.
forum-replies/Who replied to each member, and where.
cards/The card library.
backups/Members' encrypted backups.
bots.jsonBots, their rules and the LLM profiles.
bots/<id>/Each bot's keys, chats and contact code.
env.jsonThe env store's secrets.
errors.jsonAnonymous error reports from members' apps.
logs/, status.jsonThe server's and each bot's logs, and how the server is doing.

Losing cert.pem and key.pem means a new certificate. Every member then needs a new invite. Losing members/ means everyone joins again. Losing bots/ loses the bots' accounts and chats.

Back it up

Copy the whole data folder while the server is stopped. With your own certificate or a --key-file, copy those files too.

# Linux
sudo systemctl stop isolink-relay
sudo tar -C /var/lib -czf isolink-relay-backup.tar.gz isolink-relay
sudo systemctl start isolink-relay
# Windows, in an administrator PowerShell
Stop-Service isolink-relay
Compress-Archive "$env:ProgramData\IsolinkRelay" isolink-relay-backup.zip
Start-Service isolink-relay

The copy holds the certificate key, the bots' keys and the env store's secrets. Keep it as private as the machine.

Move to a new machine

  1. Stop the server on the old machine.
  2. Copy the data folder to the same place on the new machine.
  3. Run the install command on the new machine. Don't run setup. The installer finds the data and starts the service. On Linux it also gives the folder to the server's user.
  4. Point the router's port forward at the new machine.

With the same address and certificate, devices reconnect on their own. Nobody needs a new invite.

Change the address

Run setup with the new address. It makes a new certificate. Members are kept, but every device needs a new invite, because old invites carry the old address and pin.

Remove it

There is no uninstall command. On Linux, undo what the installer did:

sudo systemctl disable --now isolink-relay
sudo rm /etc/systemd/system/isolink-relay.service /usr/local/bin/isolink-relay
sudo rm -r /usr/local/lib/isolink-relay
sudo systemctl daemon-reload
sudo userdel isolink-relay
sudo rm -r /var/lib/isolink-relay          # the data: members, mail, backups, keys

On Windows, in an administrator PowerShell:

& "$env:ProgramFiles\IsolinkRelay\isolink-relay-service.exe" stop
& "$env:ProgramFiles\IsolinkRelay\isolink-relay-service.exe" uninstall
Remove-NetFirewallRule -DisplayName "Isolink relay"
Remove-Item -Recurse "$env:ProgramFiles\IsolinkRelay"
Remove-Item -Recurse "$env:ProgramData\IsolinkRelay"   # the data: members, mail, backups, keys
# Take it off the system PATH
$path = [Environment]::GetEnvironmentVariable('Path', 'Machine')
[Environment]::SetEnvironmentVariable('Path', (($path -split ';') -ne "$env:ProgramFiles\IsolinkRelay") -join ';', 'Machine')

Deleting the data folder deletes every member's held messages and backups on the server. Take a copy first if anyone may need them.

Privacy

What the server can't read

What it can see

What leaves the machine

Your devices tell your saved contacts the server's address and certificate pin, so they can reach you. That address points at the server's machine, which may be your home. The record is signed, and contacts can pass it on to people looking for you.

Run the server only on a machine you trust, and invite only people you trust. Anyone with root or administrator rights on the machine can read everything in the data folder. With open joining, anyone may become a member, so treat what members can see as public.

Troubleshooting

The app says "Can't reach it"

The service starts, then stops

Look at the log. A bad setting stops serve with one of these:

mail_ttl must be a time such as 30s, 10m, 6h or 7d, not "7 days".
Unknown setting "mail_tll". Settings: guests, max_devices, …
See them all with: isolink-relay config

Fix it with config set or config unset, then start the service again.

"No server set up in …"

The command looked in another data folder. On Linux, use the isolink-relay command, not the program in /usr/local/lib. It runs as the server's user, on /var/lib/isolink-relay. Elsewhere, give --data.

"A server is already set up in …"

init won't replace a set-up without --force. Use setup to change answers and keep the certificate.

"that invite was already used or has expired"

Each invite works once, for the days it was made for. Make a new one with invite.

"Connected as a guest"

Your account isn't a member. The owner may have removed it, or this device may have been removed from your account. Ask the owner for a new invite.

The server shows as "Refused"

The guest policy turned the device away. The server's log says why: members only or not on the allow list. Add it with allow, or send an invite. After a refusal, the app waits 10 minutes before it tries again.

A bot doesn't answer

Updates fail

Limits

These are the defaults. Change them with isolink-relay config set. See the settings reference.

A server with the global preset starts from smaller limits for each device. See The global preset.

Some limits are fixed:

WhatLimit
Bots on a server20
Rules per bot, and server rules100 each
Bot replies to one contact10 a minute, 120 an hour
Model answer, program answer4000 characters
Model time60 seconds
Program time20 seconds by default, up to 300
News post2000 characters
Forums on a server100
Forum name, about40 characters, 280 characters
Post title, text, files200 characters, 10,000 characters, 10 files
Comment4000 characters, 1 file
Comments on a post1000
Bot greeting2000 characters
Server greeting1000 characters
Server name, description, icon64 characters, 280 characters, 64 KB
Card768 KB as JSON
Invites made in the app1 to 30 days, 20 an hour
Env store200 values, 16 KB each
Guests refused, remembered for allow200, for 7 days
Message inside a push3000 characters, sealed
Backup meta16,384 characters
Error reports kept200 problems, 30 reports an hour from each connection