Deploy Cap (w/ MinIO)
Loom alternative screen recorder, no 5 min limit, optional Resend email
Cap Web
Just deployed
Just deployed
MediaServer
Just deployed
MySQL
Just deployed
Deploy and Host Cap on Railway
Cap is an open source screen recorder and video sharing platform, a Loom alternative. Record with the Cap desktop app for macOS, Windows or Linux, and get an instant share link with comments, transcripts and viewer analytics. This template runs the Cap Web server so the recordings and links live on your own Railway project.
About Hosting Cap
Cap has two halves: the desktop recorder everyone installs from cap.so, and Cap Web, the server that stores recordings and serves share links. This template deploys Cap Web with everything it needs:
- Cap Web, the Next.js app (dashboard, share pages, desktop API)
- MySQL for accounts and video metadata
- MinIO for the video files, created and configured on first boot
- Media Server for processing, thumbnails and transcoding
On a self-hosted Cap server every account has the Pro features. There is no 5 minute limit on Instant Mode recordings, which is the limit free cap.so accounts hit.
Common Use Cases
- Product demos, bug reports and walkthroughs shared as links, for a small team or a group of friends
- Keeping recordings on infrastructure you control instead of a third party cloud
- Recording longer than 5 minutes without a cap.so subscription
Dependencies for Cap Hosting
- The Cap desktop app (free, https://cap.so/download) on each recording machine
- Optional: a Resend account and a verified domain, for emailed sign-in codes
Deployment Dependencies
- Cap source and docs: https://github.com/CapSoftware/Cap
- Self-hosting guide: https://cap.so/docs/self-hosting
- Resend (optional): https://resend.com
Implementation Details
Connect the desktop app. After the deploy finishes, copy the Cap Web public URL (it is also in the WEB_URL variable). In the Cap app open Settings, General, Self-host, paste it into Cap Server URL and click Update. Then click Sign Out at the bottom left: the current Cap desktop app does not sign you out of cap.so by itself. Sign in again and the sign-in page opens on your server.
Signing in without email (the default). If you leave RESEND_API_KEY empty, Cap does not send emails. Each sign-in code is printed to Cap Web's deploy logs instead, next to the email address that asked for it, and is valid for 10 minutes. To find it:
- Open the link in Cap Web's
LOGIN_CODES_URLvariable. It points at your own Cap Web service. - Open the latest deployment's logs and search for
Code:. - Use the newest code listed under the right
Email:line. Requesting a new code makes the older one stop working.
With the Railway CLI: railway logs --service "Cap Web" | grep -A1 "Email: someone@example.com"
This doubles as an access gate: nobody can sign in unless someone with access to your Railway project reads them the code.
Signing in with email. Set RESEND_API_KEY and RESEND_FROM_DOMAIN on Cap Web (at deploy time or any time later, then redeploy Cap Web). Codes are sent from auth@ your domain, which must be verified in Resend. If Resend rejects a message, the error is in the same logs and the sign-in fails rather than pretending a code was sent.
What this template fixes compared with the original Cap template:
- MinIO uses
pgsty/minio, the image Cap's own docker-compose pins. Theminio/minioimage fails to deploy on Railway with no logs. - MinIO credentials are generated per deploy. The original shares one hardcoded access key across every deployer and has a malformed password generator.
- The media server is reachable. The original's
MEDIA_SERVER_URLresolved tohttp://:3456because of a service name mismatch. - Media server callbacks reach Cap Web. The original pointed them at port 3000 while Cap Web listened on 8080.
- MySQL is only reachable on the private network, with no public TCP proxy and no egress billing for database traffic.
Optional extras (add to Cap Web any time, then redeploy):
- Google sign-in:
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET - Transcription:
ASSEMBLY_API_KEY(AssemblyAI); AI titles and summaries:OPENAI_API_KEYorGROQ_API_KEY - A custom domain: add it to Cap Web in Railway, then update
WEB_URLand the desktop apps' server URL
Troubleshooting
- Desktop app still shows your cap.so account after changing the URL: click Sign Out, then Sign In.
- "Invalid code": a newer code was requested for that email. Use the newest one in the logs.
- Share links load but videos do not play: check that the MinIO service has a public domain. Browsers stream videos from it directly.
Upgrades and scaling. Cap publishes only latest images, so a redeploy of Cap Web and Media Server picks up the newest release. Storage grows with your recordings on the MinIO volume. To use Cloudflare R2 or S3 instead, change the CAP_AWS_* and S3_* variables on Cap Web.
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.
Template Content
