§ 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 deploymentURLHost
Websitehttps://www.sealedsol.xyzVercel
APIhttps://api-production-01dc1743.up.railway.appRailway
WebSocketwss://api-production-01dc1743.up.railway.app/wsRailway
Agent guide/llms.txtRailway
Devnet / demo deployments. Check /api/health for isDemo and the active mode before depositing anything.

§ 11.1Local quickstart

demo mode
corepack enable              # or install pnpm 12
pnpm install
pnpm dev                     # builds @sealed/shared, then API :4000 + web :3000
open http://localhost:3000/docs
CommandWhat it does
pnpm typecheck · pnpm buildall workspaces
pnpm --filter @sealed/e2e test:invariantsseeded property tests on clearing, fees, commitment, schema, demo world
pnpm --filter @sealed/e2e test:e2eboots the built API (and web) and checks them black-box
scripts/verify.shfull definition of done with a PASS/FAIL table
pnpm anchor:build · pnpm anchor:testSolana 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)

VariableExamplePurpose
EXECUTION_MODEoffchainoffchain (custodial, default) or onchain (roadmap).
COMPANY_WALLETDDhVBh8HSwvYmCmXRowowUdDLcCc5vA9BM3GJMR3hm1jPublic address that receives deposits and is reported in proof of reserves.
COMPANY_WALLET_SECRET_KEYsecret · operator-setSigns withdrawals. Unset → payoutsEnabled=false and every withdrawal waits for manual approval. Never commit it.
ADMIN_TOKENsecretHeader token for /api/admin/withdrawals (approve / reject).
DEPOSIT_CONFIRMATIONSfinalizedConfirmations required before a deposit is credited.
HELIUS_API_KEYsecretBuilds the Helius RPC URL when SOLANA_RPC_URL is unset; deposit detection; Privacy Ring proxy.
DEMO_MODEautotrue 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.
NETWORKdevnetmainnet | devnet | localnet.
PROGRAM_ID71geDP…5TpyOnchain mode program id (written by deploy-devnet.sh).
RELAYER_SECRET_KEYsecretbase58 fee payer for reveal_bid (onchain). Keep it small.
RELAYER_BOX_SEEDsecret · 32-byte hexx25519 key users seal reveals to. Unset → ephemeral keys that do not survive restarts.
KEEPER_SECRET_KEYsecretSigner for drips and fee distribution (onchain).
CORS_ORIGIN*Comma-separated origins, e.g. your Vercel domain.
PORT / HOST4000 / 0.0.0.0Railway injects PORT.
JUPITER_API_URLhttps://quote-api.jup.ag/v6Jupiter v6 base.
WORKERS_ENABLED / DEMO_TICK_MStrue / 1000In-process workers; demo simulation tick.
IDL_PATH—Defaults to programs/sealed-launchpad/idl/sealed_launchpad.json.
EXECUTION_MODE, COMPANY_WALLET*, ADMIN_TOKEN and DEPOSIT_CONFIRMATIONS belong to the custodial backend that is in development.

Web (Vercel)

VariableValue
NEXT_PUBLIC_API_URLhttps://<railway-domain> (no trailing slash)
NEXT_PUBLIC_WS_URLwss://<railway-domain>/ws
NEXT_PUBLIC_NETWORKdevnet | mainnet | localnet — anything but mainnet shows the Devnet / Demo label
NEXT_PUBLIC_RPC_URLpublic RPC for wallet transactions
NEXT_PUBLIC_PROGRAM_IDonchain mode program id
NEXT_PUBLIC_JUPITER_API_URL, NEXT_PUBLIC_DEVNET_MINTSoptional overrides
NEXT_PUBLIC_* values are inlined at build time; redeploy after changing them.

§ 11.3API on Railway

  1. Create a project and add the Postgres and Redis plugins.
  2. Add a service from the repo. apps/api/railway.json builds with apps/api/Dockerfile (context = repo root), health-checks /api/health (120 s timeout) and restarts on failure.
  3. 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=false and CORS_ORIGIN=https://<vercel-domain>.
  4. Run scripts/deploy-api.sh (wraps railway up; asks first, --yes / --dry-run). The container runs prisma db push on boot when DATABASE_URL is set.
local image
docker build -f apps/api/Dockerfile -t sealed-api .
docker run -p 4000:4000 sealed-api

§ 11.4Web on Vercel

  1. Import the repo with Root Directory apps/web. vercel.json installs from the monorepo root, builds @sealed/shared → @sealed/defi → @sealed/web, and adds nosniff, referrer and frame-deny headers.
  2. Set the web variables.
  3. scripts/deploy-web.sh for production, --preview for a preview.

§ 11.5Program on devnet (onchain mode)

Not deployed yet
deploy-devnet.sh
solana-keygen new -o ~/.config/solana/id.json   # then fund with ~5 devnet SOL
scripts/deploy-devnet.sh

The 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.