Pairing a browser or phone
Use `spl pair` to connect a browser, phone or other device to your workspace with its own account and token, holding the access you choose. Covers the one-click link, the QR code, manual pairing for servers, and removing a device.
This page is for people running their own workspace or using the API. If you use a workspace created at syncropel.com, start with Your hosted workspace.
Your command line uses the token in ~/.syncro/token. Browsers and phones can't read that file, so each needs its own service account and token. spl pair does it all in one command: it creates an account for the device with the access you choose, creates a token, and shows it in a form the other device can use.
Why pairing exists
A browser on syncropel.com has no way to sign in to a workspace on your computer. It doesn't know the address, and it has no token. There are three ways to fix that:
- Paste the token manually. Works, but painful: tokens are over 40 characters long and easy to mistype on a phone.
- Share the CLI's token with the browser. Bad: both would hold the same token, so you couldn't remove one without the other.
- Pair. Create a new service account just for this device, with the access you choose, and give its token to the device.
Pairing is option 3. Each device gets its own service account, which you can remove if the device is lost.
spl pair
spl pair \
--device "browser-chrome" \
--url "http://127.0.0.1:9100" \
--scopes adminThe command:
- Creates a new service account named after your device, linked to your identity, with the scopes you chose.
- Creates a token on the new account.
- Shows the pairing details three ways. Use the one that suits the device.
Output: three ways to pair
The command prints all three, easiest first. Use whichever is easiest for your device.
1. One-click URL: the fastest path. First line of the output is a clickable URL of the form:
https://syncropel.com/pair#<encoded-payload>Click it (or copy it into the browser you want to pair). The page checks the token with your workspace, saves it in the browser, and takes you to /tasks. You don't type, scan or paste anything.
The token is in the part of the link after #, which is never sent to any server. Once it is saved, the address bar changes to /tasks so the token isn't left in your browser history.
2. QR code: for phones with a camera. Underneath the URL, the CLI renders a QR code that encodes the same payload. Open syncropel.com on the phone, choose the QR tab, and point the camera at your terminal. The result is the same.
3. Plain-text payload: for paste flows. Below the QR is the plain url, token and device values, ready to paste into any device that can't click a URL or scan a QR (a headless server, a script, a config file).
All three end at the same place: the device stores the address and token securely and uses them for every request after that.
What the dashboard shows at each stage
syncropel.com shows your connection state with a coloured dot, so you can tell at a glance what to do:
| State | Dot | What it means |
|---|---|---|
| Workspace not reachable | gray | localhost:9100 isn't responding. Start spl serve. |
| Connected, insecure mode | amber DEV MODE | --insecure-localhost: sign-in is off for programs on this machine. The dashboard still pairs with a key, like any web page. |
| Pair required | amber | Your workspace wants a token; this browser has none. Run spl pair and click the printed URL. |
| Connected, secure | green | Paired, token valid, records stream normally. |
| Token expired or revoked | red | Your token was removed or has expired. Click Re-pair to run through pairing again. |
| Browser blocked the connection | gray | Chrome's local-network protection blocked the request. The dashboard explains how to fix it. |
For other problems, see Troubleshooting.
On a phone or iPad
syncropel.com on mobile does not look for a workspace at localhost:9100, because phones can't reach one there. Mobile users land on a welcome screen with two paths:
| Action | When to use |
|---|---|
| Scan pairing QR | You're standing next to your laptop and just ran spl pair --device browser-mobile --scopes admin. Point the phone camera at the printed QR. |
| Enter workspace URL | Your workspace is on Tailscale, a mesh VPN, or your home LAN. Type http://100.x.y.z:9100 (or whatever your private URL is) and connect. |
If you previously paired this phone and the workspace URL is stored, the dashboard connects to it directly and skips the welcome screen.
If you're seeing this welcome screen on a desktop and you do have a workspace at localhost, your viewport may be narrower than 640px or Chrome DevTools touch-emulation is on: widen the window or disable emulation.
Choose --url carefully
--url is the address the device you are pairing will use to reach your workspace, not the address your workspace uses for itself.
| Situation | URL to pass |
|---|---|
| Browser on the same machine as your workspace | http://127.0.0.1:9100 |
| Phone or iPad on the same home Wi-Fi | http://192.168.1.50:9100 (the LAN IP of the host) |
| Phone or iPad on the same private network (Tailscale, VPN) | http://100.x.y.z:9100 (the private network address of the host) |
| Over the public internet via reverse proxy | https://your-host.example.com (the proxy's public URL) |
If the device can't reach the URL, the pairing is saved but every request fails. Pick a URL that makes sense for where the device actually lives.
Scopes to give a device
When you leave --scopes out, the device can read and write records, and a name starting viewer- can only read. No name gives full access: ask for it with --scopes admin. The command says the access a device will get before it does anything:
| Device label prefix | Default scope | Use when |
|---|---|---|
browser-* (e.g. browser-chrome) | records:read,records:write | A browser paired with no --scopes. To drive the full dashboard, add --scopes admin. |
viewer-* (e.g. viewer-bigscreen) | records:read | Read-only display surface (a screen, a status board). |
emitter-* (e.g. emitter-linear) | records:read,records:write | An integration that writes records but doesn't need to administer your workspace. |
| Anything else | records:read,records:write | Read and write of records. The command names --scopes admin for full access. |
If the default isn't what you want, override with --scopes (comma-separated list). For example, --scopes records:read creates a viewer-only token regardless of device prefix.
The general rule: start narrow. admin is appropriate for a browser driving the dashboard but rarely the right choice for a phone or an integration. Add scopes only when something fails for lack of them.
Manual pairing (headless servers)
If the device can't scan a QR (a headless server, a CI runner, a script), run the same command and copy the plain-text payload printed under the QR code:
spl pair \
--device "ci-worker-1" \
--url "http://127.0.0.1:9100" \
--scopes records:readThe last block of the output holds the same three values the QR encodes:
Pairing payload (manual entry if QR fails):
url: http://127.0.0.1:9100
token: <your token>
device: ci-worker-1Copy those values into the target device's config file, environment, or secret manager. The token is shown only in this text output: -o json leaves it out on purpose.
What the payload contains
Exactly three fields:
url: the workspace URL the device will call.token: the bearer token. Used asAuthorization: Bearer <token>on every request.device: the display name you chose. Surfaced by the device so the user can tell one paired workspace from another.
Nothing else is transmitted. The token proves who the device is, the URL says where to send requests, and the device name is only a label.
Listing paired devices
spl service-account listDevices paired with spl pair show up as ordinary service accounts, with the scopes you gave them.
Revoking a lost device
If a phone is lost or a laptop is stolen, revoke the service account that was paired to it:
spl service-account list # find the account by device name
spl service-account revoke <sa_id> # cannot be undone; every token for this account stops workingThe device can still try its old token, but every request now returns 401 AUTH_INVALID. Your other paired devices are unaffected.
If you want to give the device a fresh token without removing the whole service account (for example, when you replace tokens regularly):
spl token rotate <sa_id>Then re-pair that device with the new token. The old token stops working; the service account stays.
Common pitfalls
"Pairing succeeded but the browser shows connected-no-records." The device stored the URL and token but the token doesn't have records:read. Check spl service-account list and re-pair with wider scopes.
"The QR code doesn't scan." Some terminals can't draw the QR code properly. Copy the plain-text details printed under it instead, or make the terminal window bigger and run the command again.
"I paired my phone but it can't reach my workspace over Wi-Fi." --url 127.0.0.1:9100 only reaches the host itself. Your phone needs your computer's address on the home network. Find it with ip addr or ifconfig and pair again.
See also
- Security model: tokens, service accounts, what is stored on disk
- Troubleshooting: step-by-step fixes for the most common problems
- Operator runbook: running your workspace day to day
Service accounts and tokens
Give browsers, phones, AI clients, other computers and other workspaces their own access to your workspace, each with the scopes you choose. You don't need a service account for a first run on Linux or macOS.
Troubleshooting
Fixes for the problems people most often hit when installing and starting Syncropel. Start here before asking for help.