This article was first published on the Lurcast blog. It was written with AI assistance.
Key takeaways
Install Icecast on Ubuntu or Debian with sudo apt install icecast2, then enable it with systemctl enable --now icecast2.
Edit /etc/icecast2/icecast.xml to change the source, admin and relay passwords from hackme, set hostname, and add a mount with a fallback stream.
Open tcp/8000 in both ufw and your VPS provider's cloud security group, then test with curl -I http://localhost:8000/status.xsl before going remote.
Connect a source client like Liquidsoap or ezstream using the source password, server IP and mount name; a 401 in the logs means a password mismatch.
At 128 kbps, listener capacity is bitrate times listeners, so a Radio 100 tier needs roughly 12.8 Mbps of sustained outbound bandwidth.
To start an Icecast server, install the icecast2 package on Ubuntu or Debian, replace the default config with a working icecast.xml, open port 8000 in your firewall, and connect a source client like Liquidsoap or ezstream to your mount. This walkthrough gives you every command and config line, plus fixes for the three failures that kill most first attempts.
What do you need before you start an Icecast server?
Four things: a VPS with a public IP address, one free TCP port (8000 by default), a source client or AutoDJ to feed audio into the mount, and enough upstream bandwidth to carry your listener slots. Icecast itself is lightweight, so 1 GB of RAM is plenty for a first run; the network is what usually bites people. The server's behaviour is controlled entirely by one XML file, so it is worth skimming the official Icecast documentation on icecast.xml configuration before you edit anything.
Bandwidth math for Radio 100/250/500 style listener tiers
Multiply bitrate by listeners. A Radio 100 tier at 128 kbps needs roughly 100 × 128 kbps ≈ 12.8 Mbps of sustained outbound capacity; a Radio 500 tier at the same bitrate needs about 64 Mbps. Leave headroom above the raw math, because rebuffering and dead air cost you listeners faster than any config mistake. If you plan to resell tiers later through WHMCS, note that per-station caps and royalty reports become the next problem; that is where a panel or a self-hosted alternative like Lurcast (AGPL-3.0, https://www.lurcast.com/terms) enters the picture, but plain Icecast is fine to start.
How do you install Icecast on Ubuntu or Debian?
The fastest way to start an Icecast server on Ubuntu or Debian is one command: sudo apt install icecast2. The package pulls in the daemon, a default /etc/icecast2/icecast.xml, and log directories under /var/log/icecast2. On Debian-family installers you may be prompted to set the source and admin passwords; if you skip them, edit the XML directly before going live.
Enabling the service with systemd
Start and persist the daemon with sudo systemctl enable --now icecast2. Confirm it is running with systemctl status icecast2, then check the listener port with ss -tlnp | grep 8000. A 404 or the default status page at http://your-vps-ip:8000 means the daemon is up and you are ready to edit config. If you later outgrow a single Icecast instance, a self-hosted alternative like Lurcast runs many stations in one process on the same VPS.
How do you configure icecast.xml for your first stream?
The default config file shipped with the Icecast package on Ubuntu or Debian lives at /etc/icecast2/icecast.xml and works after three edits: passwords, hostname, and a mount block. Package availability differs per distro, so check the Icecast download page if your repo ships an old build.
The authentication block: source, admin and relay passwords
Three passwords matter. source authenticates encoder connections to mounts, admin unlocks the web admin at /admin, and relay lets other Icecast servers pull your streams. Change all three from hackme before anything else:
<authentication> <source-password>pick-a-long-source-pass</source-password> <relay-password>pick-a-relay-pass</relay-password> <admin-user>admin</admin-user> <admin-password>pick-an-admin-pass</admin-password> </authentication> <hostname>radio.example.com</hostname> <listen-socket> <port>8000</port> </listen-socket> Set hostname to the public DNS name of your VPS, not localhost, or generated playlist URLs will point nowhere.
Defining a mount point with a fallback stream
A default mount is what keeps dead air off your station. The fallback-mount sends listeners to a 24/7 AutoDJ or loop file whenever your live source disconnects, and fallback-override moves them back automatically when the live stream returns:
<mount> <mount-name>/live</mount-name> <fallback-mount>/autodj</fallback-mount> <fallback-override>1</fallback-override> <max-listeners>250</max-listeners> <bitrate>128</bitrate> </mount> Define a second mount for /autodj and point your AutoDJ source client at it. This one block is the difference between a listener staying tuned through a DJ logout and closing the player. It also mirrors what panels like Centova Cast and MediaCP generate for you under the hood, so writing it by hand once teaches you what those panels actually do. If you later outgrow hand-edited XML and want every customer station provisioned this way in one process, Lurcast handles mounts, fallbacks and per-station caps for you (see getting started).
Limits: clients, sources and burst size
In the <limits> block, set <clients> to your listener-slot total plus headroom, <sources> to the number of mounts you will actually run, and leave <burst-size> at its default 65535 unless listeners on slow links report stutter. <queue-size> and <client-timeout> can stay at defaults for a first run.
How do you open the firewall and test that Icecast is running?
Testing with curl before opening a browser
On Ubuntu or Debian with ufw, allow the port you bound in icecast.xml: sudo ufw allow 8000/tcp, then sudo ufw status to confirm. If you run raw iptables instead, add an ACCEPT rule for tcp/8000 on the INPUT chain before any DROP rule. Cloud VPS providers add a second layer: check the security group or firewall panel in your provider's dashboard and open 8000 there too, or local rules will not matter.
Test locally first with curl -I http://localhost:8000/status.xsl. A 200 OK means Icecast is up and binding correctly. Then repeat from your machine against the VPS public IP. If local works but remote fails, the problem is firewall or security group, not Icecast.
When something breaks, read the logs: /var/log/icecast2/error.log shows bind failures and config errors, and access.log records every listener and source connection. If you outgrow hand-editing configs, Lurcast runs every station in one process and keeps your existing encoders and stats scripts (https://www.lurcast.com/docs).
How do you connect a source client like Liquidsoap or ezstream to your mount point?
Icecast sits idle until a source client authenticates and pushes audio. Both clients need three values from your icecast.xml: the source password, the server IP, and the mount name.
ezstream minimal config
The ezstream documentation shows the minimal shape: an ezstream element with a url of http://127.0.0.1:8000/radio.mp3, a sourcepassword matching your source password, a format of MP3, and a filename pointing at a playlist. Run ezstream -c ezstream.xml and it streams on loop.
Liquidsoap output.liq example
In Liquidsoap, one line does it: output.icecast(%mp3, host="127.0.0.1", port=8000, password="hackme", mount="radio.mp3", playlist). Reload the script and Liquidsoap reconnects automatically if the server drops.
A successful connection shows source entries in /var/log/icecast2/error.log and your mount appearing at http://your-ip:8000/radio.mp3. Failed auth logs a 401, which almost always means the source password, not the admin password.
If you later host many stations, the same mount model applies; Lurcast documents its own integrations in its plugin docs.
Why is your Icecast server not reachable and how do you fix it?
Three failures account for almost every dead first-run: the port is taken, the source password is wrong, or a firewall eats the traffic. Each one leaves a distinct fingerprint in the logs.
Port 8000 already in use
If Icecast exits on startup or the status page never loads, check what holds the port with ss -tlnp | grep 8000. Another Icecast instance, a panel-managed stream, or an unrelated service may already be bound. Either stop that process or change <port> in icecast.xml and restart.
401 on mount: source password mismatch
A 401 in the access log, or Liquidsoap and ezstream retrying in a loop, means the source client's password does not match <source-password> in icecast.xml. Remember the client sends source:password as basic auth on the mount, so the username field in your source client is usually ignored. Fix the password, restart the client, and watch the log for the mount appearing.
Firewall and cloud security group blocks
If the log shows Icecast listening but curl http://YOUR_IP:8000 times out from outside, packets are being dropped.
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused locally | Port already bound | ss -tlnp, stop or rebind |
| 401 in access log | Wrong source password | Match <source-password> |
| Timeout from outside | ufw or security group | Open the port in both |
Check ufw with sudo ufw status, and remember most VPS providers also apply a cloud security group you must edit separately.
What should you change from the default config before going live?
Passwords and hostname
The stock icecast.xml ships with hackme as the source and relay password and changeme-style admin credentials. Replace all of them before you accept a single listener, and set <hostname> to the DNS name your listeners will actually see, since it appears in generated playlist files and redirects. Change the <admin> username too, and bind to your public IP rather than leaving <listen-socket> on defaults if you run multiple services on the box.
Per-mount listener caps and fallbacks
Set <max-listeners> on every mount so a misbehaving source cannot eat all your listener slots, and configure <fallback-mount> so a source dropout hands listeners to a dead-air file instead of an error page. If you resell slots by tier, caps per mount are the mechanism that keeps a 100-slot package from consuming a 500-slot server's capacity.
For Liquidsoap sources, the Liquidsoap documentation documents the output.icecast parameters you need: host, port, password, and mount.
Finally, Icecast writes access and error logs that grow without limit. Add a logrotate rule for access.log and error.log, or a busy host will fill its disk within weeks.
When does plain Icecast stop being enough for a hosting provider?
One Icecast process per customer station works until you are reselling Radio 100/250/500 listener-slot packages. Then provisioning, per-station caps, and monthly royalty reports become the job, and panel glue around Icecast becomes the fragile part.
A criteria checklist applied honestly to Icecast, AzuraCast and Lurcast
Judge any alternative on four things: a provisioning API your WHMCS stack can call, per-station caps on listener slots and bitrate, royalty CSVs you can hand to accounting, and compatibility with the Icecast and SHOUTcast encoders, players and stats scripts you already run.
Plain Icecast scores zero on the first three; it is a streaming server, not a host panel. AzuraCast gives you a full station stack but is built per-station, not as a multi-tenant host backend. Lurcast runs every station you host in one process, keeps your existing mounts, fallback streams and AutoDJ tooling, and ships the Hosting edition (€29 Growth, €59 Unlimited) for exactly this case. Run all three through the same checklist before you migrate anything.
FAQ
Can I run Icecast and SHOUTcast on the same VPS?
Yes, as long as each daemon binds to a different port. Icecast defaults to 8000, so give SHOUTcast another port like 8001 and open both in ufw and your provider's security group. Check for conflicts with ss -tlnp | grep 8000 before starting either service, and set <sources> in your limits block high enough to cover both.
How many listeners can Icecast handle on a 1 Gbps VPS?
Do the bandwidth math: bitrate times listeners. At 128 kbps, 1 Gbps carries roughly 7,800 listeners in theory, so a 1 Gbps VPS is rarely the bottleneck for typical Radio 100/250/500 tiers. CPU and RAM are negligible; leave headroom above the raw number, since rebuffering and dead air cost you listeners faster than any config mistake.
Does Icecast cost anything or need a license?
No. Icecast is free open-source software, so the icecast2 package on Ubuntu or Debian costs nothing to run and has no license fees. What you pay for is the VPS itself and its bandwidth. Royalties for the music you stream are a separate obligation from the server software and are not handled by Icecast.
How do I put an AutoDJ behind Icecast so the stream never goes silent?
Define two mounts: /autodj fed by a 24/7 source client like Liquidsoap or ezstream, and /live with a fallback-mount pointing at /autodj plus fallback-override set to 1. When your live DJ disconnects, listeners drop to AutoDJ automatically and move back when the live source returns. Point the AutoDJ client at the server IP, source password, and mount name.
Why does my stream connect locally but not from outside the server?
If curl http://localhost:8000/status.xsl returns 200 but the public IP times out, packets are being dropped, not misrouted by Icecast. Check ufw with sudo ufw status, and remember most VPS providers apply a separate cloud security group you must open in their dashboard. Both layers need tcp/8000 allowed before remote listeners can reach the mount.
Lurcast is an open-source (AGPL-3.0) internet radio streaming server, compatible with Icecast and SHOUTcast: lurcast.com · GitHub

