---
title: "Deploy Cap"
description: "Self-hosted Loom alternative: Cap Web, media server, MySQL and a bucket"
category: "Other"
url: https://railway.com/deploy/cap-2
---

# Deploy Cap

Self-hosted Loom alternative: Cap Web, media server, MySQL and a bucket

**[Deploy Cap on Railway](https://railway.com/template/cap-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/cap-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### media-server https://raw.githubusercontent.com/CapSoftware/Cap/cap-v0.6.3/apps/web/public/apple-touch-icon.png

- **Source:** https://github.com/aalfath/cap-railway-template
- **Health check:** /health

### cap-web https://raw.githubusercontent.com/CapSoftware/Cap/cap-v0.6.3/apps/web/public/apple-touch-icon.png

- **Source:** https://github.com/aalfath/cap-railway-template
- **Health check:** /api/status
- **Public domain:** Yes

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:8
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

## Buckets

- **Bucket**

## Documentation

# Deploy and Host Cap on Railway

Cap is an open-source alternative to Loom. You record your screen and camera with the Cap desktop app (macOS, Windows) or in the browser, then share a link. Cap Web stores the recordings and serves the share pages, comments and the dashboard. This template runs your own Cap Web server on Railway.

## About Hosting Cap

Cap Web is a Next.js server that needs MySQL and S3-compatible storage, plus a media server that runs FFmpeg for thumbnails, faststart and imports. This template deploys four pieces:

* both Cap services, built from our GitHub repo with the official images pinned by digest
* Railway MySQL on a volume
* a private Railway Bucket for recordings

Secrets are generated, and services talk over the private network. On start, Cap runs its database migrations and sets the bucket's CORS rule for your domain, so browser uploads work. You fill in nothing. To sign in, enter your email: the 6-digit code appears in cap-web's Deploy Logs until you add Resend for email.

## Common Use Cases

* Async video updates, walkthroughs and bug reports shared by link, with your recordings kept on your own storage
* A self-hosted upload server for the Cap desktop app and Chrome extension
* Team screen recording with comments and per-video sharing settings, without per-seat SaaS pricing

## Dependencies for Cap Hosting

* MySQL 8 (Railway MySQL, included)
* S3-compatible storage (Railway Bucket, included)

### Deployment Dependencies

* Cap source and licence (AGPLv3): https://github.com/CapSoftware/Cap
* Cap self-hosting docs: https://cap.so/docs/self-hosting
* Template repo with Dockerfiles and changelog: https://github.com/aalfath/cap-railway-template
* Cap desktop app downloads: https://cap.so/download

### Implementation Details

After deploying:

1. Open the cap-web domain and enter your email. Copy the code from cap-web → Deployments → Deploy Logs ("VERIFICATION CODE").
2. In Cap Desktop, set Settings → Cap Server URL to your domain.
3. Before you share the URL, restrict sign-ups with `CAP_ALLOWED_SIGNUP_DOMAINS=yourcompany.com` on cap-web. Anyone who can reach the server can otherwise create an account.

Optional variables on cap-web:

* `RESEND_API_KEY` and `RESEND_FROM_DOMAIN`: email sign-in codes
* `ASSEMBLY_API_KEY`, `GROQ_API_KEY` or `OPENAI_API_KEY`: transcription and AI summaries
* `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`, or the OIDC settings: single sign-on

For a custom domain, set `WEB_URL` to `https://YOUR-DOMAIN` and redeploy. Never change `DATABASE_ENCRYPTION_KEY`.

Updates: upstream publishes the server only under moving image tags, so we pin each tested build by digest in the template repo. When we bump it, Railway shows an update notice in your project. Read CHANGELOG.md, then apply the update. Migrations run on start.

## Why Deploy Cap on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Cap on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/cap-2
