Deploy Owncast: Self-Hosted Live Streaming Server with Chat

Stream from OBS to your own site with live chat and no platform rules.

Deploy Owncast: Self-Hosted Live Streaming Server with Chat

Just deployed

/app/data

Deploy and Host Owncast on Railway

Owncast logo

Owncast is an open source, self-hosted live video streaming and chat server, an independent alternative to Twitch and YouTube Live. You point OBS, Streamlabs, ffmpeg or any RTMP encoder at your own server, and Owncast turns the feed into HLS video, serves a web player with a live chat room, and gives you an admin dashboard for moderation and settings. It is MIT-licensed, has about 11,700 GitHub stars, and is a single Go binary with an embedded database, so one service is enough. This template runs the official owncast/owncast image on Railway with a persistent volume, an HTTPS domain for viewers and a TCP proxy for RTMP ingest. The admin password and stream key are generated for every deploy, so the well-known defaults never work. Hosting starts around $5–15/month, plus bandwidth for each viewer.


What This Template Deploys

ServicePurpose
owncastThe official Owncast image with a small Railway wrapper. Web player, chat and admin on port 8080 behind a public domain, and RTMP ingest on port 1935 behind a TCP proxy.
VolumeMounted at /app/data. Holds the SQLite settings database, chat history, custom emoji, logs, backups and the rolling HLS video segments.

Owncast normally ships with the admin password and stream key both set to abc123. The wrapper replaces them on first boot with OWNCAST_ADMIN_PASSWORD and OWNCAST_STREAM_KEY, and sets the server URL to your Railway domain.


About Hosting Owncast

Running your own stream means nobody else decides who can watch, what you can say or how the chat is moderated. There is no platform cut, no algorithm and no ads unless you add them. Owncast handles the pieces that make that practical: transcoding, a player that works on phones and TVs, chat with moderation tools, and a public page with your name, logo and links.

How video flows. Your encoder pushes one RTMP stream to the TCP proxy. Owncast uses ffmpeg to cut it into HLS segments, optionally in several quality levels, and viewers' browsers download those segments over HTTPS. Segments roll over continuously, so the volume doesn't fill up.

CPU and bitrates. Every extra quality level is another ffmpeg encode. One output at your source bitrate, or passthrough with no re-encoding, keeps CPU use low. Add 480p or 720p variants only if viewers need them.

Bandwidth is the real cost. Each viewer downloads the whole stream. A 3 Mbps stream is about 1.35 GB per viewer per hour, which is roughly $0.07 per viewer-hour at Railway's $0.05 per GB egress rate. For large audiences, Owncast can store segments in S3-compatible storage behind a CDN instead.

Moderation built in. Moderators can hide messages and ban users or IP addresses from the chat, and you can ask viewers to sign in before chatting with IndieAuth or a Fediverse account.

Offline page. When you aren't live, the page shows your offline message, social links and a follow button, so visitors know when to come back.

Fediverse and integrations. Owncast can join the Fediverse so Mastodon users follow you and get notified when you go live. Webhooks, chat bots and external actions connect it to Discord, alerts and custom tools.

Typical cost: ~$5–15/month on Railway for the server at small scale, plus bandwidth that grows with viewers. Twitch and YouTube are free to stream on but set the rules and take a share of revenue.


Deploy Owncast in Under 5 Minutes

  1. Click Deploy on Railway. The service starts and secures itself on first boot.
  2. Copy OWNCAST_ADMIN_PASSWORD and OWNCAST_STREAM_KEY from the service's Variables.
  3. Find the TCP proxy host and port under Settings and Networking.
  4. In OBS, set the server to rtmp://HOST:PORT/live and paste the stream key.
  5. Open https://your-domain/admin, sign in as admin, set your name, logo and video quality, then start streaming.

Viewers open your public domain to watch and chat; there's nothing for them to install and no account to create.


Common Use Cases

  • Independent creators. Stream games, music or art on your own site without platform rules.
  • Company all-hands and town halls. Broadcast internally with chat, on a domain you control.
  • Churches, schools and clubs. Stream services, lessons and events without ads.
  • Conferences and meetups. Run a stream page with chat for remote attendees.
  • Privacy-conscious audiences. Viewers watch without accounts or tracking.
  • Live music and DJ sets. Stream performances to fans on your own page with a tip link.
  • Fediverse streamers. Let Mastodon followers know when you go live.
  • Podcast and radio shows. Stream audio with a still image and let listeners chat live.
  • Backup to a big platform. Keep your own stream running alongside Twitch or YouTube.

Configuration

VariableRequiredDescription
OWNCAST_ADMIN_PASSWORD🔐 Auto-generatedPassword for the admin user at /admin.
OWNCAST_STREAM_KEY🔐 Auto-generatedKey your encoder uses to publish the stream.
OWNCAST_SERVER_URL✅ Auto-sethttps:// plus the Railway domain. Update it if you add a custom domain.
OWNCAST_RTMP_PORT✅ Set1935, the container port behind the TCP proxy.
PORT✅ Set8080, the web player, chat and admin.

Changing settings later. A value you change in Owncast's admin is kept across redeploys. A value you change in Railway's variables is applied on the next deploy. The wrapper tracks which one changed, so neither silently overwrites the other.

Video settings live in the admin. Bitrates, quality variants, latency mode, chat rules, social links and S3 storage are all set in the admin dashboard, not as variables.

Encoder settings. In OBS, use a keyframe interval of 2 seconds and a constant bitrate close to your highest output quality for smooth segments.

Latency. HLS adds delay. Owncast's lower-latency settings reduce it to a few seconds at the cost of more buffering on weak connections.


Owncast on Railway vs. Alternatives

Owncast on RailwayTwitchYouTube LivePeerTube
Monthly cost~$5–15 plus bandwidthFree to streamFree to streamSelf-host costs
Self-hosted✅ Yes❌ No❌ No✅ Yes
Your own rules and branding✅ Yes❌ Platform rules❌ Platform rules✅ Yes
Built-in live chat✅ Yes✅ Yes✅ Yes⚠️ Plugin
Single service to run✅ Yes✅ N/A✅ N/A❌ Several
Discovery and audience⚠️ Fediverse, directory✅ Huge✅ Huge⚠️ Fediverse
License✅ MIT❌ Proprietary❌ Proprietary✅ AGPL-3.0

Dependencies for Owncast Hosting

  • Railway account. Pro is recommended if you transcode several quality levels.
  • An RTMP encoder such as OBS Studio, Streamlabs or ffmpeg.
  • An upload connection comfortably faster than your stream bitrate.
  • Optional: S3-compatible storage and a CDN for large audiences.

Deployment Dependencies

Implementation Details

The wrapper builds on owncast/owncast:latest, so redeploys pick up new releases; the current one is 0.3.0. It binds Owncast to Railway's PORT, replaces the default password and stream key through Owncast's own admin API, and keeps fingerprint files under /app/data/.railway to know which values you've changed. Back up the volume before upgrading across major versions.

Railway's TCP proxy assigns a random public port for RTMP. It stays the same unless you delete the proxy, so your encoder settings keep working across redeploys.


Frequently Asked Questions

What is Owncast? An MIT-licensed live streaming and chat server you run yourself. You stream to it with OBS, and viewers watch and chat on your own website.

How much does it cost? About $5–15/month on Railway for the server, plus bandwidth. A 3 Mbps stream costs roughly $0.07 per viewer per hour at $0.05 per GB.

Where do I find my stream key? In the service's Variables as OWNCAST_STREAM_KEY. Use it in OBS with the server rtmp://HOST:PORT/live from the TCP proxy.

Is the default password abc123? No. This template sets a random admin password and stream key on first boot, so the defaults never work.

Can I use my own domain? Yes. Add it to the service in Railway, then set OWNCAST_SERVER_URL to the new address and redeploy.

How many viewers can it handle? That depends on bandwidth and CPU. For big audiences, set up S3 storage with a CDN in the admin so viewers download video from the CDN.


Why Deploy and Host 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 get your own live streaming site with chat, secure defaults and persistent storage, without handing your audience to a platform.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
52