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.
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.
- Every device proves who it is. The server sends a random challenge. The device signs it, together with the server's host name, using its own key.
- Accounts you invite are members. Every device of a member account is a member. Any other Isolink device is a guest. A guest can only reach members, or leave mail for them.
- The server joins two connected devices when at least one of them is a member. Each connection carries an ordinary Isolink link, end-to-end encrypted between the two devices.
- When a member's device is offline, others can leave sealed messages for it. The server holds them for up to 7 days. It hands them over when the device connects, and deletes each one once the device confirms it.
- Messages and held mail are encrypted for the people talking. The server can't read them. It does see which devices talk, when, and roughly how much.
- Contacts don't need a server of their own. Your devices tell your saved contacts which communities reach you. Their app connects to your community as a guest to reach you.
- Each person joins with an invite you make, unless the server lets anyone who asks become a member, as the isolink.app community does. See Open joining.
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
- A machine that stays on. Releases are built for Windows (x64) and for Linux (x86_64, with systemd).
- An address that stays the same. At home or in a small office, use a dynamic DNS service. Many routers include one, for example TP-Link's
yourname.tplinkdns.com. DuckDNS and No-IP work too. On a server, use its domain name. - One TCP port forwarded on your router to that machine. These steps use
8443.
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
| What | Windows | Linux |
|---|---|---|
| Program | C:\Program Files\IsolinkRelay | /usr/local/lib/isolink-relay/isolink-relay |
The isolink-relay command | The same folder, added to PATH | /usr/local/bin/isolink-relay |
| Data folder | C:\ProgramData\IsolinkRelay | /var/lib/isolink-relay |
| Settings file | relay.json in the data folder | relay.json in the data folder |
| Service | isolink-relay, run by WinSW | isolink-relay.service, run by systemd |
| Runs as | LocalSystem | The isolink-relay system user |
| Logs | The program folder, next to isolink-relay-service.exe | journalctl -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
- Open an administrator PowerShell: right-click Start and choose Terminal (Admin).
- 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\IsolinkRelayas a Windows service that starts with Windows. It letsisolink-relay.exethrough the firewall and adds the folder to PATH.
irm https://isolink.app/relay/install.ps1 | iex
- Set it up. It asks a few questions, restarts the service and offers your first invite. Then join from the app.
isolink-relay setup
- 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
- Install it. This checks for x86_64 and systemd, downloads the latest version and checks its SHA-256 checksum. It adds the
isolink-relaycommand, anisolink-relaysystem user with its data folder, and a systemd service.
curl -fsSL https://isolink.app/relay/install.sh | sudo sh
- Set it up. It asks a few questions, then enables and starts the service. The service starts again on every boot.
isolink-relay setup
- 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.
| Question | What to give |
|---|---|
| The address devices use: your dynamic DNS name or domain | For example yourname.tplinkdns.com. |
| The port forwarded to this machine | The default is 8443. The server listens on this port, and devices connect to it. |
| A name for the server, such as Our house | Shown 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 members | Anyone 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.
| Flag | What it does |
|---|---|
--url https://… | Required. The address devices use, with its port, such as https://yourname.tplinkdns.com:8443. |
--port N | The port to listen on. The default is the URL's port, or 8443. Use it when the router forwards a different outside port. |
--name N | A name for the server, shown with invites. |
--cert F --key F | Your own certificate and key, as PEM files. Both are needed. They must load, or init stops. |
--plain | Plain HTTP, behind a proxy that does TLS. See Certificates and proxies. |
--acme | A certificate from Let's Encrypt, which the server gets and renews itself. See Let's Encrypt. |
--acme-http-port N | With --acme: the port on this machine that port 80 on your router reaches. The default is 80. |
--acme-dns-hook F | With --acme: prove the name with a DNS TXT record, set by this program, instead of over port 80. |
--acme-email E | With --acme: an address Let's Encrypt can reach you at. |
--acme-directory U | With --acme: another ACME certificate authority, or staging for Let's Encrypt's staging service, to try things without its rate limits. |
--force | Replaces 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.
- In Isolink, go to You → Communities.
- Tap Scan a code and point the camera at the QR code. Or tap Paste an invite and paste the code.
- 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.
| Value | Who connects |
|---|---|
open (default) | Any Isolink device. Guests can only reach members, or leave mail for them. |
members | Members' own devices only. |
allowlist | Members, 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.
| Right | What it lets them do |
|---|---|
invite | Make invites, see used and unused ones, and cancel unused ones. |
members | See the members and their devices, and remove members. |
guests | Choose the guest policy, and look after the allow list. |
settings | Change every setting but guests, and the server's name, description and icon. |
bots | Add and remove bots. Set their greetings, voice notes and videos, and the tools they may ask for. Add, move and remove fixed replies. |
announce | Post to News, and edit or delete what is there. |
cards | Remove anyone's card from the card library. |
forums | Make forums, remove any post or comment, pin posts, and lock, edit and delete any forum. |
maintain | Update and restart the server, when it runs as a service. |
grant | Give or take rights. |
Owners
- An owner holds every right.
- Only the server machine makes owners:
admin <account>, an invite made withinvite --admin, or the first invitesetupoffers. - Nothing in the app changes or removes an owner.
admin <account> --offtakes it away, with every right. - Admins made before rights existed are owners.
- Admins made before the
forumsright existed get it once, when the server first reads them.
Admins
adminis shorthand for every right butgrant:grant <account> admin.- Give single rights with
grant <account> invite bots. Take them withrevoke-scope <account> bots, orgrant --off. - Only owners give or take
grant. - Invites can carry rights:
invite --scope invite --scope cards. In the app, giving rights on an invite needsgrant. - Changes made on the machine count when the member's devices next connect. Changes made in the app reach connected devices at once.
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.
- On your router, forward TCP port 80 from outside to a port on this machine. It can be 80. When something here already uses 80, forward it to another port, such as 8080, and tell the guide (or
--acme-http-port 8080). - Keep the forward in place. The server renews every two months or so, and needs it each time.
- The Linux service may listen on ports below 1024. When you run the server yourself as another user, pick a port above 1024.
- Some internet providers block port 80 coming in. Use DNS below instead, if you can.
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
isolink-relay certs statusshows where the certificate is from, until when it's good, and how the last try went.isolink-relay certs renewgets a new one now. With the server running, it does so inside it and serves it at once.- Until the first certificate comes, the server runs on a stand-in no device trusts, and tries again every hour. Its log says what went wrong and what to forward.
- The files are
acme-cert.pem,acme-key.pemand the account keyacme-account.pemin the data folder.
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.
- The server checks the files every hour, and serves renewed ones without a restart.
- The server keeps the full paths. It doesn't copy the files.
- On Linux, the
isolink-relayuser must be able to read both files. The service can't see/home.
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.
- Use
init, notsetup.setupuses one port both for listening and for devices. - Give an address with no path. Devices connect to
/v1/relayunder it, and the server answers only there and at/healthz. - The proxy must pass the WebSocket upgrade through.
- With
trust_proxyon, the server takes each device's address from the last entry inX-Forwarded-For. Its per-address limits then see real addresses. - Devices check the proxy's certificate against public certificate authorities.
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
| Option | What 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, -h | Prints the help and every flag. |
--version | Prints the version. |
Setting up and running
| Command | What it does |
|---|---|
isolink-relay | Prints 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. |
setup | Asks 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. |
certs | Shows 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 | proxy | The guide for one kind. |
certs status | Where the certificate is from, until when it's good, and for Let's Encrypt how the last try went. |
certs renew | Gets 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. |
profile | Shows 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. |
config | Shows 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
| Command | What it does |
|---|---|
invite [--name N] [--days 3] | Makes a one-time invite and prints its QR code and code. |
invite --admin | An 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. |
invites | Lists unused invites: id, name, whether it makes an owner, its rights, who made it and when it expires. |
revoke <id> | Cancels an unused invite. |
members | Lists 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
| Command | What it does |
|---|---|
admin <account> | Makes a member an owner. |
admin <account> --off | Takes owner away, and every right with it. |
admin-login | Prints 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>… --off | Takes rights away. |
revoke-scope <account> <right>… | Takes rights away. The same as grant --off. |
Guests
| Command | What 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. |
allowed | Shows the guest policy, the allow list, and guests refused in the last week with their ids. |
News and forums
| Command | What 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. |
announce | Shows the newest post. |
announce --clear | Deletes the newest post. |
news | Lists 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 list | Lists 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
| Command | What 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 list | Lists 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|off | Lets a bot answer in group chats. Off until turned on. See Bots in groups. |
bot scripts <bot> on|off | Lets 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> | none | Writes 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 list | Lists 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 list | Lists 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 --relay | Lists the server's rules. |
rule remove --relay <rule> | Removes one of the server's rules. |
Models and secrets
| Command | What it does |
|---|---|
llm add <name> --provider anthropic|openai|gemini … | Adds an AI model for bots to use. See An AI model. |
llm list | Lists 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 list | Lists 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 NAME | Keeps a secret in the env store. It asks for the value without showing it, or reads it from stdin. |
env list | Lists the names and when each was set. Never the values. |
env unset NAME | Removes a value. |
env import <file> | Reads NAME=value lines from a .env file. |
Maintenance
| Command | What it does |
|---|---|
restart | Restarts 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. |
update | Installs the latest release and restarts the service. Run it as root or administrator. See Updates. |
update --check | Only says whether there is a newer release. |
update --no-restart | Installs it, but leaves the service running the old version until you restart it. |
version, --version | Prints the version. |
Finding faults
| Command | What 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
| Variable | What it does |
|---|---|
ISOLINK_RELAY_DATA | The data folder, when --data isn't given. The Linux service sets it to /var/lib/isolink-relay. |
ISOLINK_RELAY_ACME_DIRECTORY | The ACME certificate authority certs letsencrypt sets up, in place of Let's Encrypt. |
ISOLINK_RELAY_SERVICE | Tells 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.
- From the machine:
config set <key> <value>, or edit the file. The server reads the file when it starts. Restart it after a change. - From the app or the admin page: members with the
settingsright change settings under Manage community → Settings, or on the admin page's Settings. Each setting shows by name, such as Keep messages for, in the same sections in both. A setting with a fixed set of values, such asjoin, is picked from a list; sizes and times are a number and a unit. Theguestssetting needs theguestsright instead. The server checks the value, writes it torelay.json, and it counts at once. - As a
serveflag: each key is also a flag, with dashes for underscores, such as--mail-ttl 3d. A flag beats the file. The app shows it as fixed and can't change it. - On the machine only:
preset,programs_dirandcard_keys_from_app. The app shows them as fixed.
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
| Key | Default | What it does |
|---|---|---|
preset | home | Which 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. |
hosting | self (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. |
plan | none | The members' plan a service shows, such as Free. |
support_url, status_url, privacy_url, terms_url | none | https:// links the app shows under Help: where to get help, the status page, the privacy policy and the terms. |
join | invite | How someone becomes a member: invite, open (any device that asks) or paused (nobody new joins by asking; members carry on). |
joins_per_ip | 5 | Accounts one address can join an hour, while joining is open. |
member_prune_after | 3650d | How long a member who joined by asking may stay unseen before the server removes them, with what it holds for them. |
min_app | none | The oldest app version, such as 0.15.0, that should be offered open joining. Given in /v1/status. Older apps see no offer. |
status_note | none | A short line /v1/status gives for the app to show, such as planned maintenance. |
policy | none | Who may see or use each event, request and property, as key=level pairs over the preset. See Policies. |
guests | open | Who may connect without being a member: open, members or allowlist. |
Connections
| Key | Default | What it does |
|---|---|---|
max_devices | 2000 | Devices connected at once. More are turned away as busy. |
auth_timeout | 10s | Time a device has to sign in after it connects. |
hello_bytes | 16KB | Largest message accepted before a device signs in. Anything bigger, or any binary data, ends the connection unread. |
waiting_per_ip | 8 | Connections one address can have open before signing in. More get HTTP 429. |
connects_per_ip | 60 | New connections one address can make a minute. More get HTTP 429. |
online_per_ip | 32 | Devices one address can have connected at once. |
devices_per_account | 32 | Devices one account can have connected at once. |
trust_proxy | false | Take the address from X-Forwarded-For. Only behind your own reverse proxy, with --plain: anyone can set that header. |
ping_interval | 25s | How often idle connections are pinged to keep them open. |
max_frame_bytes | 5MB | Largest piece of data passed along a connection. |
circuits_per_device | 64 | Connections one device can have open at once. |
circuits_per_target | 8 | Connections one device can open to a single other device. |
opens_per_minute | 120 | Connections one device can open a minute. |
Held messages and files
| Key | Default | What it does |
|---|---|---|
drops_per_hour | 1200 | Messages one device can leave an hour. Pieces of files don't count. |
file_pieces_per_minute | 300 | Pieces of files one device can send a minute. |
mail_item_bytes | 256KB | Largest single held message, or piece of a file. |
mail_items_per_device | 500 | Messages held for one member device. |
mail_bytes_per_device | 32MB | Space for messages held for one member device. |
mail_bytes_total | 1GB | Space for messages held for all devices together. |
mail_ttl | 7d | Longest a message or file is held. A sender can ask for less. |
file_bytes_per_device | 256MB | Space 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_total | 4GB | Space for files held for all devices together. |
file_abandon_after | 6h | How 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
| Key | Default | What it does |
|---|---|---|
wake_every | 30s | Least time between two pushes that wake the same device for mail. |
call_wait | 25s | How long a call to a sleeping device waits for it to wake and connect. |
pushed_mail_ttl | 24h | How long a message that went out inside a push is kept, in case the device never says it arrived. |
Members' features
| Key | Default | What it does |
|---|---|---|
greeting | none | A welcome members see when they join, up to 1000 characters. Write \n for a new line. |
bot_guests | false | Let guests add the server's bots, not just members. |
bot_file_bytes | 10MB | Largest file a bot takes or sends. |
programs_dir | none | Folder 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_app | false | Let owners put key values for card actions into the env store from the app. Set it on the machine only. |
cards_per_account | 50 | Cards one account can publish to the card library. |
cards_total | 2000 | Cards the card library holds in all. |
themes_per_account | 20 | Themes one account can leave in the theme gallery. |
themes_total | 500 | Themes the theme gallery holds in all. |
theme_bytes | 2MB | Largest theme the theme gallery takes. |
templates_total | 100 | Card templates the server hosts for its members. |
backup_bytes_per_account | 64MB | Space for one account's encrypted backups, every version together. |
backup_bytes_total | 4GB | Space for all encrypted backups together. |
backup_versions | 10 | Backup versions kept for each account, to roll back to. |
news_keep | 500 | News items kept. The oldest go first, with their files. |
forums_by_members | false | Let every member make forums, not just those with the forums right. |
forum_file_bytes | 25MB | Largest photo, video or file in News or a forum. |
forum_bytes_per_account | 500MB | Space for one account's files in News and forums. |
forum_bytes_total | 5GB | Space for all files in News and forums together. |
forum_ttl | 3650d | How long a post is kept after its last comment. Checked at start and once a day. |
error_reports | true | Take anonymous error reports from members' apps. See Error reports. |
error_ttl | 30d | How long an error report is kept after the problem was last reported. |
user_reports | true | Take reports members send from the app: a problem or an idea, with a screenshot and debug report. See Reports from the app. |
user_report_ttl | 90d | How long a report sent from the app is kept. |
log_ttl | 30d | How 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_seconds | 300 | Longest voice note a bot writes out, in seconds. |
bot_answer_seconds | 300 | Longest 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_update | false | Install new releases by itself, and restart, when it can update itself. Members with maintain change it. |
update_every | 1h | How often the relay looks for a new release, to show it in the app or install it with auto_update. |
beta_updates | false | Take 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.
| Level | Who passes |
|---|---|
everyone | Any device that signed in, guests included. |
members | Members' devices. |
admins | Members who hold at least one right, and owners. |
owners | Owners only. |
off | Nobody. 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.
| Group | What it covers | Examples |
|---|---|---|
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.
| Keys | Level | Effect |
|---|---|---|
news.member, news.bot, news.forum, news.renamed, news.program, event.botJoined, prop.welcome.botNews | off | No "Sam joined" or other member and bot lines. |
prop.relay.members, prop.relay.online, prop.relay.owners | admins | Member and online counts, and owners' names, for admins only. |
request.forumCreate, request.cardPublish, request.themePublish, request.adminBotAdd, request.keyClaim | off | No 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.payload | members | Members 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.
joinset toopen. A device that asks to join becomes a member with an account of its own: no rights, and the server's usual space for each device.joins_per_ipkeeps one address from making many accounts. Past it, the device is told the server is busy.member_prune_afterremoves members who joined by asking once they have been unseen that long, with their held messages and their backup. Members who joined by invite, owners, bots and members with any right are never removed this way. The server checks once an hour.pausedstops new members joining by asking. Members already there carry on, and invites still work.
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. joiningtruewhenjoinisopen.falseforinviteandpaused.minApp- The
min_appsetting. Left out when empty. note- The
status_notesetting. 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.
| Key | home | global |
|---|---|---|
join | invite | open |
max_devices | 2000 | 50000 |
online_per_ip | 32 | 64 |
mail_bytes_per_device | 32MB | 8MB |
mail_bytes_total | 1GB | 4GB |
file_bytes_per_device | 256MB | 64MB |
file_bytes_total | 4GB | 64GB |
backup_bytes_per_account | 64MB | 32MB |
backup_bytes_total | 4GB | 256GB |
backup_versions | 10 | 3 |
member_prune_after | 3650d | 90d |
error_reports | true | false |
auto_update | false | false |
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.
- 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. - 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_everyfor each device. - 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.
- A call to a sleeping device sends a call push and waits up to
call_waitfor the device to connect.push.calldecides 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
| Variable | What it is |
|---|---|
FCM_SERVICE_ACCOUNT | A Firebase service account's JSON key, for Android. |
APNS_KEY, APNS_KEY_ID, APNS_TEAM_ID | An Apple push key (the .p8 file's contents), its key id and the team id, for iPhone. |
PUSH_TOKEN_KEY | 32 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.
| Variable | What it does |
|---|---|
RELAY_URL | Required. Where devices reach it, such as https://relay.example.com. |
PORT | Where it listens. The default is 8080. |
RELAY_NAME | Its name in the app. The default is Isolink. |
RELAY_SETTINGS | Settings as relay.json JSON, over the global preset with trust_proxy on. For example {"join": "paused"}. |
RELAY_DATA | Where it keeps records as files when there is no database. The default is /data. |
RELAY_DATABASE_URL | Postgres, for members, invites, mail and push registrations. Shared by every node. |
RELAY_DATABASE_CA | The 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_SECRET | An S3-compatible bucket for backups and forum files, which a container's disk would lose. |
RELAY_NODE, RELAY_NODE_URL | This 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_KEY | Push. 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:
- Each node says which devices it holds.
- Mail reaches a device whichever node it is on.
- A connection to a device on another node is sent to that node's own address,
RELAY_NODE_URL. Each node needs an address of its own, behind your load balancer. - A node that stops for 70 seconds is taken as gone.
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
- A server can have 20 bots. Each name is 1 to 64 characters, and unique.
--housemakes a bot the server's main bot. Members who join see the server's greeting in its chat. There is one house bot at a time.- A new bot starts within half a minute while the server runs. Members are then told it joined the community. That news stays for as long as the server keeps mail.
- Bots take contacts from members only. Set
bot_gueststotrueto let guests add them too. A bot never answers anyone else. - A bot greets each new contact with its greeting. The default is "Hi, I'm House. Send /help to see what I can do."
Rules
A rule has one trigger and one answer. Give the program for --run last on the line.
| Trigger | Matches |
|---|---|
--command /hours | The 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|any | A message with a file of that kind, or any file. |
--any | Any 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.
| Answer | What 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 flag | What 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.json | An interactive card sent with the answer, up to 768 KB. The server passes it on unread. |
--file F | With --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 N | With --run: seconds the program may take, 1 to 300. The default is 20. |
--shell | With --run: runs the line through a shell. |
--external host | With --run: a host the program sends messages to. Members are told. Repeat it for more. |
--env NAME | With --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
/helpis built in, and always answers. It lists the commands the person asking can use, and what the bot takes.- The bot's own rules, in order, then the server's rules (
rule add --relay). The first match answers. - If nothing matched, the bot's own
--anyrule, then the server's. - 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
| Written | Means |
|---|---|
<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.
- A fixed reply fills in
{person}, and nothing for an optional one not given. - A program gets
ISOLINK_ARG_PERSONfor each one given, and all of them inISOLINK_ARGS_JSON. Without--shell,{person}in a word of the command line is filled in too, still one argument of its own. A--shellline never has the values in it: read the variables. - A model hears the message, then a line with each argument and its value. It can also use the bot's own commands with arguments, through its
use_commandtool, and gets back what they answer.
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 take photos and files up to
bot_file_bytes(10 MB). Anything bigger gets "That file is too big for me." - Voice notes and audio (
audio) and videos (video) are off for every bot until you turn them on. A bot that doesn't take them says "This bot doesn't take voice notes." or "This bot doesn't take videos." Nothing goes on to a rule. A bot can also write out voice notes for its models. - A message with only a file matches
--has-fileand--anyrules.
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.
- In a group, a bot answers a message only when it is for the bot: one that mentions it with
@House, replies to one of its messages, or starts with one of its own commands./helpneeds a mention. - It answers members of the community, and guests when
bot_guestsis on. It never adds anyone as a contact or greets them in a group. - A model hears each message with the sender's name in front, and keeps the group apart from each member's own chat with the bot.
- Tools on members' devices stay in their own chats with the bot. In a group, a model has only
post_cardandanswer_card. - Bots never take calls.
Bot limits
- Each contact gets at most 10 replies a minute and 120 an hour. Messages past that get no answer.
- A bot accepts at most 20 new contacts a day, like any Isolink account.
- A bot works on 4 model answers and 2 programs at once. Another ask meanwhile gets "I'm busy. Try again in a moment."
- When a model or program fails, the bot says "That didn't work." The details go to the server's log.
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
| Flag | What it does |
|---|---|
<name> | The profile's name: 1 to 32 letters, digits, _ or -. |
--provider | anthropic, gemini, or openai for any OpenAI-compatible Chat Completions service. |
--model M | The model. Required, except for Anthropic, where the default is claude-opus-5-5. |
--url U | The service's base address, http:// or https://. The provider's own by default. |
--key-env VAR | Reads the key from VAR in the env store, or else from the server's own environment. |
--key-file PATH | Reads the key from this file. Make it readable only by the server. |
--system "…" | The system prompt, up to 20000 characters. |
--max-tokens N | The longest answer, 1 to 128000 tokens. The default is 8000. |
--history N | Earlier turns of each conversation sent along, 0 to 100. The default is 10. |
--effort E | Anthropic only: low, medium, high, xhigh or max. The default model is asked with low. |
--accepts kinds | The files the model takes: image, pdf, text, audio, video. |
--advisor M | Anthropic 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
- For Claude models, levels you haven't set mean:
lowHaiku,mediumSonnet with Opus as advisor,highthe bot's own model,xhighOpus atxhigheffort. - For other providers, a level you haven't set is the bot's own model.
- An advisor only goes with Claude (
--provider anthropic). Its tokens count toward bots' usage limits.
Keys
- Anthropic and Gemini need a key. Local services need none.
- Give
--key-envor--key-file, not both.bots.jsonholds only the variable's name or the file's path, never the key. --key-envlooks in the env store first. It then falls back to the server service's own environment.- On Linux,
llm addwarns when other users can read a--key-file. Fix it withchmod 600. The service can't see/home, so keep the file elsewhere, such as/etc/isolink-relay/. llm listnever prints a key.
Files to a model
| Provider | Takes by default | Can also take |
|---|---|---|
anthropic | image, pdf, text | nothing else |
openai | image, text | audio (WAV and MP3) |
gemini | image, pdf, text, audio, video | nothing 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
- Each contact's conversation is kept in memory only: the last
--historyturns. - It is forgotten after an hour of quiet, or a restart. With a disappearing-message timer on the chat, turns are forgotten when the timer passes.
- A model gets 60 seconds. Answers are cut at 4000 characters.
- The chat shows the bot as typing while it works.
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
| Flag | What it does |
|---|---|
--openai-compatible URL | The service's base address. The server posts to URL/audio/transcriptions. |
--model M | The model. The default is whisper-1. |
--key-env NAME | Reads the key from NAME in the env store, or else from the server's own environment. Local services need none. |
--run | The program and its arguments, last on the line. It runs without a shell. |
--timeout N | Seconds it may take, 1 to 600. The default is 120. |
- Turning it on turns voice notes (
audio) on for the bot. - A voice note to an
--llmrule is written out first. The bot sends the text back as a reply to the voice note, such as 🎤 "Is the shop open on Sunday?", then the model's answer. - The model gets the text, marked as a voice note, and not the audio. Other rules get the voice note as it is.
- The app records voice notes as AAC in an
.m4afile. They go to the service as they are. Whisper takes m4a, mp3, ogg, wav and webm. - Voice notes over
stt_max_seconds(5 minutes) get "That voice note is too long for me." and go nowhere. - If the service fails, the bot says "Couldn't make out that voice note." The reason goes to the server's log.
- A key never goes on the command line, into
bots.json, the log or the app.
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).
- The app shows a
.mdfile rendered in the chat, and other files as a file to open. - The server cleans the name and adds an extension when there is none.
- Each file is at most
bot_file_bytes, five an answer. They follow the answer's text. - Code stays in the message, in a fenced block labelled with its language. A block over 150 lines, or one that would push the message past 4000 characters, goes into a file instead, such as
code.py. The message says where it went.
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:
| Doc | What it covers |
|---|---|
cards | Interactive cards: the JSON, every block, answers and limits. |
card-scripts | Card scripts: the language, state, buttons, reaching web sites. |
formatting | How messages show: bold, italic, strike, code, quotes, bullets. |
markdown | Markdown files: what shows and how to send one. |
bot-tools | The 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:
| Variable | Value |
|---|---|
ISOLINK_TEXT | The whole message. |
ISOLINK_COMMAND | The first word, in lower case, when it starts with /. Otherwise empty. |
ISOLINK_ARGS | The 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_JSON | The same, as one JSON object: {"person":"John"}. |
ISOLINK_FROM | The sender's account id. |
ISOLINK_NAME | The sender's name, as the bot knows it. |
ISOLINK_BOT | The bot's id. |
ISOLINK_CHAT | The chat's id. |
ISOLINK_REPLY_TEXT | When the message is a reply: the message it quotes. |
ISOLINK_REPLY_FROM | Who wrote the quoted message, by account id. |
ISOLINK_REPLY_NAME | Their name, as the bot knows it. |
ISOLINK_FILES | The paths of the files the message brought, one a line. |
ISOLINK_FILE_NAMES | Their names as sent, one a line. |
ISOLINK_OUT | A fresh folder for this run. Files the program writes there go back as attachments. |
Your --env names | Each 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
- What it prints is the answer, cut at 4000 characters. Printing nothing sends no answer.
- It runs in
bots/<id>/run/in the data folder. - It gets 20 seconds, or
--timeout. A program that runs too long is killed. - If it exits with an error or runs too long, the bot says "That didn't work." The last lines of its stderr go to the server's log.
- Up to 10 files from
ISOLINK_OUTgo back, each up tobot_file_bytes. Empty files are skipped. - A rule whose
--envname isn't in the env store fails, and the log says which. - On Linux, the service sandbox applies. The program can't see
/home, and can write only in the data folder.
--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:
- Its real path, with links and
..followed, must be inside the folder. - It must be executable, and nobody else may write to it.
- It must belong to the community's user or root. On Windows it must be an
.exe,.bator.cmd, and the owner isn't checked.
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:
| Word | What 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 word | Itself: 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.
| Tool | Arguments | What comes back |
|---|---|---|
get_location | none | lat, lon, accuracy_m. Rounded to about 1 km unless the member chose exact. |
set_reminder | text, at | A reminder for the member in the bot's chat. |
ask_choice | question, options (2 to 10) | choice: the option tapped. |
ask_text | question | The text the member typed. |
send_card | card | An interactive card sent from the member into the chat. message is its id. |
pick_file | prompt, kinds | The member picks a file. It arrives as an attachment. Its name comes back. |
open_link | url | The link shows, and opened comes back when tapped. |
schedule_message | text, at | A message from the member to the bot, sent at at. |
run_command | name, 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
- A model. An
--llmrule gives the model the bot's tools. The bot asks the member's device and waits up to 2 minutes. A model makes at most 5 tool calls in one answer. - A fixed rule.
--toolasks the device first, with--argsas a JSON object of up to 16 KB. Then the--replygoes, with{result}replaced by what came back. If the member says no, or doesn't answer, the bot sends nothing and the log says why. - A program. A
--runprogram can't call tools.
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
- Each device keeps its own choice for each bot and tool: Ask, Always or Never.
- A device takes calls only from bots on its communities, and only for tools that bot offers. Nothing on the server can turn a tool on for a member.
- A device takes at most 10 calls a minute from one bot. A call nobody answers ends after 2 minutes with
no answer. - What a device sends back reaches the bot, so whoever runs the server, and a model's service when an
--llmrule asked.
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
- A value never goes on the command line. It stays out of your shell history.
- Values never cross the server's protocol, and never show in the app, the log,
config,llm listorenv list. - A name is letters, digits and
_, not starting with a digit. A value is up to 16 KB. The store holds 200 values. env importskips blank lines and#comments. It takesexport NAME=valueand quoted values too. Delete the file afterwards if nobody else should read it.- A
--runprogram gets only the names its rule lists with--env, never the whole store. - An LLM or speech-to-text profile's
--key-env NAMEreadsNAMEhere first.
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
- Every member sees every forum, and joins the ones they like. Guests see none.
- A post has a title, text, and up to 10 photos, videos or files of up to 25 MB each (
forum_file_bytes). A comment takes one file. Replies go one level deep. - Each account has one up or down vote on each post and comment. Posts sort by Hot, New or Top.
- Members with the
forumsright make forums. Withforums_by_memberson, every member can. A forum's maker edits and deletes it. - Authors edit and delete their own posts and comments. Members with
forumsremove any, pin posts and lock 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.
- A stolen disk, a copy of the data folder, a hacked server or a curious admin reading files can't read News or forums.
- Anyone the server lets in as a member can read them. Members' devices hand the key to new members, and the server decides who is a member. So whoever runs the server can join, or make a member up, and read them, as in any group anyone can join.
- Removed members keep the key they had. The server stops serving them anything.
- Posts and forums made on the machine, News posts from older apps and the server's own lines are not encrypted. The app marks them "From the server".
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
- The name is up to 64 characters. An empty name falls back to the address.
- The description is up to 280 characters. Write
\nfor a new line. - The icon is a PNG, JPEG or WebP picture of up to 64 KB.
- Without an icon, the app shows the emoji, or the name's initials, on the colour.
- Devices fetch the picture only when it changes.
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.
- A card is up to 768 KB as JSON, with an
idand atitle. - The server stores it as given, with who published it and when.
- Publishing the same id again replaces your own card. Someone else's id is taken.
- Only the publisher, or someone with the
cardsright, can remove a card. - Each account can publish 50 cards, and the server holds 2000. Change that with
cards_per_accountandcards_total.
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.
- The backup is locked with your passphrase. The server stores only that ciphertext.
- Each account has one slot of up to 64 MB (
backup_bytes_per_account), every version together. - The slot keeps up to 10 versions (
backup_versions). The server keeps every version from the last 24 hours, then the newest of each day for 7 days, then the newest of each week for 5 weeks. The newest is always kept. The oldest go first when space runs out. - All backups together take up to 4 GB (
backup_bytes_total).
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.
- Passkey. The app makes a passkey for
isolink.appin the phone's password manager, using the WebAuthn PRF extension. The passkey's secret output seals the backup's passphrase (HKDF-SHA256, then AES-256-GCM). The sealed passphrase is kept with the backup in the community as the slot'smeta. To restore, the member picks the passkey. - Password manager. One entry, named "Isolink backup · server address", holds the server backup code and the passphrase.
- Passphrase. The code and a passphrase the member keeps.
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.
- Turning it on asks for the passkey. The app makes a random 32-byte recovery key and seals it under the passkey's output. It seals the account key, its chain, the name, the account's devices and its communities under the recovery key. Both go into the slot's
meta, next to the sealed passphrase. - The account is sealed again with every backup, so a rotated key or a new device is in the next one. Passkeys added later recover it too. Turning it off takes the account out of the
meta. - On a new phone, restoring with that passkey offers Recover my account. The phone becomes another device of the same account, as if it had been linked. Contacts and the account's other devices hear of it, and it rejoins the account's communities.
- Mail held for the old phone is lost, because it was sealed to that phone's keys. Only a phone with no chats of its own yet can recover an account.
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.
- A report holds what broke (the error's message, cut to 300 characters), where (the part of the app and up to 120 lines of its stack), the app's version, the platform and its OS version, and what the app was doing.
- Before it leaves the phone, the app swaps contact and account ids, names, emails, addresses and anything key-shaped for placeholders, and drops quoted text. No message text, keys, account, device or phone model go with it.
- The server doesn't note which member sent a report. It groups reports of the same problem, keeps the newest with a count, and forgets a problem
error_ttlafter it was last reported. It keeps at most 200 problems, inerrors.json. - Each connection may send 30 reports an hour. The app sends the same problem to a server at most once a day.
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.
- A report is anonymous unless the sender chooses to give their name.
- The debug report covers the connection, calls, floating chats, the display, permissions and the app's switches and choices, scrubbed the same way as error reports. No message text or keys go with it.
- Members with the
maintainright read reports on the admin page's Reports: filter them, open one for its screenshot with the marks on or off, download it, and read the debug report laid out event by event. Mark a report seen or done, or clear them. - The server keeps reports for
user_report_ttl. Turn them off withisolink-relay config set user_reports false. Members turn shaking off under Settings.
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
- It reads the update feed at
https://isolink.app/download/latest.json. - It downloads the release for your system and checks it against the feed's SHA-256 checksum. On a mismatch, nothing changes.
- 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. - It restarts the service:
systemctl restart isolink-relay, orisolink-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.
- On Windows the service replaces its own program, then restarts.
- On Linux the program belongs to root, so the server leaves an
update-requestfile in its data folder. The installer'sisolink-relay-update.pathunit runsisolink-relay updateas root, which checks the download itself and restarts the server. - Installed on Linux before this unit existed? Run the install command once more to add it. The app says so until you do.
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
doctorchecks that the server is running and can read every file in its data folder, that its settings andbots.jsonload, that each bot started and has rules, and that each rule's model, program and key are there. It points out a bot that had errors in the last day, or took messages and answered none.- The server log. Everything the server prints also goes to
logs/relay.login the data folder, rolling over at 1 MB. Lines older thanlog_ttl(30 days) are cleared, from bots' debug logs too. Members withmaintainread it in the app under Manage community → Server log, or on the admin page's Log. Both follow new lines live, and can pause, filter by words and show only problems or errors. Each line is marked as an error, a warning or information. - A bot's debug log. Each bot keeps
logs/bot-<id>.log: each message it took (who, by the start of their account id, and its kind and length, never its words), which rule answered or why none did, which model or program ran, how long it took, and what failed. Members withbotsread it on the bot's page, under Debug log. - Nothing secret goes in. Every line is scrubbed before it is written or printed. Values from the env store and key files come out by name, such as
[redacted ANTHROPIC_API_KEY], and so does anything shaped like an API key, a token, a password or a private key. - A report to share.
isolink-relay report -o report.jsonputs the status, the doctor's checks, changed settings, bots, models (never keys), counts, error reports and the last 500 lines of each log in one scrubbed file.
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:
- the server's address, its certificate pin, its members count and any settings changed from their defaults, at start;
- each device that connects or leaves, by device id, and whether it is a member or a guest;
- refused devices, with their ids and the reason;
- connections turned away before signing in, with their address;
- who joined with which invite;
- every change made from the app, with who made it;
- bot errors, failed programs and failed model requests;
- a line when a new version is out.
Back up, move or remove the server
What the data folder holds
| File or folder | What it is |
|---|---|
config.json | The address, port, name, certificate paths and pin. |
cert.pem, key.pem | The self-signed certificate and its private key. |
relay.json | The settings. |
profile.json | The description, icon, emoji and colour. |
members/ | One file per member: name, account keys, devices and rights. |
invites/, invites-used.json | Unused 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.json | News, and news of bots that joined. An announcement.json from before News moves into News. |
key.json | Which 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.json | Bots, their rules and the LLM profiles. |
bots/<id>/ | Each bot's keys, chats and contact code. |
env.json | The env store's secrets. |
errors.json | Anonymous error reports from members' apps. |
logs/, status.json | The 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
- Stop the server on the old machine.
- Copy the data folder to the same place on the new machine.
- 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. - 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
- Messages between people. Each connection carries an end-to-end encrypted link.
- Messages it holds for offline devices. Each is sealed to the person it is for.
- Backups. Each is locked with its owner's passphrase.
- What members write in News and forums, and their files. They're sealed with a key only members' devices hold. See Greeting, News and forums.
What it can see
- Which Isolink devices and accounts connect, and their IP addresses.
- Which devices talk to each other, when, and roughly how much.
- Members' names, their account keys and device ids, and when each device was last seen.
- Members' push tokens, when the server sends pushes. They are sealed at rest when
PUSH_TOKEN_KEYis set. - The name a refused guest's device gives itself.
- Everything sent to its bots. Bots are accounts whose keys sit in the data folder.
- Cards in the card library.
- Who posts in News and forums, when, how big, and the votes. What is posted on the machine, and the server's own News lines.
What leaves the machine
- A bot with an
--llmrule sends each message to that model's service. The app says where. - A
--runprogram can send anything it gets anywhere. Mark it with--external, so the app says where. - The server asks isolink.app for updates when it starts and every
update_every(1 hour by default). - A server that sends pushes passes a wake, or with Messages in notifications a sealed message, to Google's or Apple's push service. They see the token, the time, the server's host name and the size of what they carry, never who a message is from or what it says.
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"
- Check that the port is forwarded to the right machine. Test from your phone's mobile data, not your home Wi-Fi. Many routers can't reach their own public address from inside.
- Check that the address is the dynamic DNS name your router keeps up to date, with the right port.
isolink-relayon its own prints the address the server uses. - Check the health check on the machine. If it fails, the service isn't running. On Windows, check Services. On Linux, run
systemctl status isolink-relay. - Check the machine's own firewall.
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
- Check that the person is a member, or that
bot_guestsistrue. - Check
bot rule list <bot>. Without a matching rule, a bot answers only commands, with a hint to send/help. - Check the log for lines starting
bot. A brokenbots.jsonis logged, and the bots keep their last good rules. bot code <bot>says "has no code yet" until the server has run the bot. Start the server and wait half a minute.
Updates fail
Could not check for updates: …: the machine can't reach isolink.app.Update failed: the download did not match its checksum; nothing was changed: try again later.could not replace … Run it as root, e.g. with sudo.: run it as root, or in an administrator PowerShell.This copy was built from source: it wasn't installed from a release. Install the release for your system over it.
Limits
These are the defaults. Change them with isolink-relay config set. See the settings reference.
- It holds up to 500 messages, or 32 MB, for each member device, and 1 GB in total.
- One held message, or piece of a file, can be up to 256 KB.
- It holds files for offline devices too: up to 256 MB for each device, and 4 GB in total. A file that won't fit is refused whole.
- It holds messages and files for up to 7 days.
- It takes up to 2000 devices at once.
- Each account gets 64 MB for backups, and 10 versions. All backups together take up to 4 GB.
- Bots take files up to 10 MB.
- News and forum files are up to 25 MB each. Each account gets 500 MB for them, and all together take up to 5 GB.
A server with the global preset starts from smaller limits for each device. See The global preset.
Some limits are fixed:
| What | Limit |
|---|---|
| Bots on a server | 20 |
| Rules per bot, and server rules | 100 each |
| Bot replies to one contact | 10 a minute, 120 an hour |
| Model answer, program answer | 4000 characters |
| Model time | 60 seconds |
| Program time | 20 seconds by default, up to 300 |
| News post | 2000 characters |
| Forums on a server | 100 |
| Forum name, about | 40 characters, 280 characters |
| Post title, text, files | 200 characters, 10,000 characters, 10 files |
| Comment | 4000 characters, 1 file |
| Comments on a post | 1000 |
| Bot greeting | 2000 characters |
| Server greeting | 1000 characters |
| Server name, description, icon | 64 characters, 280 characters, 64 KB |
| Card | 768 KB as JSON |
| Invites made in the app | 1 to 30 days, 20 an hour |
| Env store | 200 values, 16 KB each |
Guests refused, remembered for allow | 200, for 7 days |
| Message inside a push | 3000 characters, sealed |
Backup meta | 16,384 characters |
| Error reports kept | 200 problems, 30 reports an hour from each connection |