Run your own Grid
A wisp Grid gives each person a wisp of their own on a server, each team a hub, and each task a sandbox if it asks for one. wisp Cloud is one Grid. You can run your own on your server and your domain: everything in the guides works the same there, at your addresses.
This guide uses grid.example.com as the grid’s address. Put yours wherever you see it.
What you need
- A Linux server (x64 or arm64) with a public IP address. wisp Cloud runs on 4 CPUs and 8 GB of memory.
- A domain name you can add DNS records to, or nothing: with no domain, the grid uses a name made from the
server’s IP (
203-0-113-10.sslip.io) and works with no DNS records at all (see No domain below). - Docker and gVisor (
runsc), so each box is a container with its own kernel boundary. For a grid only you and people you trust use, boxes can run as plain processes instead (no Docker; see step 5). - Rust to build the grid (step 3), and Node.js to install wisp itself.
1. DNS: two records
Every address on a grid is one name under its domain:
| Address | What it is |
|---|---|
grid.example.com |
the grid: sign-in, Teams, the account page |
ada.grid.example.com |
Ada’s own wisp (her cloud computer) |
acme.grid.example.com |
the team acme’s hub |
studio--ada.grid.example.com |
Ada’s computer studio, reached through the grid |
sb-1a2b3c4d--ada.grid.example.com |
one of Ada’s sandboxes |
p3000--ada.grid.example.com |
a preview: port 3000 inside Ada’s box |
So two records cover all of them: the grid’s name, and a wildcard one level under it.
grid.example.com. A 203.0.113.10*.grid.example.com. A 203.0.113.10Add AAAA records too if the server has an IPv6 address. Then check that any name resolves:
dig +short grid.example.comdig +short anything.grid.example.com # the same addressdig +short studio--ada.grid.example.com # the same addressThe grid can live at the top of a domain you keep for it (example.dev and *.example.dev) or one level under
(grid.example.com and *.grid.example.com). It needs the wildcard either way.
No domain: skip DNS
DNS is optional. Leave domain out of grid.json and the grid names itself after its IP address:
203-0-113-10.sslip.io. sslip.io is a free public DNS service that answers every name with an
IP in it with that IP, so ada.203-0-113-10.sslip.io, p3000--ada.203-0-113-10.sslip.io and every other address
already reach the server, with no records to add. The grid prints its address when it starts.
- The IP is the one the server reaches the internet from. On a cloud server that’s its public IP. Behind NAT (a home
server with a port forward), set it yourself:
"publicIp": "203.0.113.10"ingrid.jsonorGRID_PUBLIC_IP. IPv6 works too (2a01-4f8--1.sslip.io). - A LAN address (
192.168.…,10.…) makes a name many DNS resolvers refuse to answer (DNS-rebinding protection), so it may not resolve even on your own network; the grid warns when it starts. Use the address people reach the server at: its public IP, or its Tailscale IP (100.…) for a grid only your tailnet uses. - HTTPS works the same: Caddy gets a certificate per name (step 2). In the Caddyfile, write the sslip.io name where
this guide writes
grid.example.com:203-0-113-10.sslip.io, *.203-0-113-10.sslip.io. - The name follows the IP. If the server gets a new IP, the address changes: everyone signs in again at the new one,
and the sign-in apps (GitHub, Google) need the new callback URL. Move to your own domain whenever you want, by setting
domainand adding the two records above. - A grid on your laptop over
httpthat listens on127.0.0.1keepswisp.localhost. Browsers resolve*.localhostto the machine itself, so that needs no DNS either.
2. HTTPS
Put a reverse proxy in front of the grid that ends HTTPS and passes everything to it. The grid listens on
127.0.0.1:8080 and never faces the internet itself.
Caddy gets a certificate for each name the first time it’s opened, after it asks the
grid whether that name exists (/_grid/tls-ask), so a stranger can’t make it ask for certificates for names you don’t
have. This is what wisp Cloud runs (apps/grid/deploy/Caddyfile):
{ on_demand_tls { ask http://127.0.0.1:8080/_grid/tls-ask }}
grid.example.com, *.grid.example.com { tls { on_demand } reverse_proxy 127.0.0.1:8080 { flush_interval -1 }}flush_interval -1 passes the live streams (a task’s progress) straight through.
Get a wildcard certificate for *.grid.example.com and grid.example.com with a DNS challenge (certbot or lego
with your DNS provider’s plugin), then send every name to 127.0.0.1:8080. Keep the Host header, set
X-Forwarded-For, and turn off response buffering so streams arrive as they’re written. For nginx, that’s
proxy_set_header Host $host;, proxy_buffering off; and proxy_http_version 1.1; with the Upgrade and
Connection headers passed for WebSockets.
3. Build the grid
The grid isn’t in wisp’s release downloads yet, so it’s built from the repository. On the server (or anywhere you can build Linux binaries for it):
git clone https://github.com/WispAgents/wisp && cd wispcargo build --release --locked -p wisp-grid -p wisp-grid-boxdsudo install -m 755 target/release/wisp-grid target/release/wisp-grid-boxd /opt/wisp-grid/bin/wisp-grid is the grid. wisp-grid-boxd is the small root helper that runs the box containers, so the grid itself
never needs Docker access.
Then the image each box runs: wisp and the agents’ CLIs (Claude Code, Codex, Cursor, opencode, Copilot, Grok, Antigravity):
docker build -f apps/grid/deploy/image/Dockerfile --build-arg WISP_VERSION=$(npm view wisp-agents version) -t wisp-grid-user .4. Sign-in
People sign in with GitHub, Google, or any OpenID Connect issuer (GitLab, Microsoft Entra, Keycloak, Okta…). Make an OAuth app with each one you want, with the callback:
| Provider | Callback URL |
|---|---|
| GitHub (Settings → Developer settings → OAuth Apps) | https://grid.example.com/auth/github/callback |
| Google (Cloud console → Credentials) | https://grid.example.com/auth/google/callback |
OpenID Connect oidc:<name> |
https://grid.example.com/auth/oidc%3A<name>/callback |
Keep each client secret in a file only the grid’s user reads (chmod 600).
Your company’s SSO for the whole grid is one OIDC provider. For Okta, say (Entra’s issuer is
https://login.microsoftonline.com/<tenant-id>/v2.0, Google Workspace’s https://accounts.google.com):
"auth": { "providers": { "oidc:okta": { "label": "Acme Okta", "issuer": "https://acme.okta.com", "clientId": "0oa…", "clientSecretFile": "/var/lib/wisp-grid/secrets/okta" } }, "signup": "open", "allow": { "domains": ["acme.com"] }}Leave GitHub and Google out and the sign-in page offers only your SSO. Teams’ own SSO (each team its own
identity provider over OIDC or SAML 2.0, roles by group, SCIM) is a team’s to set; it’s off until you turn on
"teamSso": true. See Your
team’s own sign-in.
5. grid.json
The grid reads its settings from grid.json in its data folder (/var/lib/wisp-grid here):
{ "name": "Acme Grid", "domain": "grid.example.com", "scheme": "https", "listen": { "host": "127.0.0.1", "port": 8080 }, "publicPort": 443, "auth": { "providers": { "github": { "clientId": "Ov23…", "clientSecretFile": "/var/lib/wisp-grid/secrets/github-oauth" } }, "signup": "open", "allow": { "githubOrgs": ["acme"], "domains": ["example.com"] }, "admins": ["github:ada"], "teamSso": true }, "hostd": { "driver": "container", "idleMs": 600000, "maxRunning": 8, "container": { "boxd": "/run/wisp-grid/box.sock" } }, "channels": { "enabled": true }}domainis the grid’s name, withouthttps://. Every address in step 1 is made from it. Leave it out to use<ip>.sslip.iowith no DNS (publicIpsets the IP; see No domain in step 1).signupandallow: withopen, anyone who can sign in makes an account, unless anallowlist names who may (byemails, emaildomains,githubOrgs, oraccountslikegithub:ada): then only they can.closedtakes no new accounts at all. A team’s own SSO is that team’s word, never the grid’s: with anallowlist, it lets people in only whenteamsnames the team ("teams": ["acme"]).admins: the grid’s admins, by handle (ada) or by a way in (github:ada,oidc:okta:<subject>). They list people and turn them off from their own wisp (below).teamSso: teams may set their own SSO and SCIM (off unlesstrue).hostd.driver:containerruns each box in its own gVisor container throughwisp-grid-boxd.processruns boxes as processes of the grid’s user, with no isolation between them: only for a grid you alone, or people you trust with each other’s files, use.idleMs: a box sleeps this long after its last use (10 minutes here) and wakes when it’s opened, a trigger fires, or a schedule comes due.maxRunning: how many boxes may run at once.channels: on, Slack, Telegram and Discord can reach hubs and people’s wisps through the grid (https://<name>.grid.example.com/_in/…).- The master key (
secrets/master.json) encrypts every secret the grid keeps (hub secrets, sandboxes’ sign-ins, held messages). Make it once, before the first start (below). Without it the grid runs, but with no sandboxes and no secrets. Back it up: if it’s lost, the secrets people stored can’t be read.
6. Run it
The repository’s systemd units run the grid as an unprivileged wisp user and wisp-grid-boxd as root. First the
user, the folders and the master key:
sudo useradd --system --home /var/lib/wisp-grid wispsudo install -d -o wisp -g wisp -m 700 /var/lib/wisp-grid /var/lib/wisp-grid/secretssudo install -d -m 700 /var/lib/wisp-grid-boxes # the boxes' homes: root onlyprintf '{"current":"k1","keys":{"k1":"%s"}}\n' "$(openssl rand -base64 32)" \ | sudo install -o wisp -g wisp -m 600 /dev/stdin /var/lib/wisp-grid/secrets/master.jsonThen put grid.json in /var/lib/wisp-grid, and start everything:
sudo cp apps/grid/deploy/*.service /etc/systemd/system/sudo cp -R apps/grid/deploy /opt/wisp-grid/deploysudo systemctl daemon-reloadsudo systemctl enable --now wisp-grid-boxd wisp-grid caddyjournalctl -u wisp-grid -n 20 # "wisp Grid at https://grid.example.com …"apps/grid/deploy/firewall.sh (run by the grid’s unit) keeps boxes from reaching each other, the cloud metadata
address and outgoing mail.
7. Check it
curl -sI https://grid.example.com | head -1 # HTTP/2 200curl -s "http://127.0.0.1:8080/_grid/tls-ask?domain=grid.example.com" # {"ok":true}curl -s "http://127.0.0.1:8080/_grid/tls-ask?domain=nobody.grid.example.com" # {"ok":false}: no such accountThen sign in at https://grid.example.com, make an account, and open your own wisp at
https://<you>.grid.example.com. Its certificate comes on that first visit (a few seconds once).
Change who signs in, without a restart
grid.json’s auth is code: keep it in a repo, check it, apply it. The running grid reads it again on SIGHUP (the
unit’s systemctl reload wisp-grid), and a sign-in already on its way finishes:
wisp-grid auth show --data /var/lib/wisp-grid # what's in force (an inline secret shown as ***)wisp-grid auth check auth.json --data /var/lib/wisp-grid # would it load: providers, their secret files, allowwisp-grid auth apply auth.json --data /var/lib/wisp-grid # replace grid.json's auth, reload the running gridauth.json is the auth object (or a grid.json holding one). A file that doesn’t load is refused and nothing
changes.
Offboarding
Taking someone’s access away is immediate: their browser sessions, the desktop and phone apps’ sign-ins and their API keys stop working at once, and their computers’ tunnels close.
wisp-grid user list --data /var/lib/wisp-gridwisp-grid user disable ada --data /var/lib/wisp-grid # off and signed out everywhere; enable turns it back onwisp-grid user signout ada --data /var/lib/wisp-grid # signed out everywhere, still onOne of auth.admins does the same from their own wisp: wisp cloud users, wisp cloud users disable ada.
Narrowing allow signs out whoever it no longer lets in: at every reload, and every hour, the grid checks each
person with a live sign-in against allow (their verified address, their login, their GitHub orgs as they were at
their last sign-in) and signs out the rest. Someone removed from a GitHub org stays in until their next sign-in: for
immediate offboarding, use your SSO with SCIM, or wisp-grid user disable.
Audit log, backups and monitoring
wisp-grid audit --since 7d --data /var/lib/wisp-grid # who did what, newest firstwisp-grid audit --action team. --team acme --json --data /var/lib/wisp-grid # JSON Lines, a team's lineswisp-grid backup --data /var/lib/wisp-grid # a consistent copy of grid.db, while it runscurl -s https://grid.example.com/_grid/health # {"ok":true,"version":"…","db":true}- The audit log keeps
audit.keepDaysdays (365 unlessgrid.jsonsays"audit": { "keepDays": 730 }). The Grid’s admins read it from their wisp (wisp cloud audit), and team owners their team’s (wisp team audit acme). For a SIEM, pollGET /api/admin/audit?format=jsonl&after=<last id>with an admin’s device token (Authorization: Bearer wgd_…, from awisp cloud signinmade for the collector): the lines after your cursor, oldest first. - A backup is one file in
/var/lib/wisp-grid/backups(--outto put it elsewhere), mode 0600. Keepsecrets/master.jsonandgrid.jsonsafe as well, apart from it: without the master key, the secrets in a backup can’t be read. To restore: stop the grid, put the copy atgrid.db, start it. - Health: point your uptime monitor at
/_grid/health(200 while the database answers, 503 when it doesn’t).
See the security overview for everything a security review asks.
Use it from wisp
Each person signs their wisp in to your grid once:
wisp cloud signin https://grid.example.comFrom then on everything in the other guides points there: your cloud computer and sandboxes, and
team hubs. wisp grid init acme writes a hub folder for the grid you’re signed in to
(grid: https://grid.example.com, hub: https://acme.grid.example.com); --grid https://grid.example.com picks one
by hand.
A GitHub App for hubs (optional)
Hubs can reach the team’s private repos through a GitHub App of your grid instead of a GH_TOKEN secret, with an
hour’s token and webhooks. Make the App at your organization’s Settings → Developer settings → GitHub Apps with:
- Callback URL and Setup URL:
https://grid.example.com/github/setup, with Request user authorization (OAuth) during installation ticked; - Webhook URL:
https://grid.example.com/github/webhook, with a secret you make; - Repository permissions: Contents, Issues and Pull requests: read and write; Metadata: read;
- Subscribe to events: Issues, Pull request.
Then add it to grid.json:
"githubApp": { "id": "123456", "slug": "acme-grid", "clientId": "Iv23…", "clientSecretFile": "/var/lib/wisp-grid/secrets/github-app/client_secret", "privateKeyFile": "/var/lib/wisp-grid/secrets/github-app/key.pem", "webhookSecretFile": "/var/lib/wisp-grid/secrets/github-app/webhook_secret"}When something’s off
| What you see | Look at |
|---|---|
anything.grid.example.com doesn’t resolve |
the wildcard record (*.grid.example.com), and its TTL |
| a certificate error on a box’s address | the proxy can’t reach /_grid/tls-ask on 127.0.0.1:8080, or the name isn’t an account |
| “There’s nobody with that handle here.” | the address names no account, hub, computer or sandbox |
| sign-in comes back with an error | the provider’s callback URL (step 4) and domain in grid.json |
| a reload changed nothing | journalctl -u wisp-grid: a grid.json that doesn’t load is refused, and the settings in force stay |
| a box won’t start | journalctl -u wisp-grid-boxd, and that docker run --runtime=runsc works |
| the disk fills | the box image’s build cache: docker builder prune -af after each image build |