Quick start: live in 5 minutes
- Get the encoder. On the computer with the camera, open /download and press the big button for your computer (Windows, Mac with Apple chip, or Intel Mac). Open it: on Windows unzip and double-click castgate-encoder; on a Mac unzip, then right-click castgate-encoder → Open → Open.
- Pair it. Sign in on any computer, Overview → Create a pairing code, and type the site address and the code into the encoder.
- Go live. Choose the camera and microphone, press Check picture and sound, then Go Live. Your page is
this-site/c/your-channel: share it.
No computer near the camera? Use a phone: open /send on it (iPhone: Safari; Android: Chrome or the castgate Sender app from /download). Already have OBS, vMix or a hardware encoder? See Set up SRT in other encoders. Viewers on a TV: TV apps.
What castgate is for
castgate puts a church's services and events on the internet, with as little work as possible on Sunday morning. You send one video stream; castgate shows it on your own page and in the player on your website, sends it to YouTube and Facebook, and offers it in apps on Roku, Fire TV and Android TV. Everything is recorded, so people can watch later, listen as a podcast, or see it again on your 24/7 channel between services. You see who watched and from where, and viewers can chat during the service.
It is made for churches and small channels: no technical staff needed, a fixed monthly price, and your recordings stay yours.
Step by step
Signed in, your dashboard has a Getting started page with a checklist that ticks itself off as you go. The short version:
- Make the page yours (Settings): logo, color, about text, giving link, time zone.
- Connect a camera: OBS, vMix or a hardware encoder with the server address and stream key from the Overview page; or the castgate sender for a USB camera; or Go live in the browser.
- Go live a few minutes early and check your page. Share the link or put the player on your website with the embed code.
- After the service, trim the recording, add the speaker and scripture, publish. Add captions (upload or automatic).
- Reach more people: Restream to YouTube and Facebook, the TV apps, the podcast and the radio stream.
- Between services: 24/7 plays your recordings; when you go live, live takes over by itself.
- Invite your team (Team) and turn on two-step sign-in (Security).
How it works
You send one video stream to castgate. castgate does everything else: your web page, the TV apps, YouTube and Facebook, the recordings and the viewer statistics.
- Send your service with OBS or vMix, the free castgate sender (USB camera), or straight from the browser.
- castgate puts it live, keeps the last hours for rewinding, records it, and can play your recordings around the clock when you are not live.
- People watch on your page (castgate gives you one, and a player for your own website), on Roku, Fire TV and Android TV, and on YouTube and Facebook at the same time. Audience shows who watched, from where, right now and over time.
Tutorial: your first service in 15 minutes
You need a camera (a USB webcam, a camcorder with a USB capture stick, or a video mixer), a computer, and internet with at least 5 Mbps upload. Test your upload speed at the church, on the network you will use on Sunday.
- Sign in and open Dashboard. The Overview page shows your watch page address and a Stream box that says Offline.
- Pick a sender. The simplest is the desktop sender app (Windows or Mac): on the Overview page press Create a pairing code, start the app, type this site's address and the code. Pick your camera and microphone. Other ways are explained in Which way to send video.
- Press Go Live in the sender. Within a few seconds the Stream box on your Overview page turns Live and shows the picture size and bitrate.
- Open your watch page (the link under "Your page") on a phone. Check picture and sound. A delay of 10 to 20 seconds is normal.
- Stop the sender. The service appears under Recordings a minute later. Give it a title, a speaker and a category, then publish it.
- Share your watch page link with the congregation, put the embed code on your website, and add YouTube or Facebook under Restream if you want to stream there too.
Do a full test on a weekday at the same time as your service. Internet at many churches is slower on Sunday morning when everyone is on the Wi-Fi.
Which way to send video
| Way | Best for | What you enter |
|---|---|---|
| Desktop sender | Volunteers, one USB camera | Site address and a pairing code. Nothing else. |
| Go live in the browser | Trying things out, a laptop webcam | Nothing: Dashboard, Go live, allow the camera. |
| OBS, vMix, Wirecast | Several cameras, titles, slides | SRT address, or RTMP server and stream key (Overview page). |
| Hardware encoder | Fixed installations | Same as OBS. Choose SRT caller mode if it offers SRT. |
SRT or RTMP? SRT recovers from short internet dropouts and is the better choice on church internet. RTMP works with every encoder. Both are fine on a good connection.
Encoder settings that always work: H.264 video, AAC audio 128 kbps, keyframe interval 2 seconds, 1920×1080 or 1280×720, 30 frames per second, constant bitrate 2,500 to 4,500 kbps (use about half of your measured upload speed).
Overview page
- Stream: Live or Offline, the picture size, frame rate and bitrate the server receives, how many people are watching, and the next scheduled event. Messages in red explain what went wrong, for example a wrong stream key or an unsupported codec.
- Your page: the address of your watch page and the code to put the player on your own website.
- Go live in three steps: the addresses and stream key for your encoder, and pairing codes for the desktop sender. Change stream key stops anyone using the old key (your own encoders too, until you enter the new key).
Schedule
Add your services with a title, start time and length. Weekly events repeat at the same local time all year, also across daylight saving time changes. Your watch page shows a countdown to the next event.
With Settings → Record set to Only scheduled events, only streams during an event are recorded. You can also choose to replay a recording as if it were live at a scheduled time ("Replay as live"), for example a pre-recorded service on a holiday.
Recordings and editing
- Every stream is recorded automatically (unless switched off under Settings). If the encoder drops and reconnects within about a minute and a half, it stays one recording.
- Status: Draft recordings are visible only to you. Published recordings appear on your watch page and in the TV apps. Private recordings need an access code.
- Edit: open a recording, play it, and set where it should start and end. Add cuts to remove parts in the middle (for example the announcements). Edits never change the original; you can undo them at any time.
- Thumbnail: pause the player at a good frame and press "Use this frame".
- Download a recording as an MP4 file with your edits applied, for example to send to YouTube later.
- Upload video or audio files (MP4, MOV, MKV, MP3...) to add them to your archive. Choose many files at once; each shows its own progress bar and becomes its own recording. Type the details once for all of them (date, category, series, speaker, scripture, tags, description), or leave them empty: castgate then reads the title, date, artist (as speaker), album (as series), comment (as description) and genre (as category) stored in the file. Tick Publish as soon as ready to skip the draft step.
- Captions: on a recording, upload subtitles as a .vtt or .srt file, one per language (en, es, ka...). Viewers switch them on with the CC button in the player. Your cuts are applied to the captions automatically. The captions are also listed inside the recording's HLS playlist, so the TV apps, iPhones, iPads, Safari and VLC offer them too, and they stay in step after cuts.
Links for every recording
Each recording page has, under Share, embed and links:
- Page and embed code (fits any website width). Pasting the page link into WordPress, Squarespace or Wix turns it into the player by itself (oEmbed).
- HLS (m3u8): the direct stream address for VLC, apps and players. It contains your playback key, so anyone with it can watch, and each player counts toward your viewer limit. Changing the key on the Overview page changes every link.
- MP4 download for viewers: tick "Let viewers download this video" and castgate prepares the file; the link and the feeds then offer it.
- Thumbnail and Data (JSON): the picture and all details, for your web developer.
On the Recordings page, Feeds, playlist and spreadsheet gives an RSS feed (with Media RSS, for podcast apps, website widgets and newsletter tools), a JSON feed, an M3U playlist of your live channel and every recording (for VLC and IPTV boxes; it contains the playback key), and a CSV of all recordings with their details and links.
Several qualities for recordings and uploads
A recording plays in the quality it was made in. For viewers on weak connections, castgate can add smaller copies: on a recording, under Qualities, press Make 720p, 480p and 360p, or tick Also make 720p, 480p and 360p when uploading or adding from a link.
- Only qualities clearly smaller than the original are made (a 720p service gets 480p and 360p; a 1080p one gets all three).
- Each quality appears as soon as it is finished; players then switch automatically, like for live streams. Your edits and cuts apply to every quality.
- This takes about as long as the recording itself on an ordinary server, and uses the graphics card when your administrator chose one. Each quality adds roughly half, a third and a fifth of the original's size to your storage.
- Remove extra qualities deletes the copies; the original stays.
Editing many recordings at once
On the Recordings page, tick the box in front of each recording (or the box in the header for all on the page), choose an action and press Apply: publish, back to draft, set a category, add to the 24/7 playlist, let viewers download (or stop), make lower qualities, or delete. Recordings that are not ready, and private ones (for publishing), are skipped and counted in the message.
Import from a link
Under Upload, open Add a video from a link, paste the address of a video file: a direct link (ending in .mp4, .mov, .mp3...), a Dropbox share link, or a Google Drive "anyone with the link" share link, and press Add from link. castgate downloads it on the server, so your own computer and connection are not needed, and then treats it like an upload (details, publish, qualities). YouTube, Vimeo and Facebook pages cannot be imported; download your own video from there first. A link that opens a web page instead of a file fails with a clear message. Google Drive files must be shared as "Anyone with the link"; large files are fetched past Google's "cannot scan for viruses" notice automatically.
YouTube and Facebook (restream)
Under Restream, add a destination: pick YouTube, Facebook or Custom, paste the stream URL and stream key that YouTube Studio or Facebook Live Producer shows you. Every time you go live, castgate sends your stream there too, and reconnects by itself if the destination drops. Private events are never restreamed.
Facebook and YouTube sometimes ask you to start each live video in their own page first. Set it up there once as a "persistent" or "reusable" stream key so it works every week without changes.
Audience
- Live broadcasts lists each live stream that was recorded: when, how long, most at once, how many watched live and for how long on average, replays of its recording afterwards, reach (everyone who saw it, live or later) and the country most live viewers were in. A live viewer is one who started between 10 minutes before the broadcast and its end. Download CSV on that card gives the table as a spreadsheet.
- One broadcast: click its title in Live broadcasts for its own page: viewers minute by minute (from 10 minutes before to 5 minutes after), the countries, cities, devices and TV apps of its live viewers, and its replays.
- Weekly audience email (Settings): every Monday from 8 AM in your time zone, the owner gets last week's views, viewers, hours watched and most at once, each with the change against the week before, plus the live broadcasts. It needs email set up on the server.
- Viewers: each time someone starts playback. Unique viewers: counted by internet address and device. Came back: unique viewers seen on more than one day in the period.
- Watched in total and minutes on average show how long people stay. Most at once is the highest number watching at the same minute; compare it with your plan's viewer limit.
- Green and red percentages compare with the period before (for Today: the same part of yesterday).
- Map, cities, states, countries and internet providers come from the viewer's internet address (MaxMind GeoLite2). Locations are approximate (often the provider's nearest city) and are rounded to about 10 km.
- When they tune in shows the hour people start watching, in your time zone. How long they stayed groups viewings by length.
- Download CSV gives the whole report as a spreadsheet file.
- Right now (the box at the top) shows who is watching this moment, from where and what, and updates every 5 seconds. Viewers who are still watching are also counted in the period figures right away.
- Average viewing time is the total divided by the views; typical viewing time is the median (half of the views were shorter, half longer), which a few very long or very short views do not distort.
- The globe shows a column for each place people watched from; taller means more viewers. Drag it to turn it, and point at a column for its numbers. It follows the Right now switch of the map.
- When they watch is a 3D chart of viewers by weekday and hour: the tall amber bars are your busiest hours. Drag it to turn it.
- Audience retention shows, for recordings watched in the web player, how many viewers were still watching at each point of the video (the furthest point each viewer reached). Watched of the video and to the end (90% or more) appear per recording in What they watched, with views, unique viewers and average time.
- Video delivered is the amount of video the web players loaded, from the server and from other viewers.
- The map colors each country by how many watched (darker is more) and shows a dot per city. Point at or tap a country or a dot to see the number of viewers, how many watched live and how many watched recordings, and which recordings. Switch the map between the period and Right now with the buttons above it.
Go live from the browser
Dashboard → Go live uses the computer's camera and microphone directly from Chrome, Edge, Firefox, Brave or Safari (Mac). Choose the camera and microphone, check the picture and the sound meter, then press Go Live. Keep the tab open while streaming. It is good for small gatherings and tests; for Sunday services the desktop sender or OBS gives a steadier picture.
The camera needs a secure (https) address. Browsers only allow the camera and microphone on pages opened with https:// (or on the computer itself). If the address bar says "Not secure", the page cannot see any camera. Your administrator turns on https with a domain name (-domain); for a quick test on an IP address, -self-signed works after you accept the browser warning once.
The first time, the browser asks for permission: choose Allow. On a Mac also allow the browser under System Settings → Privacy & Security → Camera and Microphone, then reload the page. Close other programs that use the camera (Zoom, FaceTime, OBS).
Desktop sender (USB camera to SRT)
The castgate sender (the "encoder" app) is a small program for Windows, Mac (Apple and Intel) and Linux. It takes video from a USB camera or capture device and sends it over SRT, the most reliable way on church internet. It has no settings to type except the site address and a pairing code: the server tells it the SRT address, the stream key and any passphrase.
Where to download it: your Overview page (Go live in three steps → Desktop encoder app), or the page /download on this site, which needs no sign-in, so you can open it on the computer with the camera. If neither shows a download, your provider has not put the app on the server yet.
| Computer | File | Before the first start |
|---|---|---|
| Windows 10 or 11 | castgate-encoder-windows.zip | Unzip (right-click → Extract All). ffmpeg is included. If Windows says "Windows protected your PC": More info → Run anyway. |
| Mac with Apple M1 to M4 | castgate-encoder-mac-apple-silicon.zip | ffmpeg is included. Unzip; the first time right-click → Open → Open. Allow Terminal to use the camera and microphone. It sends over RTMP; with Homebrew's ffmpeg (brew install ffmpeg) it sends SRT, which copes better with weak internet. |
| Mac with Intel | castgate-encoder-mac-intel.zip | Same as the Apple Mac. |
| Linux (64-bit) | castgate-encoder-linux-x64.tar.gz | sudo apt install ffmpeg; unpack and run ./castgate-encoder. Your user must be in the video group. |
| Raspberry Pi 4 or 5 (64-bit OS) | castgate-encoder-linux-arm64.tar.gz | As Linux. A Pi 5 sends 720p; a Pi 4 is best at Low (480p). |
SRT or RTMP. The encoder sends SRT when the computer's ffmpeg can (Windows: always; Mac: with Homebrew's ffmpeg; Linux: usually), otherwise RTMP. Its page says which. Both reach the same channel.
- Download and start it as in the table.
- It opens a page in your browser. Type this site's address and a pairing code from your Overview page. You only do this once.
- Choose the camera, the microphone and the quality (720p is a good start; 1080p needs 5 Mbps upload or more). Press Check picture and sound to see the picture and the sound level without going live.
- Press Go Live. The sender reconnects by itself if the internet drops, and keeps a backup copy of the service on the computer.
- Tick Also send a lower quality if many viewers are on phones or slow internet; it needs a faster computer.
USB capture sticks for HDMI cameras (about $20 to $100) appear as a camera in the sender. Use a USB 3 port.
How it works. The app is a small local program; its window is a page in your browser (address http://127.0.0.1:17817). ffmpeg captures the camera and microphone and encodes H.264 video and AAC audio, with a picture every 2 seconds, and sends it to the server as SRT in caller mode with 2 seconds of latency (time to resend lost packets). Pairing stores a device token on the computer; Overview lists paired encoders and whether they are live, and Remove stops that computer from streaming. Quality: 720p about 2.5 Mbps, 1080p about 4.5 Mbps; use at most half your measured upload speed.
If something is wrong: "ffmpeg was not found" means ffmpeg is missing (Mac and Windows: keep the ffmpeg file that came in the zip next to the program; Linux: sudo apt install ffmpeg). No camera in the list: close Zoom, Teams, OBS and other programs using it, allow camera access (Mac), and press Look for cameras again. The app writes a log called encoder.log in its settings folder (Windows %AppData%\castgate-encoder, Mac ~/Library/Application Support/castgate-encoder, Linux ~/.config/castgate-encoder).
Picking the camera's format. The app asks the camera which sizes and frame rates it offers and picks one that fits the quality: 24 to 31 frames per second if the camera has it (else 59.94 or 60, which halve evenly), at least as tall as the quality, and on Windows the camera's MJPEG format when its plain format is too slow (many webcams give 720p at only 10 frames per second unless asked for MJPEG). If a camera still refuses, the app opens it the way it offers and scales the picture. A dropped internet connection is not taken for a camera problem. On a Mac, cameras are remembered by name, so an iPhone appearing as a camera (Continuity Camera) does not swap them.
Phone sender (iPhone and Android)
A phone can be the camera: good for a small group, a youth event, a second angle or when the encoder computer fails. It sends to the same channel as the encoder, and only one sends at a time.
- On the phone, open
your-site/send: point the phone's camera at the QR code on Overview (Go live in three steps → Phone sender) or on /download.
iPhone: Safari, iOS 14.5 or newer. Share → Add to Home Screen keeps it as an app.
Android: Chrome, or install the castgate Sender app from /download (allow "install unknown apps" for the browser once). - On a computer, Overview → Create a pairing code; type it on the phone with a name ("Youth iPhone"). The phone is paired: no password on the phone, and Overview lists it like an encoder, where Remove unpairs it.
- Allow the camera and microphone, choose the back or front camera and a quality, hold the phone sideways, press Go live.
Plug the phone in, use a tripod, and stay on Wi-Fi or a strong 4G/5G signal: 720p needs about 3 Mbps up. Keep the sender on the screen: phones stop the camera when the screen turns off or another app is opened (the sender keeps the screen awake where the phone allows). Sound is sent without phone-call processing, so music and singing come through. A short signal drop is ridden out (the phone retries for 20 seconds); when the connection is too slow for the quality, the sender says so: choose 480p.
The site must use https:// for phones to allow the camera. The server needs ffmpeg (it turns the phone's video into the live stream).
Set up SRT in other encoders
Any encoder that sends SRT works: OBS, vMix, Wirecast, hardware boxes (Magewell, Teradek, Kiloview, BirdDog and others) and ffmpeg. Copy the SRT address from Overview → Go live in three steps. It is one line and already holds your stream key:
srt://your-site:9000?streamid=STREAMKEY
| Setting | Value |
|---|---|
| Mode | Caller (the encoder calls the server). Not listener, not rendezvous. |
| Host and port | Your site's name, port 9000 (UDP). The church firewall must let UDP 9000 out. |
| Stream ID | Your stream key. Extra qualities: the key plus _720p, _480p (see Several qualities). |
| Latency | 1000 to 2000 ms (2000 on weak or Wi-Fi internet). Higher means more time to resend lost packets. |
| Passphrase | Only if you set an SRT passphrase under Settings (10 to 79 characters); key length 16 (AES-128). Leave empty otherwise. |
| Container and codecs | MPEG-TS, H.264 video, AAC audio, keyframe every 2 seconds, constant bitrate. |
OBS: Settings → Stream → Service Custom; Server: paste the whole SRT address; Stream Key: leave empty. With a passphrase add &passphrase=YOURPASSPHRASE&pbkeylen=16 to the end of the address. Settings → Output → Keyframe Interval 2.
vMix: Stream → Destination Custom RTMP/SRT → Type SRT (Caller); Hostname: your site; Port 9000; Stream ID: your stream key; Latency 2000; Passphrase if set.
Hardware encoders: choose SRT, mode Caller, enter the host, port 9000, the stream ID (your stream key), latency 2000 ms, and the passphrase if you set one.
ffmpeg (for testing): ffmpeg -re -i video.mp4 -c:v libx264 -g 60 -c:a aac -f mpegts "srt://your-site:9000?streamid=STREAMKEY&latency=2000000" (ffmpeg counts latency in microseconds).
The Overview page turns to Live within a few seconds. If it does not, the Stream box shows why (wrong key, wrong passphrase, account suspended); see also Troubleshooting.
Several qualities (adaptive bitrate)
When your encoder sends more than one quality, each viewer automatically gets the best quality their connection can carry, and switches when it changes. The web player also shows a quality menu.
- Send the main (best) quality with your normal stream key, for example
STREAMKEYat 1080p. - Send up to four extra qualities with the key plus an underscore and a short name:
STREAMKEY_720p,STREAMKEY_480p. The name may use letters and digits (up to 12). - Works over RTMP (
rtmp://server/live/STREAMKEY_720p) and SRT (stream idSTREAMKEY_720p). - Use the same keyframe interval (2 seconds) and frame rate on every quality, and send them from one encoder so their clocks match. castgate then lines up the segments of all qualities exactly.
- Only the main quality is recorded and sent to YouTube and Facebook. Extra qualities are for live viewers and rewind.
- No special encoder? On plans with "adaptive quality made for you", the server makes lower qualities (720p, 480p, 360p, below your picture size) from your one stream automatically. Nothing to set up. If your encoder sends its own extra qualities, those are used instead.
OBS: use the "Multiple RTMP outputs" plugin, or start a second OBS output. vMix: Streaming settings, add destinations with the extra keys. ffmpeg example with two qualities:
ffmpeg -i INPUT -filter_complex "[0:v]split=2[a][b];[b]scale=-2:720[c]" \
-map "[a]" -map 0:a -c:v libx264 -b:v 4500k -g 60 -keyint_min 60 -sc_threshold 0 -c:a aac -f flv rtmp://SERVER/live/KEY \
-map "[c]" -map 0:a -c:v libx264 -b:v 2500k -g 60 -keyint_min 60 -sc_threshold 0 -c:a aac -f flv rtmp://SERVER/live/KEY_720p
TV apps
No app needed: play on the TV from the page. While a stream or recording plays on your page, the corner of the player shows a Chromecast button in Chrome and Edge (TVs with Chromecast or Google TV built in: many Sony, TCL, Hisense, Philips, Toshiba and Vizio sets) and an AirPlay button in Safari (Apple TV, and Samsung, LG, Sony and Vizio TVs with AirPlay). The TV plays the stream by itself, so the phone or computer can be put away or closed. The buttons appear only when such a TV is on the same Wi-Fi.
Viewers can watch on Roku, Fire TV and Android TV. Every download, with how to install it on each device, is on /download:
- Fire TV: install the free Downloader app, type
this-site/download/firetv.apk, install. Android TV (Sony, TCL, Hisense, Chromecast with Google TV): the same withthis-site/download/androidtv.apk. Roku:this-site/download/roku.zipinstalls on a Roku in developer mode (for the Roku Channel Store, use your own app below). - The castgate app: viewers search for your church by name. Tick "Show this channel in the castgate TV apps" under Settings to appear in its directory. Even unlisted, viewers find you by typing your web address name.
- Your own app: an app with your church's name and logo, opening straight to your channel. Dashboard → TV apps: download your Roku package (with icons made from your logo, ready to install on a Roku in developer mode or to submit to the Roku store) and your Android source kit for Fire TV and Android TV (open it in Android Studio and build; the README in it has the steps).
- Test it today: TV apps also offers the ready-made castgate app for Fire TV and Android TV. Install it with the Downloader app, type this server's address and your channel name once, and watch.
- In both, viewers see Watch live, Watch from the start, your latest recordings with categories, and your Give link. Your logo, brand color and announcement come from Settings and change in the apps right away, without an app update.
- Up next: when 24/7 is playing, the channel screen shows what is on now (until when) and the next three programs with their times and grid block names. While watching live, a banner shows "Now" and "Up next" for a few seconds at the start and each time a new program begins.
- Chat on the TV: with chat on, the TV apps show the newest messages over the live picture (read only; people write on your web page). Viewers hide or show it with the remote: * on Roku, the menu button on Fire TV and Android TV. You can keep the chat off the TV apps under Chat.
- Deep links (Roku search and voice): a channel name,
channel/livefor its live stream, orchannel/RECORDING-IDfor one recording. Give these when submitting your Roku app. - The universal app (Roku, Fire TV, Android TV and Fire TV on Vega) asks for the server address and an optional channel on first start and remembers them; "Change server" on the start screen asks again.
- TV viewers count toward your viewer limit and appear in Audience as "TV".
Settings and team
- Name, about, website, giving link: shown on your watch page and in the TV apps.
- Brand color and logo: used on your page and in the apps.
- Announcement: a short line above your player and in the apps, for example a special service time. Clear it to hide it.
- Categories: the choices for sorting recordings (Sunday Service, Bible Study, Youth...).
- Record and Publish automatically: what is recorded and whether it goes on your page without review.
- Team: invite volunteers. Members can stream, edit recordings and see the audience; only the owner changes settings, keys and the team. Someone who already has a castgate login (for example at another church or channel) is added with their own password; they pick your channel in the channel menu.
Several channels with one login
Dashboard → Channels. On plans that include more than one channel (Plus: 3, 24/7 Channel: 5, or as your administrator sets), the owner can add channels: a Spanish service, a youth channel, a radio station. Each channel is complete on its own: its own stream key, web page, recordings, TV apps, 24/7 and grid, chat, statistics and viewer limit. It starts on the same plan, with the time zone, color and categories of the channel you are in.
- Switch channels with the Channel menu at the top of the dashboard. Everything you see and change applies to the chosen channel.
- Team members are invited per channel; one person can be the owner of one channel and a team member of another.
- Removing a channel: on the Channels page, open Remove under a channel you own and type its address. It stops at once (stream, page, player, TV apps, restreams) and is deleted with all its recordings, statistics, and team members who have no other channel after 7 days. Until then Restore brings it back as it was. You cannot remove your last channel; a paid subscription for it must be cancelled on the billing site.
Billing (your subscription)
Dashboard → Billing (owners) shows your plan, whether it is paid and until when, and your last payment. When your provider sells castgate through a billing site:
- Manage subscription opens the billing site, where you change the payment method, see invoices and cancel.
- Change plan lists the other plans; choosing one opens its checkout, already linked to your account, and the new plan applies within a minute of the payment.
- If a payment fails, the account keeps working for a grace period (usually 7 days) and you get an email; then it pauses until the payment arrives, and resumes by itself. A canceled subscription works until the end of the paid period. Recordings are kept while paused.
- New customers who pay on the home page receive their sign-up link by email.
Private events
For funerals, weddings and members-only meetings, mark a scheduled event as private and set an access code. During the event viewers must enter the code; the stream is not restreamed to social media and not published automatically. Recordings can also be made private with their own code. Private content is not playable in the TV apps.
24/7 channel (always on)
Dashboard → 24/7 plays recordings when nobody is live, so your page, the TV apps and your YouTube or Facebook destinations always show something. Included in the Standard, Plus and 24/7 Channel plans. Choose what to play:
- My playlist: your own running order. Add recordings (published ones, and drafts you do not want on your recordings page), move them up and down, remove them. Changes apply from the next recording; the list loops.
- All published recordings or one category, newest first, oldest first or shuffled.
Where viewers watch: 24/7 plays on your channel's usual addresses, so there is no separate link to share. The 24/7 page lists them: your page, the embed code, the stream link (m3u8) for VLC and IPTV apps, the M3U playlist, the TV apps and your restream destinations. The Overview shows 24/7 instead of Live while recordings play.
"Up next" cards (1.3): tick Show a card before each recording under "Up next" cards and every recording starts with a short card (3 to 30 seconds, 8 by default) showing your logo, your brand color, "UP NEXT", the title and a line under it: the recording's date and speaker, or your own text such as "Live every Sunday at 10 AM". Viewers who tune in between two recordings see what is coming instead of a hard cut. The preview next to the settings shows the card for the next recording; logo and color come from Settings. Skip ends a card at once. Cards are made once with ffmpeg and kept until the title or settings change; without ffmpeg, recordings simply follow each other.
The page shows what is on air, until when, and what comes next with start times. Skip to the next recording moves on at once. Your watch page shows "Now playing" and "Up next", and apps can read the program guide at /api/v1/channels/YOUR-ADDRESS/guide. A recording page has "Add to the 24/7 playlist".
- Live takes over by itself. You never switch anything: when your encoder connects, live replaces the recording at once, and viewers keep watching without reloading (their player follows the switch). Scheduled live events appear in "Up next" and the program guide. When you stop, the recordings come back.
- When your encoder connects, it takes over at once. Playback of recordings starts again 30 seconds after you stop, so a short dropout never hands the channel back to the recordings.
- A scheduled "Replay as live" event takes priority over the 24/7 loop.
- Played recordings are not recorded again. Private recordings are never played; drafts only when you put them in your playlist.
Weekly grid (programs at fixed times)
Dashboard → Weekly grid puts programs at the same time every week, like a TV station: "Sunday 18:00 last week's service", "weekdays 06:00 two hours of worship songs". Choose the days, the start time and what the block plays:
- One recording: the block lasts as long as the recording and plays it once each week.
- Recordings from a category, my playlist or all published recordings, for as long as you set (5 minutes to 24 hours). Each block continues where it left off the week before.
How it plays:
- At a block's start time the channel switches to it on time, cutting the recording that was playing. The last recording of a block finishes before the rotation continues, unless the next block starts first.
- Between blocks, the 24/7 rotation from the 24/7 page plays. With 24/7 set to "Show not live right now", the channel plays only during the blocks.
- Going live always takes over, as do scheduled "Replay as live" events. Skipping a block's single recording ends it for that week.
- Blocks may not overlap. Times are in your time zone (Settings), and follow daylight saving time.
- The program guide, "Up next" on your page and the TV apps show each recording with its block's name.
Podcast and radio
Dashboard → Podcast & radio.
- Podcast: turn it on and castgate saves the sound of every published recording as an episode (M4A). Your podcast feed address goes into Apple Podcasts Connect, Spotify for Creators, YouTube Music, Amazon Music or Pocket Casts once; after that, every recording you publish appears there by itself. The cover art (1400 × 1400) is drawn from your logo and color. Editing a recording renews its episode.
- Radio: the live sound as an MP3 stream for radio apps (TuneIn), smart speakers, car players and VLC, and a Listen button on your page that uses little data. It plays whenever your channel is on air, live or 24/7. Listeners count as viewers in Audience (device "Radio"). Radio apps and VLC show what is playing: the title of the 24/7 item, the current event in your schedule, or your channel name with "(live)".
- Radio as HLS: the same sound at
/c/YOUR-ADDRESS/listen.m3u8, in the audio-only HLS format iPhones, Android, smart speakers and car systems prefer (AAC). It copies the sound of your live stream, so it starts at once and sounds like your stream. Shown on the Podcast & radio page next to the MP3 address. - Radio stations without video can stream sound only (RTMP or SRT with just an audio track); the page then plays the sound.
Chat
Dashboard → Chat puts a chat next to the player on your page. Viewers type a name and a message, no account needed. You choose:
- Open only while live, and slow mode (seconds between two messages of one person).
- Show the chat on the TV apps too: the newest messages appear over the live picture on Roku, Fire TV and Android TV (read only). Untick it to keep the chat on your web page only.
- Blocked words: messages containing them are not sent.
- Translation: when your administrator has set up a translation server, viewers pick their language and read every message translated, with the original in small print.
- Moderation: on the Chat page, Remove takes a message off every screen at once; "Remove and block" also removes that person's messages and stops them writing for 24 hours. Messages you write while signed in carry a "church" badge.
- Each day's chat is saved; download it as text from the Chat page.
Captions for recordings can be made automatically: on a recording, choose the spoken language (and languages to translate into) and press Make captions automatically. This uses a transcription server your administrator connects (for example CaptionDesk or a Whisper server).
Live captions
Chat page → Live captions. When your administrator has connected a transcription server, castgate turns what is said during a live stream into captions on the viewers' screens, a few seconds behind the picture (castgate listens to about 8 seconds at a time). Choose the spoken language; viewers press CC and pick Live captions, translated into their language when a translation server is set up. When the stream ends, the captions are kept with the recording as "English (live)" (or your language) and can be replaced by a better file later. The live captions appear in the web player; the TV apps show the saved captions of recordings.
Captions in the players' own menus (1.3). While live captions are on, the live stream also carries them as a caption track named Live captions, so players that have their own caption menu show them: Safari on Mac, iPhone and iPad (also in full screen), the Android TV and Fire TV app (the captions button, or the TV's own caption setting), Roku (the TV's caption setting), the Fire TV app on Vega (the remote's Up key turns captions on or off; the choice is remembered) and IPTV apps that read HLS subtitles. Because captions are ready some seconds after the words are spoken, players that use the track start about 30 seconds behind live, so each caption appears with the picture it belongs to. The web player does the same, so its captions are on time too. Rewinding (DVR) and archive playlists carry the track as well, for as far back as your plan lets viewers rewind (at most 6 hours).
Prayer requests
Dashboard → Prayer. Tick Show a "Prayer request" button on your page and your page gets a Prayer request button: viewers write their request, with a name and email if they want an answer. Requests are never shown publicly. They arrive in the Prayer inbox, and by email to the address you enter (or the account owner's) when your administrator has set up email. Press Prayed for when your team has prayed, or delete it. Automatic spam filtering and a limit of a few requests per person per hour keep the inbox clean.
Public pages and Explore
Your page (/c/your-address) is public: the live stream, the 24/7 channel when you are not live, and tabs for Services and events (recorded from your streams), Videos (uploads) and the podcast. The site's Explore page lists the channels that chose "Show this channel in the directory" (Settings): who is live now, the latest services and videos, and a search.
Your own web address
Under Settings → Your own web address, type a name such as church.example.org, then create a DNS record for it pointing to this server (a CNAME to the server's name, or an A record with its IP address). That address then opens your page, with a secure certificate made automatically. Ask whoever manages your church's domain to add the record; it takes effect within minutes to a few hours.
Two-step sign-in (Security)
Everyone can protect their login: Security at the top of the page, scan the QR code with an authenticator app (Google Authenticator, Microsoft Authenticator, Authy, 1Password), type the 6-digit code, and keep the ten recovery codes. Signing in then asks for a code after the password. Lost the phone? Use a recovery code, or ask your administrator to turn it off for you.
Who may watch (geofencing)
Under Settings → Who may watch you decide where your stream and recordings can be watched. The rules apply to the watch page, the embedded player, the TV apps, chat, the audio stream, downloads and peer-to-peer.
- Allow only: countries (two-letter codes such as
US, CA), networks (internet providers or companies, by number, such asAS7922) and cities. When any of these is filled in, a viewer must match one entry. Example: countriesUSand networkAS2856lets in everyone in the United States and customers of that provider anywhere. - Block: countries, networks, cities and addresses (
203.0.113.7or198.51.100.0/24). A match is always refused, even when an allow list lets the viewer in. Example: allowUS, block the citySpringfield, US. - Cities are one per line:
Atlanta,Atlanta, USorAtlanta, Georgia, US. Use the longer forms when a city name exists in several places. - Networks: the Audience page lists your viewers' providers with their numbers ("Internet providers (ASN)"). Anything after the number on a line is a note, so
AS7922 Comcastis fine. - Message for refused viewers: shown on your page and in the TV apps instead of the standard "This stream is not available in your area."
- Check an address tells you where an address is and whether your rules let it watch, and which rule decided. Your own address is filled in.
Locations are approximate (often the provider's nearest city), and people using a VPN appear where the VPN is. Viewers on your own local network always may watch. While the server has no location database, the country, network and city rules are not applied, so nobody is locked out by mistake; the settings page says so.
Your administrator can also block countries, networks and cities for the whole server; those blocks come first.
Playback quality
The web player measures how playback went for each viewer and the Audience page summarizes it:
- To start playing: from pressing play to the first picture. Under 2 seconds is good. The slowest 5% shows what your least lucky viewers get.
- Viewing time spent waiting (rebuffering): how much of the watching time the picture was stopped, waiting for video. Under 1% is good; over 2% is shown in red in the tables.
- Viewers had to wait at least once, average picture bitrate, viewers who saw a player error and video frames dropped (a slow device).
- By internet provider, country and device show where problems are. If one provider has long start times or much waiting while others are fine, the problem is on that provider's network, not your stream.
The Roku, Android TV, Fire TV and Vega apps (version 1.2 and later) report the same figures as the web player, except dropped frames on Roku and Vega and the bitrate on Vega. Outside players (VLC, the playback key) count as viewers but report nothing.
Peer-to-peer playback
When your administrator allows it, Settings → Peer-to-peer playback lets viewers in web browsers pass the video to each other. One viewer loads each piece of video from the server and the others get it from viewers who already have it, directly between browsers (WebRTC). The server sends less, which keeps big services smooth.
- Nothing changes for viewers: there is nothing to install, and the player falls back to the server at once when no other viewer can help.
- Viewers still count against your viewer limit, and your geofence applies to peer-to-peer as well.
- It works in Chrome, Edge, Firefox and desktop Safari. Safari on iPhone and iPad, the TV apps and old browsers play from the server only.
- The Audience page shows how much of the video came from other viewers, how much the server did not have to send, how many viewers connected to others, and the share by day, country and provider. While you are live, Shared between viewers right now shows each stream being shared.
- Viewers share best when they are on the same provider or in the same city, for example a congregation watching from home.
How to see that it works. Open your channel page with ?p2pinfo=1 added to the address, for example https://your-site/c/your-channel?p2pinfo=1, press play, and open the same page on a second device or browser. A small box at the bottom left of the picture says Peer-to-peer: ON, how many other viewers this browser is connected to, and what share of the video came from them. A single viewer alone shows 0 connected, which is normal. OFF means the server or the channel switch is off, or the browser cannot do it.
Unsure whether peer-to-peer works on a particular network (the church's guest Wi-Fi, a member's mobile provider)? Ask your administrator for a field-test link and open it on a phone on that network.
Troubleshooting
The most common problems are below. The troubleshooting guide covers every area (streaming, watching, recordings, 24/7, TV apps, sign-in, email, the server) with causes and fixes.
- The Stream box stays Offline
- Check the address and key in the encoder (copy them with the Copy buttons; no spaces). For SRT check that UDP port 9000 is not blocked by the church firewall. A red message in the Stream box tells you if the key was wrong or the account is suspended.
- Viewers see buffering or the picture stops
- Your upload is too slow for the bitrate. Lower the encoder bitrate (2,500 kbps at 720p is safe), switch to SRT, use a wired connection instead of Wi-Fi, or send several qualities.
- No sound
- The encoder must send AAC audio. In the desktop sender, pick the right microphone and watch the sound meter. Check that the mixer output is not muted.
- "This stream is full"
- You reached your plan's viewer limit. People can try again when others leave, or you can move to a larger plan.
- The delay is long
- Set the keyframe interval to 2 seconds. A delay of 10 to 20 seconds is normal for streaming to the web.
- Facebook or YouTube shows nothing
- Look at the status on the Restream page. Most often the stream key changed on their side; paste the new one.
- I forgot my password
- On the sign-in page choose "Forgot your password?" and enter your email address. The link in the email works once, for one hour. If no email arrives, ask the account owner or your administrator.
- "Access from your address is blocked"
- The address was blocked, often automatically after many wrong passwords or stream keys. It clears by itself after an hour; otherwise ask your administrator.
- Go live says the browser cannot use a camera
- The page must be opened with https:// (see Go live from the browser). Then allow the camera when the browser asks, and on a Mac in System Settings → Privacy & Security. Safari and Brave on a Mac work once the address is https.
- Audience took a while to show viewers
- It no longer waits: people still watching appear at once in the Right now box and in today's figures.
- The map has no countries or cities
- Locations need the GeoLite2 City database on the server (cities, map dots) and the ASN database (internet providers). Ask your administrator; see GeoIP databases.
- A recording is missing
- Check Settings → Record. Streams shorter than about 15 seconds are not kept.
Glossary
- Adaptive bitrate (ABR)
- Sending the same stream in several qualities so each viewer gets the one their connection can carry.
- AAC
- The audio format used for streaming. Set your encoder to AAC.
- ASN (network)
- The number of the viewer's internet provider (for example Comcast or AT&T), used in Audience.
- Bitrate (kbps, Mbps)
- How much data the stream uses each second. 1 Mbps = 1,000 kbps. Higher means better picture but needs faster internet.
- Caching proxy
- A server in front of castgate that keeps copies of video pieces so many viewers can be served without extra load.
- Capture device
- A USB stick or box that turns a camera's HDMI or SDI output into a USB camera for the computer.
- Captions
- The words spoken in a video shown as text on the picture; viewers switch them on with CC.
- ICY metadata
- The "now playing" title that radio apps and VLC show while listening to a radio stream.
- CDN
- Content delivery network: servers that deliver video to viewers near them.
- DVR / rewind
- Viewers can go back in a live stream or start from the beginning while it is still live.
- Grid block
- A program at a fixed time every week on the 24/7 channel, for example Sunday 18:00.
- Embed code
- A short piece of HTML that puts your player on your own website.
- Encoder
- The program or device that compresses your video and sends it to the server (the desktop sender, OBS, vMix, a hardware box).
- Frame rate (fps)
- Pictures per second. 30 is standard for services.
- GeoLite2
- Free MaxMind databases that turn an internet address into an approximate city, country and provider.
- H.264
- The video format used for streaming. Set your encoder to H.264 (also called AVC or x264).
- HLS
- The way video is delivered to viewers: small pieces (segments) listed in a playlist (.m3u8). Plays on every phone, browser and TV.
- HTTP/3 (QUIC)
- The newest way browsers fetch web pages and video; faster on phones and busy Wi-Fi. castgate offers it automatically with HTTPS.
- Keyframe interval (GOP)
- How often the encoder sends a complete picture. Set it to 2 seconds.
- M3U playlist
- A list of stream addresses for VLC, IPTV boxes and set-top boxes.
- oEmbed
- A standard that lets WordPress, Squarespace and other website builders turn a pasted link into the player.
- Pairing code
- A 6-digit code that connects the desktop sender to your account without typing keys.
- Playlist (.m3u8)
- The list of video pieces a player downloads. A "master" playlist lists several qualities.
- Podcast feed (RSS)
- The address podcast apps read to list your episodes; new episodes appear by themselves.
- Re-encoding
- Compressing video again, for example smaller or in a more common format; can use a graphics card.
- Rendition
- One quality of an adaptive stream or recording, for example 480p.
- Resolution (720p, 1080p)
- Picture size: 1280×720 or 1920×1080 pixels.
- Radio stream
- The live sound alone (MP3, or AAC over HLS), for radio apps, smart speakers and weak connections.
- Restream
- Sending your stream on to YouTube, Facebook or another service at the same time.
- Streaming address
- A second web name used only for video, often a CDN name, while pages stay on the main address.
- Two-step sign-in
- After the password, a 6-digit code from an app on your phone; protects the login if the password leaks.
- RTMP
- An older, widely supported way of sending a stream from an encoder to a server.
- Segment
- One small piece of video, usually 2 to 6 seconds long.
- Simultaneous viewers
- People watching at the same moment. Your plan sets the maximum.
- SRT
- Secure Reliable Transport: a modern way of sending a stream that recovers lost data, ideal for church internet.
- Stream key
- The secret that lets an encoder stream to your account. Keep it private; change it if it leaks.
- Transcription
- Turning speech into text, used for automatic and live captions.
- Upload speed
- How fast your internet sends data out. Your stream bitrate should be at most half of it.
Recording storage (S3, for administrators)
Admin → Settings → Recording storage connects an S3-compatible bucket: Amazon S3, Wasabi, Backblaze B2, Cloudflare R2, DigitalOcean Spaces, or your own MinIO or Ceph.
- A second copy: every finished recording (all its qualities) is copied to the bucket within minutes, under
castgate/<account>/<recording>/. Admin → System shows how many are copied, waiting or failing. - Free the disk: with "Remove this server's copy after N days", older recordings keep only a list of their pieces here and play from the bucket. Viewers notice nothing. They are fetched through this server, or with "Viewers fetch removed recordings straight from the bucket" by a signed link, which saves this server's bandwidth (the bucket must then allow other sites: CORS with GET from any origin).
- Downloading an MP4, making extra qualities or podcast sound brings a removed recording back first (it then stays here for a day). 24/7, restreaming a recording and automatic captions read it from the bucket as they go.
- Deleting a recording or an account deletes it in the bucket too.
- Test storage writes, reads and removes a small file with the saved settings and says what is wrong when it fails (key and secret, bucket name, region).
Amazon S3: address https://s3.REGION.amazonaws.com, the bucket's region, path style off. MinIO and Ceph: your server's address and path style on. Use a key that may only read, write, list and delete in this bucket.
For administrators
Accounts, plans and signup codes
Create a signup code (Admin → Signup codes) with a plan, optional trial days and a number of uses, and give it to the church. Under Accounts you can change plan and limits per account (viewer limit, storage, rewind hours, archive days, destinations, channels the owner may run), suspend with a reason the customer sees, open their dashboard to help them, or delete them. Plans sets the prices and limits shown on the home page, including Channels per login (several channels under one owner account; each channel is a full account with its own limits). Deleting an account removes it from every login that worked in it; a login with no other channel is deleted with it.
TV apps
Admin → TV apps lists every church with its directory setting, announcement and own-app name. Per church you can download a ready Roku package and an Android source kit; the server builds both on the fly with the church's name, channel, color and icons drawn from its logo. Churches can download the same files themselves under TV apps in their dashboard. Apps read everything else (logo, color, announcement, recordings) from the server, so one build serves a church for good.
For testing, the same page offers the universal apps: the Fire TV and Android TV APKs built into the server (also at /download/firetv.apk and /download/androidtv.apk for the Downloader app) and a Roku test package. They ask for the server address on first start. They are signed with the castgate test key, so use the source kit and your own key for the stores. To refresh the built-in APKs after changing the app, run apps/build-prebuilt.sh and compile the server again.
Email (SMTP)
castgate sends password reset links, prayer requests, weekly reports and alerts through a mail service you choose. Admin → Settings → Email: pick the service in Mail service (Gmail or Google Workspace, Microsoft 365, SMTP2GO, Brevo, Amazon SES, Mailgun, or this server), enter the user and password it gave you and a From address on a domain you verified, save, and press Send a test email. If the test fails, the message says why (wrong password, blocked port, unverified sender) and what to change.
- Simplest: SMTP2GO or Brevo (free plans for small volumes): sign up, verify your domain, create SMTP credentials.
- Gmail and Microsoft 365: use an app password, not the normal password; Microsoft 365 also needs "Authenticated SMTP" switched on for the mailbox. castgate uses the sign-in method Microsoft requires automatically.
- Ports: 587 for most services, 465 for SSL, 2525 when the hosting provider blocks 587. The password is never sent without encryption.
- To stay out of spam, add the SPF and DKIM records the service gives you to your domain.
The email setup guide has step-by-step instructions for each service.
Billing (selling plans)
castgate does not take payments itself. A billing site (encrypted.com, or any system that follows the billing integration guide) sells the plans and sends castgate signed webhooks. Admin → Billing:
- Tick Accounts are sold through the billing site, enter the billing site and customer portal addresses, and the grace period. Save: castgate makes a shared secret.
- Give the billing site the webhook address and the shared secret, and enter each plan's checkout link. The home page's plan buttons and the customers' Billing page then link to checkout.
- Press Send a test event to check the signature and the log.
What happens: a new subscription without an account gets a one-use sign-up code for its plan, emailed to the buyer; renewals extend the paid period; plan changes apply at once; failed payments start the grace period, then the account pauses; cancellations pause at the end of the paid period; a payment resumes a paused account. Only billing lifts a billing pause; your own suspensions are never lifted by billing. Every event is logged with its result, and accounts show their billing status under Accounts.
Two-step sign-in
Everyone can protect their login under Security (top of the page): scan the QR code with an authenticator app (Google Authenticator, Microsoft Authenticator, Authy, 1Password), type the 6-digit code, and keep the ten recovery codes shown. Signing in then asks for a code after the password. Under Admin → Settings you can require it for administrators: they are sent to set it up before using the admin pages. Admin → Users shows who uses it and can turn it off for someone who lost their phone (that signs them out everywhere). For your own administrator login, castgate -reset-admin email:newpassword also turns it off.
Web addresses and a streaming address
One server can answer under several names, all with automatic certificates and HTTP/3: start with -domain live.example.org for the site. Under Admin → Settings, a Streaming address such as https://church.giatvcdn.com makes players, apps, feeds and links fetch video from that name, for example a CDN hostname pointing to this server (or a CDN in front of it); pages on that name are sent to the site. Churches can add their own web address (Settings); certificates are only made for the site's names, the streaming address and those church addresses, never for other names. Example: the site on church.gia.tv and video on church.giatvcdn.com, both with Let's Encrypt.
Re-encoding (processor or graphics card)
castgate re-encodes video with ffmpeg for the extra qualities of live streams, for uploads where the church chose "Re-encode", and for "Make a re-encoded copy" on a recording. Under Admin → Settings → Re-encoding choose the processor (libx264), an NVIDIA card (NVENC), Intel Quick Sync or VAAPI (AMD and Intel on Linux), or Automatic, which uses a graphics card when one works. The page shows which ones work on this server (tested at start). A graphics encoder that fails is set aside for ten minutes and the processor takes over. For NVENC install the NVIDIA driver and an ffmpeg built with it; for VAAPI the server needs /dev/dri/renderD128.
Translation and transcription
Chat translation and translated captions use a LibreTranslate-compatible server (self-hosted LibreTranslate, or a service with the same API). Automatic captions use an OpenAI-compatible transcription address such as CaptionDesk, faster-whisper-server, whisper.cpp's server (.../v1/audio/transcriptions) or OpenAI itself; castgate asks for WebVTT. Set the addresses, keys and model under Admin → Settings. castgate sends only the text or the sound, and stores the result with the recording.
HTTPS and HTTP/3
Start castgate with -domain live.example.org for free automatic certificates (ports 80 and 443 must reach the server), or -tls-cert and -tls-key for your own. For a test on a bare IP address, -self-signed makes a certificate (browsers warn once). HTTPS is needed for Go live in the browser. With HTTPS on, castgate also answers HTTP/3 (QUIC) on the same port over UDP and tells browsers so; open UDP 443 in the firewall to use it (-http3=false turns it off). HTTP/3 helps viewers on phones and busy Wi-Fi.
System
Admin → System shows CPU, memory, disk and network use with a one-hour history, the incoming streams and viewers, and checks of the server setup: kernel network buffers for SRT, connection limits, BBR congestion control, open-file limits, swap, disk space, clock synchronization, ffmpeg, GeoIP databases and HTTPS. Each warning explains why it matters and gives the exact setting to apply; kernel settings are collected into one file to copy to /etc/sysctl.d/90-castgate.conf.
Simultaneous viewers and connections
castgate counts two things at once:
- Viewers: one per person playing (web player, TV app, link in VLC or an app, radio listener), per channel. This is what the plan's viewer limit counts: when a channel is full, the next viewer sees "viewer limit reached". Each channel's Audience page shows "watching now", "most at once" for the period and its all-time record; Admin → Overview shows the totals.
- Connections: the network connections to the server, by kind: web (HTTP/1.1 and HTTP/2), HTTP/3 (QUIC) and encoders (RTMP, SRT). Admin → System shows them now, the most since the server started, the all-time record and the addresses holding the most. One viewer usually uses one or two connections; a page with the chat open adds one.
To protect the server, one address may keep at most 1000 web connections open (-max-conns-per-ip, 0 for no limit). Connections from this machine and from -trusted-proxies are never limited; if the site is behind a CDN or proxy, list its addresses there. The figures are also in the monitoring feed (castgate_connections, castgate_viewers, castgate_record_*).
GeoIP databases
Put GeoLite2-City.mmdb (or GeoLite2-Country.mmdb) and GeoLite2-ASN.mmdb in /dev/shm, the folder castgate runs from, the folder given with -geoip-dir, or the data folder (Settings → upload). If several copies exist, the newest build is used. Replaced files are loaded within a minute without a restart, so a weekly geoipupdate -d /dev/shm from cron keeps locations current.
Blocking abusive addresses
Admin → Blocking blocks an address or range (from /8 for IPv4, /16 for IPv6) for an hour, a day, a week, 30 days or until removed. Blocked addresses get no pages, no video, and cannot stream to the server over RTMP or SRT; encoders already streaming from them are disconnected.
With automatic blocking on (the default), an address is blocked for an hour, or a day if it happens again within a week, after within 10 minutes: 20 failed sign-ins, 20 wrong stream keys, 20 wrong signup or access codes, or repeatedly exceeding the app request limit. The server itself and the caching proxies given with -trusted-proxies are never blocked automatically; behind a proxy, blocks apply to the real viewer address. Every block and unblock is in the audit log.
Geofencing for the whole server
Admin → Blocking → Countries, networks and cities blocks viewers from those places on every channel; they still see the pages but cannot watch. Use it for countries you may not serve, or for hosting networks that send fake viewers. Check an address shows where an address is and whether it may watch. Channels add their own allow and block lists in their settings. All of it needs the GeoIP databases above; without them the rules are not applied.
Peer-to-peer playback
Admin → Peer-to-peer turns it on for the server; each channel then turns it on in its own settings. Viewers join a swarm per stream through the server (/p2p/ws, a WebSocket on the same address as the site, so nothing extra to open) and exchange video directly.
- STUN servers help viewers behind home routers find each other. Empty means Cloudflare's and Google's public servers; in countries that block Google, run your own (coturn does STUN too).
- Built-in relay (TURN): castgate can run its own relay, so there is nothing else to install. Turn it on under Built-in relay, open the ports it lists in the firewall (3478 UDP and TCP, the relay range, by default 49160-49360 UDP, and 5349 TCP if you use TLS), and press Test STUN and TURN. Behind NAT, set the public address viewers reach the server on. Viewers get a password valid for a few hours; the relay reaches only public internet addresses (never your own network or this server) and has limits per viewer address and, if you set one, in total. The page shows how many viewers it relays now and how many requests it refused.
- Outside TURN relays carry video for viewers whose networks block direct connections. With coturn, set
use-auth-secretandstatic-auth-secret=…in turnserver.conf and paste the same secret here: each viewer gets a password valid for 12 hours. A fixed user name and password also work. - Viewers in one swarm limits the size of one group (500 by default). Signaling is limited per address and per connection against abuse, the join needs a token issued with the playback session, and the geofence and blocks apply.
- The page lists every stream being shared right now with its share from viewers, and the signaling event log.
- Field test (1.3): the link under Field test opens a test page on any phone or computer, for 24 hours, without signing in. Send it to someone on the network you want to try (a church's guest Wi-Fi, a mobile provider, an office). The page shows where the device appears to be (address, place, network) and checks, in that browser: STUN (does the network let the device learn its public address), the relay (a connection that may only use TURN, to a second connection in the same page: what a viewer behind a strict firewall does) and signaling (a join through
/p2p/ws, which some proxies block). Results, with the tester's note, are listed on this page (the last 100 are kept). Failing STUN with a working relay means viewers on that network can still share through the relay; failing signaling means they play from the server only. - For tests on a local network only, the server option
-turn-allow-privatelets the built-in relay reach private and local addresses. Never use it on a public server.
Adaptive quality made on the server
Plans with "Make lower qualities on the server" (Admin → Plans) get up to two lower qualities made with ffmpeg while they are live: roughly one CPU core per live church. Watch Admin → System when you enable it for many churches.
Monitoring and backup
/metrics gives live figures in Prometheus format (streams, viewers, bitrate, CPU, traffic, per channel). It is open from the server itself and the trusted proxies; elsewhere add the token shown on Admin → System. Download backup on the same page saves accounts, plans, settings and schedules; it contains secrets, so store it safely.
Home page
Admin → Home page edits the headline, text, feature cards, questions, contact details, legal pages and colors of the public site. Changes are live immediately.