Sandbox preview. All copy is [DRAFT] and waits for approval. Not indexed.

Docs

Self-hosting

Webinarclose is open source. You can run the whole thing on your own server for free. The hosted plans exist for people who would rather not run a server.

License

The code is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only); the full text is in the LICENSE file of the repository. You may run, study, change and share it. If you change it and let other people use your version over a network, you have to offer them the source code of that version under the same license.

Source code: [DRAFT] the repository address follows at launch.

Run it locally

You need Node 22 or newer and Docker with compose. The dev stack runs Postgres and LiveKit on 127.0.0.1; the API runs with npm.

# [DRAFT] repository address follows at launch
git clone <repository-url> webinarclose
cd webinarclose
cp .env.example .env            # fill in POSTGRES_PASSWORD (in the URL too) and LIVEKIT_API_SECRET
                                # e.g. openssl rand -hex 16 / openssl rand -hex 32
docker compose up -d            # postgres on 127.0.0.1:5450, LiveKit on 127.0.0.1:7880
npm install
npm run migrate
npm run create-tenant -- "Demo BV" test   # prints tenant_id and an API key ONCE
npm run dev                     # API on http://127.0.0.1:3150

Then follow the quickstart with http://127.0.0.1:3150 instead of https://api.webinarclose.com and your wc_test_... key. To test video by hand, open http://127.0.0.1:3150/join.html and paste the livekit_url and token from a join response.

The database variable is WC_DATABASE_URL, not DATABASE_URL, on purpose: Node's --env-file never overrides a variable the shell already has, so a generic name could quietly point the app at another database.

Production

The hosted service runs on one server with docker compose: API, Postgres, LiveKit and Caddy. The files are in deploy/ in the repository, and the full runbook is docs/deploy-hetzner.md. In short:

Swipe the table sideways

ServiceWhat it doesNetwork
postgresPostgres 16. Accounts, keys, webinars, registrations, attendance, mail outbox.Compose network only, no published port
apiThe Node 22 app, built from the Dockerfile.127.0.0.1:3150
livekitLiveKit server for the video.Host network: 7880 (signalling, behind Caddy), tcp 7881 (ICE over TCP), udp 50000-60000 (media), udp 3478 (TURN)
caddyTLS with Let's Encrypt, reverse proxy.Host network: 80, 443
  • Two host names: one for the API (api.) and one for LiveKit (lk.), both pointing at the server. deploy/Caddyfile proxies them to 127.0.0.1:3150 and 127.0.0.1:7880.
  • Open these ports in the firewall: tcp 80, 443 and 7881, udp 3478 and udp 50000-60000.
  • deploy/livekit.prod.yaml finds the public IP over STUN, enables TURN, sends webhooks to http://127.0.0.1:3150/livekit/webhook and keeps an empty room open for 5 minutes, so a host who reloads does not end the webinar. Its webhook.api_key must match LIVEKIT_API_KEY.
  • deploy/compose.prod.yml reads secrets from /opt/webinarclose/.env and sets WC_DATABASE_URL to the local Postgres itself.
  • Migrations are plain SQL files, run with tsx scripts/migrate.ts before the API starts. They only move forward.
  • scripts/deploy.sh and scripts/activate.sh are written for our own server; read them as an example. They ship the committed tree, build the image, migrate, start the stack, check health and roll back on failure. They refuse to deploy while a webinar is live, because a LiveKit restart ends every room.
  • scripts/pg-backup.sh makes a nightly pg_dump and keeps 7 days.

Environment variables

From .env.example in the repository. Copy it to .env, which is never committed.

Swipe the table sideways

VariableNeededWhat it is
POSTGRES_PASSWORDyesPassword for the Postgres container.
WC_DATABASE_URLyesPostgres URL for the app, for example postgres://webinarclose:...@127.0.0.1:5450/webinarclose.
LIVEKIT_API_KEYyesLiveKit key name. Must match webhook.api_key in the LiveKit config.
LIVEKIT_API_SECRETyesLiveKit secret, at least 32 characters.
LIVEKIT_URLyesLiveKit URL handed to clients in join responses and used for room calls, for example wss://lk.example.com.
HOST, PORTnoWhere the API listens. Default 127.0.0.1 and 3150.
WC_PUBLIC_URLyes in productionPublic base URL of the API: join links, calendar files, page previews, mails and checkout redirects.
WC_TRUST_PROXYno1 only behind your own reverse proxy, so the rate limit sees the client IP.
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETnoBilling. Leave the secret key empty and the billing routes answer 503; you create accounts by hand.
STRIPE_PRICE_STARTER, STRIPE_PRICE_PRO, STRIPE_PRICE_BUSINESSwith StripeMonthly EUR price ids for the three plans.
RESEND_API_KEY, MAIL_FROMnoMail through Resend. Empty: mails queue up but are not sent. The MAIL_FROM domain must be verified at Resend.
RESEND_RATE_PER_SECnoRequests per second to Resend. Default 2.
WC_PUBLIC_REG_DAILY_CAPnoMax public registrations per webinar per 24 hours. Default 5000.
WC_REMOTE_MCPno1 turns on the remote MCP server at POST /mcp. Off by default.
WEBINARCLOSE_API_URL, WEBINARCLOSE_API_KEYnoOnly for the local MCP server (npm run mcp): which API to call and with which key. See MCP setup.

Accounts and keys

Without Stripe, create an account and its first key on the command line. The key is printed once; only its sha256 hash is stored.

npm run create-tenant -- "Your company" live

In the production container: docker exec webinarclose-api-1 node_modules/.bin/tsx scripts/create-tenant.ts "Your company" live.