Cap Screen Recording and Sharing
Deploys Cap, an open-source screen recorder with shareable links and comments, with its web app, an ffmpeg media server, MySQL and a Railway Bucket for recordings. Cap Desktop can point at your deployment, so videos stay in your own project.
What you get
- Cap web app (dashboard, share pages and the API used by Cap Desktop), image pinned by digest
- A private Cap Media Server running ffmpeg for transcoding, thumbnails and previews
- MySQL 9.7 on a volume for accounts, video metadata and comments
- A Railway Bucket for recordings, with the CORS rule browser uploads need applied by a one-shot job
- A cron job every 15 minutes that retries failed or stalled video processing
Good for
- Asynchronous updates and stand-ups recorded instead of written
- Bug reports that show the problem on screen
- Onboarding, support and how-to walkthroughs on a URL you control
- Recordings of systems that must not leave your own infrastructure
Cost
Cost tracks recording volume more than uptime. Idle figures measured locally on the pinned images: Cap about 300 MB, Cap Media Server about 100 MB and MySQL about 270 MB of RAM, roughly 0.67 GB in total. The media server peaks at 1 to 2 GB while transcoding, so Hobby is the suggested plan.
Services in this template
- Cap Media Server · image
ghcr.io/capsoftware/cap-media-server@sha256:2dc90e055447026d7ff70656344cde74ec91b9d458a6050d9be6040a7074b62b - Bucket CORS · image
amazon/aws-cli:2.37.12 - Cap Maintenance · image
curlimages/curl:8.22.0 - MySQL · image
mysql:9.7.2 - Cap · image
ghcr.io/capsoftware/cap-web@sha256:8ee4cbd3fd87f88f538831aed06c954c525db9c2426a62abeaf0ca307c5e1ce9
Questions people ask
How do I log in?
Open the public URL and enter your email. Until you add a Resend API key, the 6-digit login code is written to the Cap service logs; copy it from there. Before inviting others, set RESEND_API_KEY and RESEND_FROM_DOMAIN and optionally restrict sign-ups with CAP_ALLOWED_SIGNUP_DOMAINS. In Cap Desktop, set the server URL to your domain.
Where are recordings stored?
In the Railway Bucket; browsers and the desktop app upload to it directly. MySQL has a volume with no public proxy. Back up MySQL before upgrades.
How do I upgrade?
Cap publishes rolling latest images, so the template pins digests. Set new digests on Cap and Cap Media Server together, back up MySQL and redeploy; migrations run at boot. Keep Cap at one replica and scale it vertically.
How do I use a custom domain?
Add it to the Cap service, update WEB_URL, add the domain to CORS_CONFIGURATION on the Bucket CORS service and redeploy both.
What is the licence?
The Cap web app and media server are AGPL-3.0 (the media server bundles ffmpeg), and MySQL is GPL-2.0. This is a community template, not affiliated with Cap.
Full template README
Deploy and Host Cap with Railway
Cap is an open-source screen recorder: record your screen and camera, get a shareable link right away, and collect comments on the video. This community template runs Cap's web app and ffmpeg media server on Railway with MySQL and a Railway Bucket for the recordings, so your videos stay in your own project.
About Hosting Cap
Cap is a Next.js web app that hosts the dashboard, share pages and the API used by Cap Desktop, plus a media server that runs ffmpeg for transcoding, thumbnails and previews. It needs MySQL for accounts and video metadata and S3-compatible storage for the files, which browsers and the desktop app upload to directly. This template uses Cap's official images pinned by digest, a Railway Bucket with the CORS rule browser uploads need, a private media server with a generated callback secret, a database wait so first boot does not race MySQL, and a small cron job that retries failed video processing. All secrets are generated at deploy time.
Common Use Cases
- Async updates and stand-ups recorded in a few minutes instead of long written reports
- Bug reports that show the problem on screen, linked from your issue tracker
- Onboarding, support and how-to walkthroughs on a URL you control
- Recordings of customer or internal systems that must not leave your own infrastructure
Dependencies for Cap Hosting
- Cap web app (
ghcr.io/capsoftware/cap-web, digest-pinned) - Cap media server with ffmpeg (
ghcr.io/capsoftware/cap-media-server, digest-pinned) - MySQL (Railway MySQL 9.7)
- S3-compatible object storage (Railway Bucket)
- Optional: a Resend account for login and notification e-mails
Deployment Dependencies
- Cap self-hosting guide: https://cap.so/docs/self-hosting
- Cap source and Docker Compose files: https://github.com/CapSoftware/Cap
- Environment variable reference: https://github.com/CapSoftware/Cap/blob/main/packages/env/server.ts
- Resend (e-mail API): https://resend.com
- Railway Buckets: https://docs.railway.com/storage-buckets
Implementation Details
| Service | Image | Role |
|---|---|---|
| Cap | ghcr.io/capsoftware/cap-web (digest) |
Web app and API on the public domain; runs database migrations at boot |
| Cap Media Server | ghcr.io/capsoftware/cap-media-server (digest) |
ffmpeg processing, private network only |
| MySQL | mysql:9.7.2 |
Accounts, videos, comments (volume, no public proxy) |
| Bucket | Railway Bucket | Recordings, thumbnails, exports |
| Bucket CORS | amazon/aws-cli:2.37.12 |
One-shot job that sets the bucket CORS rule for Cap's domain |
| Cap Maintenance | curlimages/curl:8.22.0 |
Cron every 15 minutes: retries failed or stalled video processing |
First login: open the public URL and enter your e-mail. Until you add a Resend API key, the 6-digit login code is written to the Cap service logs; copy it from there. Before inviting others, set RESEND_API_KEY and RESEND_FROM_DOMAIN (Resend is an HTTP API, so it works on every Railway plan) and optionally restrict sign-ups with CAP_ALLOWED_SIGNUP_DOMAINS. In Cap Desktop, set the server URL to https://{your-domain}.
Custom domain: add it to the Cap service, update WEB_URL, add https://{your-domain} to CORS_CONFIGURATION on Bucket CORS, and redeploy both.
Scaling: give Cap Media Server more CPU and memory if many recordings are processed at once; it adapts its concurrency to the resources it sees. Keep Cap at one replica (it migrates at boot) and scale it vertically.
Versions: Cap publishes rolling latest images, so this template pins image digests. To upgrade, set new digests on Cap and Cap Media Server together, back up MySQL, and redeploy; migrations run on boot.
Why Deploy Cap on Railway?
Railway runs the web app, media server, database and bucket as one project with private networking, managed volumes and usage-based billing. Video playback and uploads go straight to the bucket, so you get a self-hosted Loom alternative without managing servers, certificates or storage yourself.
View Cap Screen Recording and Sharing on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| Chatwoot A customer communication platform | Other | 5,871 |
| Ubuntu-Linux Ubuntu terminal accessible via web browser | Other | 4,926 |
| Ubuntu SSH + Claude ARA TM —SSH server with root access + Claude Code pre-installed. | Other | 4,682 |
| Debian-Linux Debian terminal accessible via web browser. | Other | 2,883 |
| Code Server VS Code in the browser | Other | 2,787 |
| Kali Linux (Web Terminal) Instant Kali Linux browser terminal powered by ttyd | Other | 2,632 |