Self-host in a minute
One binary, no database to run: with nothing configured, the server keeps orgs in a SQLite file and drops on disk, both underCONTEXT_DROP_DATA_DIR.
docker build -t context-drop-server cli && docker run -p 8080:8080 -v cd-data:/data -e CONTEXT_DROP_ADMIN_TOKEN=… context-drop-server. Then start an org from the first machine and invite the rest. That is all a self-hosted server needs: accounts are optional (Sign-in).
Only when one server is not enough, set CONTEXT_DROP_DATABASE_URL to a Postgres database and run as many servers as you like behind a load balancer; they share everything through it.
To keep the server off the internet altogether, run it inside your Tailscale network: one more variable, and it needs no domain, certificate, proxy, or accounts.
API
GET /healthandGET /healthzreturnok.GET /install.shreturns the CLI installer, so people install from your server as they do from contextdrop.dev:curl -fsSL https://your-server/install.sh | bash. Your home page and dashboard show that command.POST /v1/dropsuploads a non-empty body. It accepts anonymous uploads whenCONTEXT_DROP_UPLOAD_TOKENis unset; otherwise it requiresAuthorization: Bearer <CONTEXT_DROP_UPLOAD_TOKEN>and acceptsX-Filename,Content-Type, andX-TTLheaders.GET /d/<opaque-id>downloads a file until its TTL expires. Anyone with the unguessable URL can open it; expired links return410 Gone.
storage.buckets.get; without it the server warns that it could not check).
Public hosting
LeaveCONTEXT_DROP_UPLOAD_TOKEN unset to accept uploads from anyone, including on https://contextdrop.dev. Deploy the updated server and remove any existing token from its environment to enable this behavior. Clients need only the endpoint.
Anonymous uploads are limited per client IP: by default 60 uploads and 250 MB per hour (CONTEXT_DROP_UPLOADS_PER_HOUR, CONTEXT_DROP_UPLOAD_BYTES_PER_HOUR; 0 turns a limit off). Over the limit, uploads get 429 with Retry-After. Uploads with the upload token are never limited. The counts live in memory per server instance, so with several instances the effective limit is multiplied; keep ingress rate limits for anything stricter.
Limits are keyed by client IP (by /64 for IPv6). Behind a proxy you must set CONTEXT_DROP_PROXY_HOPS, or every client shares the proxy’s address and one budget. It is the number of proxies that append to X-Forwarded-For in front of the server: 1 for Cloud Run alone, 2 behind a Google Cloud HTTPS load balancer (it appends the client and then its own address). The server takes the entry that many places from the right; anything further left is client-supplied. Leave it unset when clients connect directly. An invalid value stops the server from starting.
Link expiry does not delete GCS objects. Add a lifecycle rule that deletes them a day after the maximum TTL (8 days for the default 168h):
"matchesPrefix": ["your-prefix/drops/"] if the bucket holds anything else.
Run locally
Google Cloud Storage
Docker
Server environment
Orgs
The server also hosts orgs: pools of agents across machines. Start one from the first machine:CONTEXT_DROP_OPEN_SIGNUP=true, anyone who can reach the server can start an org without the admin token, up to 5 an hour from each address. Without it and without an admin token, nobody can start one. Members make invites (context-drop invite, or the dashboard): each adds one machine, within 24 hours. An owner sees the invites nobody has used and can revoke them. POST /v1/orgs with the admin token still makes an org with an org-wide join token (POST /v1/orgs/acme/join-token replaces it), for scripts.
Each org has a dashboard at the root of the server (/), which context-drop web opens signed in as the machine that ran it: a one-time link, traded for a 12-hour session that ends early if the machine leaves the org. It shows the org’s machines and agents, agents’ latest messages (as context-drop read prints them: each run of tool calls cut to its last four, counting the rest, so a busy agent’s transcript stays small), what agents said to each other (the Messages page), invites, Slack and Linear, and the org’s activity.
Getting a machine into an org is close to running commands on every machine in it, since a message becomes an agent’s next prompt. So:
- Invites are single-use: one machine (24 hours) or one person (7 days) each.
- Each machine chooses whose messages it takes (
--accept, see the CLI reference), and its daemon enforces it. - Machines can be removed from the console (an owner removes any, a member the ones they added) and by other machines with
context-drop machines rm(see the CLI reference for which). The credential stops working, its dashboard sessions end, invites it made that nobody used are revoked (as are a removed person’s), and the daemon is disconnected at once and told who removed it. On several servers sharing Postgres, a daemon held by another server is disconnected within a heartbeat or two (10 to 20 seconds), and is told the same. A console session opened from a machine (a server with no sign-in) removes what its machine may. - The Activity page lists, for anyone in the org: the org’s creation, machines joining (and how: invite, approval and by whom,
init, or the join token), leaving, and being removed (by which person or machine), invites made and revoked, people joining, leaving, being removed, and being made an owner or a member, what machines asked an owner to approve and who approved or turned it down, console sign-ins, Slack and Linear connected or disconnected, and every message between agents by time, sender, recipient, and kind (send, ask, or a person’s reply), with whether it was refused. Never what a message said; that is the Messages page, which is kept a shorter time and can be turned off. Each row keeps the address the request came from, where there was one. Rows are kept 90 days. An invite that was used is recorded as the join it made.
The Messages page
Messages is a chat view of what the org’s agents said to each other, for people to read. Nobody types there. Each pair of agents is a conversation; All Messages is every conversation in one feed.- What is in it: every message one agent sent another with
send(one row for each agent a group send reached), and every question asked withask, with the answer that came back from a copy of the other agent. A message that was refused or not delivered is kept with the reason. - What is not: anything a person, a mod, or someone on Slack or Linear sent an agent, and anything an agent sent to people. Those conversations stay on Slack and Linear.
- While it is open it follows along: new messages arrive within two seconds, a question shows while it is being answered, and the agent whose turn it is shows as working or blocked. Search finds agents and message text, and each message has a link that opens the console on it.
- Agents on one machine message each other without the server, so the CLI that sent the message reports it afterwards (
POST /v1/{org}/messages). It reports only when both agents are ones the machine shares with the org; a message to or from an agent that is not shared never leaves the machine. A CLI from before this page reports nothing, so its machine’s own conversations are missing until it updates. - Who reads it: anyone who can open the org’s console, the same people and machine sessions who can read every shared agent’s transcript.
CONTEXT_DROP_MESSAGE_DAYS days (30 unless set), and are deleted with the org. Set it to 0 and the server keeps none: agents message each other as before, the page says so, and Activity still lists who messaged whom.
Sign-in
A server needs no accounts: everything above works with none. Give it a GitHub OAuth app, a Google OAuth client, or both, and people sign in to the dashboard instead:<console URL> is CONTEXT_DROP_CONSOLE_URL if set (see below), else CONTEXT_DROP_BASE_URL. The sign-in page shows the providers that are configured. The server asks each only who the person is (GitHub’s user:email; Google’s openid email profile) and keeps their name and verified email, never a provider token. One person is one account: GitHub and Google sign-ins with the same verified email are the same person, and an account whose email the provider has not verified cannot sign in.
With sign-in on:
- People belong to orgs, as an owner (whoever created it) or a member. Anyone in an org sees its dashboard, invites a person with a link (
/join/…, 7 days, one person), adds machines, and can leave. An owner can also make anyone an owner or a member, which is how an org is handed over, remove members, and revoke invites. An org with people in it always has an owner: the only owner cannot become a member, or leave while others remain. Each person can create 5 orgs an hour. - Owners approve what machines change. In an org with an owner, a machine connecting or disconnecting Slack or Linear, deploying a mod, or removing a machine that chose whose messages it takes is answered
403 approval_required. A CLI that sentX-Context-Drop-Approval: askgets a code likeABCD-EFGH, a link to/approve?code=…, and a secret; it pollsPOST /v1/ORG/approvals/polland, once an owner approves on that page, sends the request again with the secret in the same header. An approval lasts 10 minutes and is spent by the one change it was asked for. The page shows the machine, the change, and the address it asked from, and warns when that address is not the owner’s own. An org with no people, and so every org on a server without sign-in, has nobody to ask: its machines make these changes directly, as before. - An owner can delete the org (People → Delete Org, typing its name), or approve a machine’s
context-drop delete-org; in an org with no owner, a machine deletes it only when it could remove every other machine itself. Its machines’ credentials stop working and their daemons are disconnected and told who deleted it; Slack and Linear are disconnected; and its people, invites, mods and their data, and activity log are deleted, so the name can be taken again and whoever takes it starts from nothing. The server’s own log records who deleted it. - Machines join by approval.
context-drop joinwith no invite callsPOST /v1/device/startand gets a code likeABCD-EFGH, a link to/device?code=…, and a secret to pollPOST /v1/device/pollwith. A signed-in person opens the link, picks one of their orgs or names a new one, and approves; the next poll returns the machine’s credential, once. A request lasts 10 minutes, and the server stores only hashes of the code and the secret. The approval page shows the address the request came from (by the same rule as rate limits: behindCONTEXT_DROP_PROXY_HOPSproxies, never a header the client wrote), the OS and version the machine sent, and how long ago it asked, and warns when that address is not the approver’s own. The dashboard shows who added each machine. - Invites still work:
context-drop inviteandjoin cdi_…, one machine each, as doesinit. A machine that joins with an invite a person made, or that a machine they added made, is theirs, as is the machine that rancontext-drop webwhen nobody added it yet. context-drop webopens a link that asks the person to sign in and adds them to the machine’s org. It brings in one person, within 10 minutes. That is how an org started withinitgets its people: the first to join becomes its owner.
A host for the dashboard
CONTEXT_DROP_CONSOLE_URL (an origin such as https://console.example.com, on another host than the base URL) gives the dashboard a host of its own. That host serves the dashboard at its root, and its sign-in callbacks; the base URL’s host serves a short home page that links to it, and the API machines use, which stays at the base URL. Every link the server hands out (approving a machine, inviting people, context-drop web) opens the console, and sessions live only on its host. Point both hosts at the same server. Unset, the dashboard is at the root of the base URL and there is no home page.
Machines hold a WebSocket to GET /v1/{org}/connect; POST /v1/{org}/list, /read, /send, and /leave take the machine’s credential as a bearer token. One server needs nothing more. To run several behind a load balancer, give them all the same CONTEXT_DROP_DATABASE_URL: they share which machine is connected to which server, and relay calls between them through Postgres. Keep at least one server always on; on Cloud Run, a daemon’s connection ends at the request timeout (at most an hour) and it reconnects on its own.
On a tailnet
CONTEXT_DROP_TAILSCALE=true makes the server a device in your Tailscale network, and serves it from there. Nothing listens on the internet. The tailnet tells the server which device each request comes from and who is signed in to it, so the server needs no accounts, no invites, and no admin token: your identity provider and your tailnet’s policy file already say who may reach it.
docker run -v cd-data:/data -e CONTEXT_DROP_TAILSCALE=true -e TS_AUTHKEY=… context-drop-server.
The server is at https://context-drop.<your-tailnet>.ts.net, with a certificate Tailscale issues and renews. The tailnet needs MagicDNS and HTTPS certificates turned on (both under DNS in the admin console); the server says so and stops if they are not. Without TS_AUTHKEY it logs a link, and joins when someone opens it. An auth key for a tag such as tag:context-drop keeps the server from being one person’s device, and gives the policy file a name for it. The server embeds Tailscale (tsnet): the host needs no Tailscale installed, and other Tailscale settings come from Tailscale’s own variables, such as TS_CONTROL_URL for Headscale.
Then, on any machine in the tailnet:
- Reaching the console is the sign-in. The server takes the person from the connection, so there is no sign-in page, no session cookie, and no sign-out. Someone taken out of the tailnet cannot open it.
- Machines join as their person’s, with no invite.
context-drop joinadds the machine to the org of whoever is signed in to the device, at once. There are no invites to leak:context-drop inviteis refused. A CLI from before this joins by approval in the browser, as on a server with sign-in. - A machine’s credential works only from its device, and only while that device’s person is in the org. Copied to another device, even another member’s, or used from off the tailnet, it is refused. The server checks on every call, and checks each daemon’s standing connection every minute, so taking a person out of the org or the tailnet cuts their machines off with them. The machines stay listed until removed.
- Anyone who can reach the server can start an org of their own (5 an hour each), and sees no other. Who can reach it is your tailnet policy’s to say;
CONTEXT_DROP_TAILSCALE_GRANTS_ONLYtakes even that away. - The host’s own listener knows nobody.
CONTEXT_DROP_ADDRdefaults to127.0.0.1:8080here, for health checks and for mods calling back. No machine credential works on it, and the console signs nobody in. Port 80 on the tailnet only redirects to HTTPS.
People from the tailnet policy
The policy file can also say who is in which org, as an app capability the server reads off each connection:- A person is in each org a grant names, as
ownerormember(the default). The org is made when the first of them shows up. With two grants for one org, owner wins. A grant never takes over a place someone already has from outside the policy, such as whoever started the org withinit: they stay as they were, changeable in the console, and stay when the grant goes. It can only make a member an owner, and that owner is then the policy’s. - The policy’s people are the policy’s: the console shows them as set by the tailnet policy and will not change their role or remove them. Change the grant, and the next request from that person follows it. Remove it, and they are out of the org, their machines with them. Granted again, a device takes its machine back with
context-drop setupunder the same name and a new credential. That holds for an owner too, even the last one: the policy wins, so when it names owners at all, have it name one for each org, since nobody in the console can make an owner of an org that has none. - A tagged device belongs to no person, so it joins only an org a grant names, and only one that exists. Its machine is nobody’s. It loses its place with the grant.
- People with no grant can still start an org and be invited to one in the console, as above. With
CONTEXT_DROP_TAILSCALE_GRANTS_ONLY=truethey cannot: the policy file is the only way into an org, and someone it does not name can do nothing here. - A grant the server cannot read grants nothing: a role other than
ownerormember, or an org name it would not accept, is logged and skipped. - An org with no owner has nobody to approve what machines change, so give each org an owner. Deleting an org the policy still names leaves the grant in place: the org comes back, empty, when one of its people next shows up.
the tailnet policy, and which person’s device or which tag each machine joined from.
Slack and Linear on a tailnet
Slack and Linear deliver webhooks from the internet, which cannot reach a tailnet.CONTEXT_DROP_TAILSCALE_FUNNEL=true opens a second listener through Tailscale Funnel, on the same name, that serves only what their servers call: the event webhooks, which are signed, and the pictures Slack shows beside agents’ messages. The console, the API, and every org’s routes are not found there. The policy file must give the server the funnel node attribute. Slack and Linear say what each makes public. Without Funnel their webhooks cannot arrive, so nothing a person writes there reaches an agent: turn it on before connecting either.
What a tailnet does not change
- It is still one server that reads every message it relays; here it is yours. End-to-end encryption between machines is not part of this.
- It keeps what agents say to each other for the Messages page, 30 days unless
CONTEXT_DROP_MESSAGE_DAYSsays otherwise, in its database on the server’s disk. Set it to0to keep none. - A message still becomes an agent’s next prompt. The tailnet says who sent it, not whether to act on it:
--acceptand owners’ approvals matter as much as before. - One server only. Its tailnet device keys live in
CONTEXT_DROP_TAILSCALE_DIR, so it cannot run on Cloud Run or behind a load balancer. - Tailscale’s client uploads its own diagnostic logs (about the connection, never what Context Drop carries) to Tailscale unless
TS_NO_LOGS_NO_SUPPORT=trueis set. - GitHub and Google sign-in,
CONTEXT_DROP_CONSOLE_URL, andCONTEXT_DROP_OPEN_SIGNUPdo not apply, and the server refuses to start with them set.
context-drop leave, then setup). Until they do, their old credentials work from any device on the tailnet and from nowhere else.
contextdrop.dev
https://contextdrop.dev runs on Cloud Run (service context-drop in GCP project context-drop, us-central1, 1–2 servers) with its state in Cloud SQL Postgres (context-drop:us-central1:context-drop, daily backups and point-in-time recovery). Servers share everything through the database, including which machine is connected to which server; a call for a machine on another server is relayed through Postgres. Drops are stored in the context-drop-prod bucket. Each release deploys itself: pushing a v* tag on main publishes the CLI (release.yml) and then runs deploy.yml, which builds the server image and runs deploy/cloudrun/deploy.sh as the github-actions-deploy service account through Workload Identity Federation. Run the Deploy workflow by hand from main to redeploy, or deploy/cloudrun/deploy.sh from your machine. DNS for contextdrop.dev and console.contextdrop.dev points at the service’s domain mappings; the console is the dashboard and contextdrop.dev the home page and API.
deploy/cloudrun/deploy.sh builds the image with Cloud Build and deploys it with the settings in deploy/cloudrun/env.yaml and secrets from Secret Manager: context-drop-database-url and context-drop-admin-token, plus the token key (context-drop-slack-key), the shared Slack app’s secrets (context-drop-slack-client-id, -client-secret, -signing-secret), Linear secrets (context-drop-linear-client-id, -client-secret, -webhook-secret), and the sign-in apps (context-drop-github-client-id, -github-client-secret, context-drop-google-client-id, -google-client-secret) when they exist. The token key turns on Slack (orgs make their own apps) and Linear. A deploy moves daemons to the new revision as their connections end; they reconnect on their own. Logs: gcloud run services logs read context-drop --project context-drop --region us-central1.
The dari org’s join token is in Secret Manager as context-drop-join-dari.