Deploy Owncast
Self-hosted live video streaming and chat server, a Twitch alternative
Just deployed
/app/data
Deploy and Host Owncast on Railway
Owncast is an open-source, self-hosted live video streaming and chat server, an independent alternative to Twitch or YouTube Live. You stream from OBS or any RTMP encoder, and Owncast transcodes the feed to HLS and serves it on your own web page with a player, live chat and an admin dashboard.
About Hosting Owncast
Owncast is a single Go server plus ffmpeg, with its settings, chat and users in an embedded SQLite database. This template deploys Owncast 0.3.0 (official image, pinned by digest) as one service built from a public GitHub repo. A Railway domain serves the player, chat and admin over HTTPS. A Railway TCP proxy exposes RTMP ingest on port 1935, and a volume at /app/data keeps the database, emoji, logo and logs across redeploys. Upstream ships the public default password and stream key abc123. This template replaces both with generated secrets before the server starts listening, so you fill in nothing. A health check on /api/status gates each deploy.
Common Use Cases
- Streaming gaming, music, talks or classes to your own audience, with no platform rules or revenue cut
- A company or community broadcast page (town halls, events, church services) with built-in chat
- A private or embeddable live player for a website, with chat that can federate over ActivityPub
Dependencies for Owncast Hosting
- The Owncast server with ffmpeg (both in the official
owncast/owncastimage) - A volume for the SQLite database and media files, and a TCP proxy for RTMP ingest
Deployment Dependencies
- Owncast 0.3.0 release: https://github.com/owncast/owncast/releases/tag/v0.3.0
- Owncast documentation: https://owncast.online/docs/
- Template repo (Dockerfile, start script, changelog): https://github.com/aalfath/owncast-railway-template
Implementation Details
One service, Owncast: public HTTPS domain on port 8080 (player, chat, /admin, HLS), TCP proxy to 1935 (RTMP), volume at /app/data, health check /api/status, restart on failure.
After deploying:
- Open the public URL. The offline player and chat confirm the server is up.
- Go to
/adminand sign in asadminwith theOWNCAST_ADMIN_PASSWORDvariable. - In OBS (Settings → Stream → Custom…), set the server to
rtmp://TCP-PROXY-DOMAIN:TCP-PROXY-PORT/live, using the values from the service's Settings → Networking → TCP Proxy (the deploy log also prints the full URL), and the stream key to theOWNCAST_STREAM_KEYvariable. Don't use the RTMP address shown in Owncast's admin: the web domain carries only HTTPS. - Start streaming. The admin shows the stream online within seconds.
Variables (all pre-filled): OWNCAST_ADMIN_PASSWORD and OWNCAST_STREAM_KEY are generated. Each is applied once per change, so if you change them later in Owncast's admin, the next deploy keeps your change. PORT is 8080.
Resources: with Owncast's default single 1200 kbps output, a 720p30 stream used about 0.31 GB RAM in our test at a 0.5 GB / 1 vCPU limit. Extra output qualities or higher resolutions need more. ffmpeg's encoder threads are capped to the service's CPU limit.
Updates: the service builds from a public repo, so Railway shows you an update notice when the version is bumped on its main branch. Read the repo's CHANGELOG first. Your data stays on the volume.
Why Deploy Owncast 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 Owncast 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
