Log inSign up

Running SHOUTcast DNAS on Ubuntu or Debian

Download the Linux x64 build of SHOUTcast DNAS 2, unpack it into /opt/shoutcast under its own user, write a sc_serv.conf with your passwords and stream path, and start it with a systemd unit. Open TCP 8000 for listeners and 8001 for legacy sources, then connect Liquidsoap or a desktop broadcaster to begin streaming.

Topic: Media and streaming · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

What is the SHOUTcast DNAS and what does it need?

DNAS (Distributed Network Audio Server) is the server part of SHOUTcast: it receives one encoded stream from a source and sends copies to listeners. It is a closed-source binary from the SHOUTcast project, so you download it rather than install it from the distribution. Read the licence and directory terms on the SHOUTcast site before going public, because listing in the directory requires an account and the terms are set by the vendor.

Resource needs are small: the server copies bytes and does no encoding, so 1 vCPU and 1 GB of memory carry a busy station. Outgoing transfer is what you size: one listener at 128 kbit/s uses about 58 MB per hour. Play only music you are licensed to broadcast.

How do you download and unpack the server?

Create a system account so the server never runs as root, then fetch the latest x64 archive.

sudo useradd --system --home /opt/shoutcast --shell /usr/sbin/nologin shoutcast
sudo install -d -o shoutcast -g shoutcast /opt/shoutcast
cd /tmp
curl -fLO https://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_x64-latest.tar.gz
sudo tar -xzf sc_serv2_linux_x64-latest.tar.gz -C /opt/shoutcast
sudo install -d -o shoutcast -g shoutcast /opt/shoutcast/logs /opt/shoutcast/control
sudo chown -R shoutcast:shoutcast /opt/shoutcast
ls -l /opt/shoutcast

The archive contains the sc_serv binary, example configuration files and documentation in HTML. Check that file /opt/shoutcast/sc_serv reports an x86-64 executable.

What should sc_serv.conf contain?

A minimal configuration needs a port base, two passwords and one stream. Generate the passwords with openssl rand -hex 12.

sudo tee /opt/shoutcast/sc_serv.conf >/dev/null <<'EOF'
logfile=logs/sc_serv.log
w3clog=logs/sc_w3c.log
banfile=control/sc_serv.ban
ripfile=control/sc_serv.rip
portbase=8000
password=CHANGE-source-secret
adminpassword=CHANGE-admin-secret
maxuser=100
publicserver=never
streamid_1=1
streampath_1=/stream
streammaxuser_1=100
EOF
sudo chown shoutcast:shoutcast /opt/shoutcast/sc_serv.conf
sudo chmod 640 /opt/shoutcast/sc_serv.conf

portbase is where listeners connect; legacy version 1 sources use the next port up, 8001. publicserver=never keeps the station out of the directory until you register it. maxuser caps simultaneous listeners, which is the simplest way to keep transfer predictable.

How do you run the DNAS under systemd?

The binary stays in the foreground when started directly, which is exactly what systemd wants. More on unit files is in systemd services.

sudo tee /etc/systemd/system/shoutcast.service >/dev/null <<'EOF'
[Unit]
Description=SHOUTcast DNAS
After=network-online.target
Wants=network-online.target

[Service]
User=shoutcast
Group=shoutcast
WorkingDirectory=/opt/shoutcast
ExecStart=/opt/shoutcast/sc_serv /opt/shoutcast/sc_serv.conf
Restart=on-failure
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now shoutcast
systemctl status shoutcast --no-pager
sudo ss -tlnp | grep sc_serv
head -n 20 /opt/shoutcast/logs/sc_serv.log

The log header prints the DNAS build number, which is your version check, and reports any configuration line it could not parse.

Which firewall ports have to be open?

Allow the port base for listeners and the admin page, plus the source port for broadcasters outside the server.

sudo ufw allow OpenSSH
sudo ufw allow 8000/tcp
sudo ufw allow 8001/tcp
sudo ufw enable
sudo ufw status

When every source runs on the server itself, skip the 8001 rule. To limit broadcasting to one home address, replace it with sudo ufw allow from 203.0.113.50 to any port 8001 proto tcp. The general approach is explained in the firewall tutorial.

How do you send audio from Liquidsoap?

Liquidsoap, packaged in Ubuntu and Debian, can play a folder around the clock and output in the SHOUTcast protocol.

sudo apt install -y liquidsoap
liquidsoap --version
sudo install -d -o deploy /srv/radio
cat > ~/station.liq <<'EOF'
music = playlist("/srv/radio")
radio = mksafe(music)
output.shoutcast(%mp3(bitrate=128),
  host="127.0.0.1", port=8000,
  password="CHANGE-source-secret",
  name="Example Radio", radio)
EOF
liquidsoap ~/station.liq

When the station plays as expected, run the script from a systemd unit owned by deploy so it starts on boot. mksafe inserts silence if the folder is empty, which stops the source from dropping and reconnecting.

How can a DJ broadcast from a laptop?

Most desktop broadcast tools include a SHOUTcast option. Use the server address 198.51.100.24 or a domain such as radio.example.net, port 8000, the source password and stream ID 1. For tools that only speak the version 1 protocol, use port 8001 and the password alone. Choose MP3 or AAC at a constant bitrate. While a DJ is connected, stop the Liquidsoap feed or give the DJ a second stream ID in the configuration (streamid_2, streampath_2).

How do you check listeners and stream health?

The admin page at http://198.51.100.24:8000/admin.cgi asks for the admin password and lists sources, listeners, bitrates and bans. From the shell, the statistics endpoint returns XML for scripts or monitoring:

curl -s "http://127.0.0.1:8000/stats?sid=1"
tail -f /opt/shoutcast/logs/sc_w3c.log

The public stream URL is http://radio.example.net:8000/stream. If you need HTTPS for an embedded web player, proxy that path through Nginx with buffering off, the same way the Icecast guide does. Watch monthly transfer with usage monitoring.

How do you upgrade the DNAS?

Download the newest archive, stop the service, extract only the binary over the old one, and start again; your sc_serv.conf and logs stay in place.

sudo systemctl stop shoutcast
sudo tar -xzf /tmp/sc_serv2_linux_x64-latest.tar.gz -C /opt/shoutcast sc_serv
sudo chown shoutcast:shoutcast /opt/shoutcast/sc_serv
sudo systemctl start shoutcast

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-1relaying needs very little CPU1 vCPU, 1 GB RAM, 25 GB NVMe$3.60/mo$43.20 for 12 months
A1-2headroom for Liquidsoap automation1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months

Questions about SHOUTcast server

Should I pick SHOUTcast or Icecast?

Icecast is open source and packaged in the distribution, so it updates with APT. SHOUTcast is a vendor binary with its own directory. Pick based on the tools and directory you want to use.

Why does the source keep getting rejected?

Check the password, the port (8000 for version 2 sources, 8001 for version 1) and the stream ID. The log in /opt/shoutcast/logs/sc_serv.log names the reason for each refused connection.

Can I run several stations on one server?

Yes. Add streamid_2, streampath_2 and so on for extra streams in one DNAS, each with its own listener limit.

Does the server encode or resample audio?

No. The DNAS only relays what the source sends, so set the bitrate and codec in Liquidsoap or the broadcasting app.

How do I list the station in the directory?

Register an account with the SHOUTcast service, follow its instructions for linking a stream, then change publicserver to always and restart. Their terms apply.