Host it yourself
Run your own Drop on Cloudflare, Vercel, Netlify, Deno Deploy, or a VPS.
Start with the button for your host. You still supply GitHub sign-in and your admin email; the sections below cover those and the database. Each host page lists where its settings go.
License
Running Drop is free for one or two people, and trying it out is free at any size. A team of 3 or more needs a license, $9 per member a month; Pricing says who counts and how to buy one. Running Drop as a hosted service for others needs a license at any size. The
Sign-in and admins
Drop signs in with GitHub.
- Homepage URL:
https://<your-domain> - Authorization callback URL:
https://<your-domain>/api/auth/callback/github
Then set these on the deployment:
| Variable | What it is |
|---|---|
| GITHUB_CLIENT_ID | Your GitHub OAuth app's client ID. |
| GITHUB_CLIENT_SECRET | A client secret from the same app. |
| BETTER_AUTH_SECRET | Signs sessions and agent tokens. One per deployment: openssl rand -base64 32 |
| DROP_ADMINS | Admin emails, comma-separated. Whoever signs in with one of them is Admin. |
| VITEHUB_MEMBERS | Optional. Only these people (and the admins) sign in, open shared links, and use MCP: github:<id>, verified emails, @domains, or github-org:<org>, comma-separated. |
| DROP_MODE | Optional. team for a Drop one team runs: everyone signed in is a teammate, and new drops start shared with the Team. Defaults to personal. |
| DROP_PUBLIC_LINK_DAYS | Optional. Days a public link stays open. Empty: 7 on a team Drop, no limit on a personal one. 0 turns public links off. |
Drop reads its settings when it runs, so a change needs a restart, not a rebuild. Only the host and database are fixed at build time. Each setting also answers to a VITEHUB_ name, such as VITEHUB_DROP_MODE, which wins when both are set. VITEHUB_MEMBERS is owned by ViteHub Auth and only reads that name; VITEHUB_DROP_MEMBERS is unsupported. Booleans take true, false, 1, or 0; an invalid value stops Drop with an error naming the setting.
- Who signs in. Anyone with a GitHub account, as a Member.
VITEHUB_MEMBERSlets in only the people it lists, plus the admins, for publishing and viewing, shared links and MCP included. Each entry is a GitHub account (github:22072217), an email a sign-in method verified, an email domain (@example.com), or a GitHub organization (github-org:your-org), which makes sign-in ask forread:org. Matching any entry is enough. Take someone off, and they can't sign in again and lose their session within five minutes. It'sViteHub Auth's member list . - Who is Admin.
DROP_ADMINSlists admin emails, separated by commas or spaces, in any case. Whoever signs in with one, by a method that verified the email, is Admin. Restart to apply a change. Innuxt devand withDROP_TEST_SIGNIN, an unverified email counts too. - Roles come only from that list. Admins open Console in the sidebar, which opens this Drop in the
ViteHub Console , to ban and unban users, revoke sessions, and change plans whenDROP_QUOTASis on. Link the Drop there once and set theVITEHUB_CONSOLE_KEY_<NAME>variable it shows; the Console then lets in only people whose email is inDROP_ADMINS. On Node/VPS, build withDROP_PUBLIC_URL=https://drop.example.com; signed calls require this trusted origin at build time. For Docker, build your deployment image withdocker build --build-arg DROP_PUBLIC_URL=https://drop.example.com -t my-drop .instead of using the generic prebuilt image for Console access. Rebuild when the public origin changes. The ingress must passPOST /_vitehub/rpcand its subpaths, and/_vitehub/site, unchanged. An admin who opens/_vitehubon the Drop goes through the Console's Site access and comes back with a site cookie for 12 hours, which only ViteHub's page tools read. That cookie changes nothing in Drop: commenting follows the drop's share setting, as for anyone else, and Send still needs a signed-in Drop member. Roles are read-only and impersonation is disabled. Admins can find Review shares and Reports through Search. - Other sign-in. Change the Better Auth options in
server/auth.ts, or reuse an existing GitHub oauth2-proxy.
| Role | What they can do |
|---|---|
| Admin | Everything, plus members, settings, and the team's folders. |
| Member | Create, share, and comment on drops, and add to the team's folders. |
Team mode
A Drop is personal by default, like drop.vitehub.dev: drops start Only me, and people share them by public link. DROP_MODE=team makes it a Drop one team runs for itself, usually behind VITEHUB_MEMBERS or oauth2-proxy. Everyone signed in is then a teammate:
- New drops start shared with the Team.
- The sidebar leads with the Team tab: the team's folders, then teammates' drops shared with the team.
- Admins create team folders, with New › Folder and the team's folder switch, or New team folder on an empty Team tab, and write their descriptions. Everyone adds drops to them. Team folders has the rules.
DROP_PUBLIC_LINK_DAYS sets how many days a public link stays open. Left empty, it's 7 on a team Drop and no limit on a personal one; 0 turns public links off. A closed link falls back to Team, or to Only me on a personal Drop. This is separate from a drop's lifetime.
DROP_MODE=team
[email protected]
VITEHUB_MEMBERS=github-org:your-org
DROP_PUBLIC_LINK_DAYS=7Teams on a personal Drop
DROP_TEAMS=true lets people on a personal Drop make teams on Teams. A team works like a small team Drop inside yours: its owner and admins invite people by email and make its folders, and drops in those folders reach its members and their agents, nobody else. Drop sends no email, so whoever invites copies the link and sends it; the invitee joins by opening it, signed in with that email.
Deleting an account takes it off its teams, and Stripe bills each team one seat less, including while a payment is past due. A team the account owned passes to its oldest admin, or to its oldest member when it has no admin. A team with nobody else on it is permanently deleted with its folders and their contents, files, and comments, but not while it still pays: cancel its subscription first.
Past-due Stripe seat updates finish for every team before any memberships, ownership, or team content change. If a later update or local cleanup fails, Drop restores the attempted Stripe seat changes before rejecting the deletion. Memberships, ownership, and local seat counts commit together, so the account keeps all its teams on failure; retry the deletion once the service recovers. An error that also reports a failed Stripe restoration needs its team quantities checked in Stripe before retrying.
| Variable | What it does |
|---|---|
| DROP_TEAMS | Set true to turn teams on. Ignored on a team Drop, which is one team already. |
| DROP_FREE_TEAM_MEMBERS | Members a team has before it needs a subscription, invitations included. Defaults to 2. Applies only with billing on. |
| DROP_FREE_KEPT | Drops the Free plan keeps forever at once. Defaults to 10. Applies only with DROP_QUOTAS=true. |
Bill teams through Stripe
With billing on, a team past its free members needs the Team plan: one seat per member, kept in step with Stripe as people join and leave, with a 14-day trial. Everyone on a team that pays gets the Pro plan. /pricing then shows the Team plan below the license prices. When Stripe can't charge a team's card, the team is on the Free plan until payment succeeds, including after Stripe stops retrying. Its page asks its owner and admins to update the card in Stripe's billing portal instead of starting a second subscription.
| Variable | What it does |
|---|---|
| STRIPE_SECRET_KEY | Your Stripe secret key. |
| STRIPE_WEBHOOK_SECRET | The signing secret of a webhook to <origin>/api/auth/stripe/webhook that sends checkout.session.completed and the customer.subscription.* events. |
| STRIPE_TEAM_PRICE_ID | A recurring per-unit price for one member. |
| STRIPE_TEAM_ANNUAL_PRICE_ID | Optional: its yearly price, which adds a Pay yearly button. |
| STRIPE_MANAGED_PAYMENTS | Defaults to true: Stripe sells as merchant of record and files sales tax and VAT. Turn Managed Payments on in Stripe and give the product an eligible tax code. Set false to sell under your own account. |
Billing turns on once teams are on and the key, the webhook secret, and the price are all set.
Give apps their own domain
Apps and HTML docs run their own scripts, so by default Drop shows them in a sandbox with no origin, away from Drop and the reader's session. The sandbox also blocks localStorage, cookies, and URL changes. Drop swaps in temporary storage, but an app that routes by its URL breaks.
Set DROP_CONTENT_ORIGIN to a wildcard such as https://*.drop-usercontent.example.com, and serve every hostname under it from the same deployment. Each drop then runs on its own subdomain, as on a static host: storage and history work, and one app can't read what another stored. The subdomain is a hash of the drop's id, never the id, because hostnames are visible on the network. The hash is keyed with VITEHUB_SECRET, so set it too: openssl rand -base64 32, at least 32 characters.
- Use a domain that serves nothing else, ideally a separate registrable domain, because a page can set cookies for its parent domain. Drop's sign-in cookies use the
__Host-prefix, and API writes that carry cookies must come from Drop's own origin. - DNS and certificate. The wildcard needs a wildcard DNS record and a certificate that covers it. Cloudflare's free certificate covers one level under the zone, so
*.drop-usercontent.example.comneeds a paid one. To stay free on your own domain, put the*inside the first label:https://*-drop.example.comruns each drop at<hash>-drop.example.com. - No sign-in. These hostnames serve a blank page that the viewer fills, so private drops never pass through them. Keep them outside oauth2-proxy or any other login wall.
- A plain hostname such as
https://drop-usercontent.example.comalso works, but every drop then shares that origin, and its storage.
Expiry
Drops go to the Trash 30 days after their last visit (14 for temporary ones), stay restorable for 15 days, and are then deleted by the hourly cleanup job. Review and share explains what counts as a visit.
| Variable | What it does |
|---|---|
| DROP_EXPIRY_DAYS | Days a drop lives after its last visit. Defaults to 30. Set 0 to keep every drop. |
| DROP_CUSTOM_EXPIRY | Set false so only admins can keep drops. Defaults to true: owners and their agents can too. |
Shortening the window applies to existing drops at once.
Abuse and moderation
| Setting or page | What it does |
|---|---|
DROP_SHARE_APPROVAL=true | A member's public links wait until an admin approves that member on /admin/review. On a team Drop, a waiting link still reaches the team. Admins skip the wait, and links shared before you turn it on stay shared. |
/report | Anyone reports a shared link. Admins see reports on /admin/reports and dismiss them, quarantine the drop, or ban its owner, which takes down all their drops. Each report logs an audit event; Drop sends no email. |
DROP_ABUSE_EMAIL | Adds a public contact address to the abuse page. |
Before you open your Drop to the public, adapt app/pages/terms.vue, acceptable-use.vue, and abuse.vue to your jurisdiction, with a DMCA contact if you need one. Drops and their files are kept out of search engines.
Logs
Drop writes one structured
| Field | What it holds |
|---|---|
version, commitHash, deployment.host | The release that answered, and the host it runs on. |
user, actor | Who called: a person by id, an agent with its client's name. People's names and emails stay out. |
identity.denied, identity.session | Why Drop refused a session (banned or not-member), or that a session lookup failed. ViteHub Auth refuses sign-ins by VITEHUB_MEMBERS itself. |
auth.proxy.refused | Why ViteHub Auth refused a person the sign-in proxy vouched for, such as account_not_linked. For denied, auth.proxy.denied holds the refusing hook's code. |
mcp.auth | Whether an MCP request sent a token. If ViteHub verifies and refuses an MCP token, mcp.auth.reason says why (for example, expired or session_ended), and mcp.auth.clientId names the OAuth client if ViteHub could identify it. |
roomAccess.refused | Which of Drop's access rules refused a realtime connection. |
drop | The drop the request is about, and for a write what it did (change) and which fields (fields). |
mcp.calls | Each MCP tool call: the tool, its drop, how long it took, and its error. |
audit | Admin and account actions, abuse reports, and billing changes from Stripe. |
Kept events. Every event is kept today. Failures, requests slower than a second, and audits are kept even if you lower the sampling rate.
Left out. The health check and static files write no event. Upload URLs and password reset links lose their token, and IP addresses are masked.
The hourly cleanup writes an action: "cleanup" event with its runId when ViteHub supplies one, the scheduled time, what each step did, how long it took, and any failures.
Browser errors. ViteHub reports uncaught errors on browserError. Failures Drop catches go through its own reporter with the response status, request ID, and drop when known. It skips refusals, aborts, offline browsers, pages that are closing, and 5xx responses that carry Drop's own error body.
Usage counts
Drop counts which review pill controls people press, and how often each was on screen, so you can tell which controls earn their place. The counts carry no user, drop, or IP address: the browser sends tallies, and the server adds them to one row per day in the ui_usage table.
| Column | What it holds |
|---|---|
day | The UTC date, such as 2026-11-27. |
release | The version and commit that answered, such as 0.1.0+90c558bb. |
kind | The kind of drop open: markdown, html, site, and so on. |
mode | comment while comment mode was on, browse otherwise. |
control | The control, such as comments, area, share, or zen. shared/ui-usage.ts lists them all. |
via | shown when it came on screen, or how it was pressed: click, key, or palette for ⌘K. |
count | How many times that day. |
Shown counts each time a control appears in the pill on a page view, so a control that stays put counts once per drop opened, even across mode changes. The impression is attributed to the mode in which it appeared; a press is attributed to the mode in which it happened. Controls in the + menu count as shown when the menu opens. A shortcut or ⌘K press counts even when the control wasn't on screen, and area and page have no pill button, so they only count presses.
How it travels. The browser holds its tallies and sends them as one ui.usage event to /api/client-events when the page hides, 30 seconds after the first press, or after 200 distinct tallies. Each batch is logged like any client event and has its own rate limit, 30 a minute per address.
Turn it off with DROP_USAGE_COUNTS=false. The browser then counts and sends nothing, and the server answers a stray batch without storing or logging it. Restart to apply, as with any setting.
| Variable | What it does |
|---|---|
| DROP_USAGE_COUNTS | Set false to stop counting pill controls. Defaults to true. |
Read the counts
Presses against times shown, per control, for a date range. On Cloudflare:
npx wrangler d1 execute <your-d1-database> --remote --command "
SELECT control,
SUM(CASE WHEN via = 'shown' THEN count ELSE 0 END) AS shown,
SUM(CASE WHEN via = 'click' THEN count ELSE 0 END) AS clicks,
SUM(CASE WHEN via = 'key' THEN count ELSE 0 END) AS keys,
SUM(CASE WHEN via = 'palette' THEN count ELSE 0 END) AS palette,
SUM(CASE WHEN via <> 'shown' THEN count ELSE 0 END) AS pressed
FROM ui_usage
WHERE day BETWEEN '2026-11-01' AND '2026-11-30'
GROUP BY control
ORDER BY pressed DESC"On a VPS, run the same SELECT with sqlite3 against the file DROP_DATABASE_URL names, .data/database/drop.db by default. Add kind to the SELECT and GROUP BY to split by drop kind, and filter on release to compare two versions. Group by mode to compare press totals by mode, not presses per impression: a control pressed in comment mode may have appeared in browse mode.
Other client events
The browser reports a few other moments through the same route. Each is one log event with action: "client-event" and the event under client; none is stored in the database, and DROP_USAGE_COUNTS doesn't affect them.
| Event | When |
|---|---|
card.shown | Someone got Drop's card instead of a drop, with the reason: signed out, no access, expired, and so on. |
signin.clicked | Someone pressed a sign-in button, with the mode (github or proxy) and via (button or card). |
signin.switch_account | Someone signed in opened the sign-in page to switch accounts. |
signin.failed | Sign-in failed in the browser, with the error code and status when known. |
consent.allowed, consent.denied | Someone answered an agent's request to connect. |
consent.invalid_link | Someone opened a connect link that was broken or expired. |
consent.failed | Answering the request failed, with the code and status when known. |
ui.usage | A batch of the pill counts above. |
Database and migrations
VPS and Docker builds use local SQLite on persistent disk by default. The other hosts each use their own Cloudflare D1 database, over D1's HTTP API outside Cloudflare. All of them apply the migrations in server/databases/default/migrations, one folder each.
To create a D1 database for a host outside Cloudflare:
npx wrangler login
npx wrangler d1 create my-dropPut its id and name, your Cloudflare account id, and an account API token with Account › D1 › Edit, limited to your account, in the host's settings.
| Host | Applies migrations with |
|---|---|
| Cloudflare | pnpm run deploy, which the button runs: Wrangler applies them, then deploys the Worker. Workers Builds that run npx wrangler deploy need DROP_PRODUCTION_BRANCH. |
| Vercel, Netlify, Deno Deploy | pnpm db:migrate (ViteHub's vitehub database migrate) after the build, before publishing. |
| Docker | Drop itself before it listens, on SQLite after copying the file to backups/, and on D1 over Cloudflare's API. |
pnpm db:migrate and a Docker image on D1 need CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, and CLOUDFLARE_D1_DATABASE_ID. Every path records migrations in d1_migrations, as Wrangler does, and skips those already applied.
pnpm db:migrate and Drop's own migration on Docker refuse a migration that would delete existing data. Wrangler on Cloudflare has no such check, so read new migrations before you deploy there.
Give previews their own D1 database, or turn preview deployments off: a build with production D1 credentials migrates production.
The first folder creates a new database, and each later one changes it. Never edit a migration a database has already applied: it won't run again there. After you change the schema in server/databases/default/, pnpm db:generate (ViteHub's vitehub database generate) writes the next folder and adds it to d1-migrations.json, which gives each folder the file name D1 records it by, such as 0000_init.sql. Commit both, and never rename one.
Update
Each release lists what changed, and which versions migrate the database, on /api/health answers with the version and commit a deployment runs.
- Docker: pull the new image and restart, as Updates and backups shows. Drop backs up its SQLite database before it migrates.
- Cloudflare, Vercel, Netlify, Deno Deploy: the button copied Drop into a repository of yours, and the host deploys it on every push. Pull Drop's changes into it, from
mainor a release tag such asv0.1.0, and push; the host rebuilds and migrates:
git pull https://github.com/vite-hub/drop.git main
git pushPick a host
Cloudflare has everything Drop uses in one account. A VPS can keep all data on local disk. The serverless hosts use D1 over HTTP, one database per deployment.
| Host | Database | Files | Rate limits | Code images |
|---|---|---|---|---|
| Cloudflare | D1 | R2 | Workers rate limiting | PNG and SVG |
| Vercel | D1 over HTTP | Vercel Blob | Per instance | SVG |
| Netlify | D1 over HTTP | Netlify Blobs | Per instance | SVG |
| Deno Deploy | D1 over HTTP | R2 S3 API | Per instance | SVG |
| VPS | Local SQLite or D1 | Local disk | In memory | SVG |
Choose the host at build time
Drop builds for the host that ViteHub detects. ViteHub reads VITEHUB_HOST, then NITRO_PRESET or SERVER_PRESET, then the Cloudflare Workers Builds, Netlify, Vercel, or Deno markers. With none of them, a local DROP_DATABASE_URL selects VPS, and no signal builds for Cloudflare. Docker always builds for VPS.
VITEHUB_HOST=vercel pnpm build # explicit override: cloudflare, vercel, netlify, deno, or node for VPSWhen upgrading, replace DROP_HOST with VITEHUB_HOST in your build environment. Use VITEHUB_HOST=node in place of DROP_HOST=vps; other host names stay the same. Existing DROP_HOST settings still work during migration, but VITEHUB_HOST takes precedence when both are set.
DROP_DATABASE=sqlite or DROP_DATABASE=d1 picks the database at build time. SQLite needs the VPS preset and persistent disk, and an existing D1 database id keeps a VPS build on D1. To change drivers, rebuild and migrate the data yourself.
nuxt.config.ts maps each host to its ViteHub preset and drivers, so the app's code stays the same on every host.
What changes between hosts
| Cloudflare | Other hosts | |
|---|---|---|
| Code images | PNG (a Browser Run screenshot of the SVG) and SVG. | SVG only. Asking create_code_image for PNG fails with a clear error. |
| Rate limits | Cloudflare's rate limiting binding. | Counted in memory per server instance, so looser on serverless hosts. |
| Cleanup | Hourly. | Hourly on a VPS and Netlify, daily on Vercel so it works on Hobby. Deno Deploy has none: trashed drops and expired images stop being served but stay in the bucket. |
| Caching | Rendered Markdown and the file count in Workers KV. | In memory. |
The cleanup job moves expired drops to the Trash, deletes what has been there 15 days, and removes expired code images and OAuth clients unused for a day.
Check a deployment
The smoke test checks the public pages, the OAuth discovery documents, that /mcp asks agents to sign in, and the skills index. Add DROP_TOKEN=<an MCP access token> to also run uploads, sharing, and the MCP tools.
DROP_URL=https://<your-domain> pnpm test:e2e:deployedDevelop locally
pnpm install
pnpm db:migrate # once, and after schema changes
pnpm dev # http://localhost:3000Local dev runs against a local D1 and keeps files in .vitehub/data/blob. It has no GitHub app, so it also allows email and password sign-in: open /?signin=1.
Adopt an older SQLite migration ledger
Before upgrading a SQLite deployment that ran the original comment-suggestions migration, stop Drop and back up its database. Run node scripts/adopt-sqlite-ledger.mjs /path/to/drop.db from this checkout before running Drizzle or starting the new server. This adopts only the known shipped hash at its original journal timestamp; it never replays SQL or rewrites migration files. Other unknown hashes still fail closed. The Docker entry point performs this adoption after its backup.