§ 11 — Deploy
Demo in one command, production in three.
Local demo needs no keys and no infrastructure. A real deployment is the web app on Vercel, the API on Railway with Postgres and Redis, and — for the roadmap onchain mode — the program on devnet.
| Live deployment | URL | Host |
|---|---|---|
| Website | https://www.sealedsol.xyz | Vercel |
| API | https://api-production-01dc1743.up.railway.app | Railway |
| WebSocket | wss://api-production-01dc1743.up.railway.app/ws | Railway |
| Agent guide | /llms.txt | Railway |
§ 11.1Local quickstart
corepack enable # or install pnpm 12
pnpm install
pnpm dev # builds @sealed/shared, then API :4000 + web :3000
open http://localhost:3000/docs| Command | What it does |
|---|---|
pnpm typecheck · pnpm build | all workspaces |
pnpm --filter @sealed/e2e test:invariants | seeded property tests on clearing, fees, commitment, schema, demo world |
pnpm --filter @sealed/e2e test:e2e | boots the built API (and web) and checks them black-box |
scripts/verify.sh | full definition of done with a PASS/FAIL table |
pnpm anchor:build · pnpm anchor:test | Solana program |
§ 11.2Environment variables
Templates: apps/api/.env.example, apps/web/.env.example and the root .env.example (deploy-script inputs: Solana wallet, Railway and Vercel tokens). Secrets go in the platform's secret store, never in git.
API (Railway)
| Variable | Example | Purpose |
|---|---|---|
EXECUTION_MODE | offchain | offchain (custodial, default) or onchain (roadmap). |
COMPANY_WALLET | DDhVBh8HSwvYmCmXRowowUdDLcCc5vA9BM3GJMR3hm1j | Public address that receives deposits and is reported in proof of reserves. |
COMPANY_WALLET_SECRET_KEY | secret · operator-set | Signs withdrawals. Unset → payoutsEnabled=false and every withdrawal waits for manual approval. Never commit it. |
ADMIN_TOKEN | secret | Header token for /api/admin/withdrawals (approve / reject). |
DEPOSIT_CONFIRMATIONS | finalized | Confirmations required before a deposit is credited. |
HELIUS_API_KEY | secret | Builds the Helius RPC URL when SOLANA_RPC_URL is unset; deposit detection; Privacy Ring proxy. |
DEMO_MODE | auto | true when SOLANA_RPC_URL is unset. HELIUS_API_KEY alone does not turn demo off — set DEMO_MODE=false. |
DATABASE_URL | ${{Postgres.DATABASE_URL}} | Postgres. Optional in demo (memory store); required for custody. |
REDIS_URL | ${{Redis.REDIS_URL}} | Cache and job queue; in-process fallback. |
SOLANA_RPC_URL / SOLANA_WS_URL | — | Explicit RPC; wins over HELIUS_API_KEY. |
NETWORK | devnet | mainnet | devnet | localnet. |
PROGRAM_ID | 71geDP…5Tpy | Onchain mode program id (written by deploy-devnet.sh). |
RELAYER_SECRET_KEY | secret | base58 fee payer for reveal_bid (onchain). Keep it small. |
RELAYER_BOX_SEED | secret · 32-byte hex | x25519 key users seal reveals to. Unset → ephemeral keys that do not survive restarts. |
KEEPER_SECRET_KEY | secret | Signer for drips and fee distribution (onchain). |
CORS_ORIGIN | * | Comma-separated origins, e.g. your Vercel domain. |
PORT / HOST | 4000 / 0.0.0.0 | Railway injects PORT. |
JUPITER_API_URL | https://quote-api.jup.ag/v6 | Jupiter v6 base. |
WORKERS_ENABLED / DEMO_TICK_MS | true / 1000 | In-process workers; demo simulation tick. |
IDL_PATH | — | Defaults to programs/sealed-launchpad/idl/sealed_launchpad.json. |
Web (Vercel)
| Variable | Value |
|---|---|
NEXT_PUBLIC_API_URL | https://<railway-domain> (no trailing slash) |
NEXT_PUBLIC_WS_URL | wss://<railway-domain>/ws |
NEXT_PUBLIC_NETWORK | devnet | mainnet | localnet — anything but mainnet shows the Devnet / Demo label |
NEXT_PUBLIC_RPC_URL | public RPC for wallet transactions |
NEXT_PUBLIC_PROGRAM_ID | onchain mode program id |
NEXT_PUBLIC_JUPITER_API_URL, NEXT_PUBLIC_DEVNET_MINTS | optional overrides |
§ 11.3API on Railway
- Create a project and add the Postgres and Redis plugins.
- Add a service from the repo.
apps/api/railway.jsonbuilds withapps/api/Dockerfile(context = repo root), health-checks/api/health(120 s timeout) and restarts on failure. - Set the variables above. For custody add
EXECUTION_MODE=offchain,COMPANY_WALLET,COMPANY_WALLET_SECRET_KEY(operator only),ADMIN_TOKEN,DEPOSIT_CONFIRMATIONS,HELIUS_API_KEY,DEMO_MODE=falseandCORS_ORIGIN=https://<vercel-domain>. - Run
scripts/deploy-api.sh(wrapsrailway up; asks first,--yes/--dry-run). The container runsprisma db pushon boot whenDATABASE_URLis set.
docker build -f apps/api/Dockerfile -t sealed-api .
docker run -p 4000:4000 sealed-api§ 11.4Web on Vercel
- Import the repo with Root Directory
apps/web.vercel.jsoninstalls from the monorepo root, builds@sealed/shared→@sealed/defi→@sealed/web, and adds nosniff, referrer and frame-deny headers. - Set the web variables.
scripts/deploy-web.shfor production,--previewfor a preview.
§ 11.5Program on devnet (onchain mode)
Not deployed yetsolana-keygen new -o ~/.config/solana/id.json # then fund with ~5 devnet SOL
scripts/deploy-devnet.shThe script refuses mainnet RPCs, runs anchor build (and anchor keys sync if ids differ), anchor deploy using target/deploy/sealed_launchpad-keypair.json, copies the IDL to programs/sealed-launchpad/idl/, runs scripts/init-devnet.ts (protocol config, credit pools, mock quote mints) and writes PROGRAM_ID / NEXT_PUBLIC_PROGRAM_ID into the env files.