Zerio RadioSelf-Hosting

Self-Hosting the Voice Server

These pages are for zerio-radio V3. Still on V2? See the V2 documentation.

zerio-radio V3 sends radio voice through a voice server (zerio-voice). You can self-host it on your own machine, next to your FiveM server: it’s a single program with a small config file, on Windows or Linux. You can also run it with Docker, or on a Pterodactyl or Pelican panel with our egg.

What You Need

  • A Windows (10/11 or Server 2019+) or Linux machine (Ubuntu 22.04+, Debian 12+). The same machine as your FiveM server is fine.
  • MySQL 8 or MariaDB 10.6+, with an empty database for the voice server. Don’t reuse your FiveM database. With Docker, the database is included.
  • A port players can reach: TCP 30130 by default.
  • zerio-radio V3 on your FiveM server.

A VPS, a dedicated server or a game server panel that lets you run your own programs (Pterodactyl, Pelican, TCAdmin) all work. A FiveM-only hosting plan that can’t run anything besides FiveM can’t run the voice server.

Get Your Licence and Download

Claim Your Licence

  1. Open portal.radio.zerio-scripts.com/setup.
  2. Under Already own zerio-radio? Set up your voice server, enter the transaction ID of your zerio-radio purchase (it starts with tbx- and is in your purchase receipt email) and the email or Cfx.re username you bought it with. If your email isn’t accepted, use your Cfx.re username.
  3. Choose a Server ID, for example my-rp-server. It becomes part of your voice server’s address and can’t be changed later.
  4. Set your sign-in email and enter the 6-digit code we send to it. You need this email to sign in to the portal later.
  5. The portal then shows two licence keys, a production key and a development key. They’re only shown once, so save both somewhere safe.

Each purchase can set up one voice server.

Pick How to Run It

Sign in at portal.radio.zerio-scripts.com and open the Server page. The Self-hosting card shows three ways to run the voice server, each with its download or the file to copy:

WayGood forContinue with
Windows or LinuxYour own PC, a VPS or a dedicated serverDownload it from the card, then Set It Up
DockerA machine that runs Docker. The database is included.Docker
Pterodactyl or PelicanA game server panelPterodactyl and Pelican

All three run the same voice server, and you can move from one to another later.

Which Licence Key?

  • Production: for the server your players use. It runs on up to 2 machines at once (for example a live and a staging server).
  • Development: for testing on your own PC. It only works when the voice server listens on 127.0.0.1, with up to 8 players.

Lost a key, or think someone else has it? Rotate it on the portal’s Server page. You get a new key and the old one stops working.

Set It Up

These steps are for the Windows or Linux download. Using Docker or Pterodactyl or Pelican? Follow that section instead, then come back for Connect zerio-radio.

Put It in Its Own Folder

The download is named like zerio-voice-1.1.0-win-x64.exe or zerio-voice-1.1.0-linux-x64. Rename it to zerio-voice.exe (Windows) or zerio-voice (Linux), and put it in a folder of its own that it can write to, for example C:\zerio-voice on Windows (not inside Program Files) or /opt/zerio-voice on Linux. Keep it there: updates are installed into this folder.

On Linux, also create a user for it and make the program runnable:

sudo useradd --system --home /opt/zerio-voice --shell /usr/sbin/nologin zerio-voice
sudo chmod +x /opt/zerio-voice/zerio-voice
sudo chown -R zerio-voice:zerio-voice /opt/zerio-voice

Create the Database

Create an empty database and a user for it, for example in HeidiSQL or the mysql command line:

CREATE DATABASE zerio_voice;
CREATE USER 'zerio_voice'@'127.0.0.1' IDENTIFIED BY 'a-strong-password';
GRANT ALL ON zerio_voice.* TO 'zerio_voice'@'127.0.0.1';

Use @'127.0.0.1', not only @'localhost'. The voice server creates its own tables on its first start.

Create config.json

Start the program once (Windows: double-click it; if Windows says “Windows protected your PC”, click More info, then Run anyway. Linux: cd /opt/zerio-voice && sudo -u zerio-voice ./zerio-voice). It creates config.json next to itself, with a random admin token already filled in, and prints the line to put in your FiveM server.cfg. Then open config.json and fill in the two CHANGE_ME values:

{
  "mode": "single",
  "server": {
    "host": "0.0.0.0",
    "port": 30130
  },
  "database": {
    "url": "mysql://zerio_voice:a-strong-password@127.0.0.1/zerio_voice"
  },
  "auth": {
    "admin_token": "(filled in for you)"
  },
  "licence": {
    "key": "zvl_your_production_key"
  },
  "zerio_domain": true,
  "updates": {
    "check": true,
    "supervisor": true
  }
}
SettingWhat to put there
server.portThe port players connect to. 30130 unless you change it. On a game server panel, use a port the panel gave this server.
database.urlmysql://user:password@host/database for the database you just created. Special characters in the password must be URL-encoded (@ becomes %40).
auth.admin_tokenFilled in for you. Your FiveM server uses the same value. Keep it secret.
licence.keyYour production licence key (zvl_...).
zerio_domaintrue: the voice server gets its address and certificate from us (see Your Voice Server’s Address). false when you use your own domain.

Start It

Allow the port in Windows Firewall first (and in your host’s firewall, if it has one). In a terminal opened as administrator:

netsh advfirewall firewall add rule name="zerio-voice" dir=in action=allow protocol=TCP localport=30130

Then double-click zerio-voice.exe, or run it from a terminal in the folder. If Windows asks about network access, click Allow.

It’s running when it prints zerio-voice ready (v1.1.0) on 0.0.0.0:30130. Check that it also prints licence: valid.

The first start with an address from us takes up to a minute while the certificate is made. Then the voice server checks itself from the outside and prints either players can reach wss://... or a box that says the port is closed. If it’s closed, open the port (the machine’s firewall, your host’s firewall, or a port forward on your router) and wait: it checks again every minute, no restart needed.

Game server panels: on Pterodactyl or Pelican, use our egg. On other panels (TCAdmin…):

  • Use zerio-voice (or zerio-voice.exe) as the start command, stop as the stop command, and zerio-voice ready as the “server started” text. On Linux, pick an image based on Debian 12 or Ubuntu 22.04 (or newer).
  • Set server.port in config.json to a port the panel gave this server.
  • Add "public_ip": "<the IP shown next to that port>" to config.json.
  • Leave zerio_voice_admin_url out of your FiveM server.cfg (see below).

Connect zerio-radio

When the voice server starts, it prints its address and the lines for your server.cfg, for example:

  Your voice server's address: my-rp-server.voice.zerio-radio.com:30130
  In your FiveM server.cfg:
    setr zerio_voice_domain "my-rp-server.voice.zerio-radio.com:30130"
  and, only if FiveM runs on this same machine (not in a
  separate game-panel server or container):
    set  zerio_voice_admin_url "http://127.0.0.1:30131"

In configs/voice.lua, leave Domain and ServerId as they are. The address goes in server.cfg.

Add the printed lines and the admin token to your server.cfg, above ensure zerio-radio:

set  zerio_voice_admin_token "the same admin_token as in config.json"
setr zerio_voice_domain      "my-rp-server.voice.zerio-radio.com:30130"
set  zerio_voice_admin_url   "http://127.0.0.1:30131"

Leave out zerio_voice_admin_url if the voice server runs on a different machine than FiveM, or in a separate server on a game panel. zerio-radio then uses the address from zerio_voice_domain.

🚫

Use set for the admin token, never setr. setr sends the value to every player’s game.

Restart your FiveM server. The console shows a red box if zerio-radio can’t reach the voice server or the token doesn’t match, and a yellow box if zerio_voice_domain is an address players can’t use (localhost or a bare IP address).

Docker

Our Docker image downloads the voice server with your licence key the first time it starts. The file below also starts a database for it, so there’s nothing else to install.

Save This as compose.yml

# zerio-voice with its own database. Guide:
# https://docs.zerio-scripts.com/radio/selfhosting
#
# 1. Put your production licence key in LICENCE_KEY.
# 2. Replace change-this-password in BOTH places with a password of your own
#    (letters and digits only, or percent-encode it in DATABASE_URL).
# 3. docker compose up -d, then docker compose logs -f zerio-voice
services:
  zerio-voice:
    image: ghcr.io/zerio-ab/zerio-voice-selfhost:latest
    restart: unless-stopped
    stop_grace_period: 20s
    ports:
      - "30130:30130"
    environment:
      LICENCE_KEY: "zvl_your_production_key"
      DATABASE_URL: "mysql://zerio_voice:change-this-password@db/zerio_voice"
    volumes:
      - zerio-voice:/data
    depends_on:
      db:
        condition: service_healthy
 
  db:
    image: mariadb:11.4
    restart: unless-stopped
    environment:
      MARIADB_DATABASE: zerio_voice
      MARIADB_USER: zerio_voice
      MARIADB_PASSWORD: "change-this-password"
      MARIADB_RANDOM_ROOT_PASSWORD: "1"
    volumes:
      - zerio-voice-db:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 5s
      timeout: 5s
      retries: 20
 
volumes:
  # The voice server, its config.json, its address and its licence files.
  # Keep this volume: without it the server gets a new address and counts as
  # a new machine for your licence.
  zerio-voice:
  zerio-voice-db:

Put your production licence key in LICENCE_KEY, and replace change-this-password in both places with a password of your own.

Start the Containers

In the folder with compose.yml:

docker compose up -d

Then look at the voice server’s output:

docker compose logs -f zerio-voice

The first start shows your admin token once, as the zerio_voice_admin_token line for your server.cfg. Save it. The voice server is running when you see zerio-voice ready (v1.1.0) on 0.0.0.0:30130 and licence: valid.

Open the Port

Allow TCP port 30130 in the machine’s firewall (and your host’s firewall, if it has one), for example:

sudo ufw allow 30130/tcp

Within a minute the output says players can reach wss://....

Add It to Your FiveM Server

Put the admin token and the address from the output in your server.cfg, as in Connect zerio-radio. Leave out zerio_voice_admin_url.

Good to know:

  • Updating: docker compose pull doesn’t change the voice server’s version. See Updates.
  • Keep the zerio-voice volume. It holds the voice server, its config.json, its address and its licence files. docker compose down keeps it; docker compose down -v deletes it, and the voice server then gets a new address and counts as a new machine for your licence.
  • Your own database: remove the db service and the depends_on lines, and point DATABASE_URL at your database.
  • Another port: add PORT: "30140" under environment and use the same number on both sides of ports ("30140:30140").
  • More than one public IP: add PUBLIC_IP: "203.0.113.5" under environment, with the IP players should use.
  • Lost the admin token? docker compose exec zerio-voice jq -r .auth.admin_token /data/config.json shows it.
  • Other settings (your own domain, turning dispatch off) are in config.json in the volume. Copy it out with docker compose cp zerio-voice:/data/config.json ., edit it, copy it back with docker compose cp config.json zerio-voice:/data/config.json, then docker compose restart zerio-voice. The values you set under environment always win over the file.

Pterodactyl and Pelican

Our egg installs the voice server and keeps config.json filled in for you.

Import the Egg

Download egg-zerio-voice.json (also on the portal’s Self-hosting card) and import it: Admin › Nests › Import Egg on Pterodactyl, Eggs › Import on Pelican.

Create the Server

Create a server with the Zerio Voice egg, one port, and your production licence key. The install downloads the newest voice server with your key.

Give It a Database

In the server’s Databases tab, create a database. Copy its endpoint, name, username and password into the Startup tab.

If the panel’s machine has more than one IP address, also put the IP shown next to the server’s port in Public IP.

Start It and Add It to Your FiveM Server

Start the server. The console prints the lines for your server.cfg; add them as in Connect zerio-radio, and leave out zerio_voice_admin_url. The admin token is auth.admin_token in config.json, in the Files tab.

To update, type update in the console.

Your Voice Server’s Address

Players’ games only connect to a voice server over a secure connection, with a certificate for a domain name. An IP address alone doesn’t work. Pick one:

An Address From Us (Default)

With "zerio_domain": true, the voice server gets an address like my-rp-server.voice.zerio-radio.com and a certificate for it from the Zerio portal. There’s nothing to buy or set up:

  • The address points at the machine’s public IP, and follows it if the IP changes.
  • The certificate renews by itself.
  • Players connect on your normal port (30130). Ports 80 and 443 aren’t needed.

If the voice server can’t work out its public IP (it says so when it starts), or the machine has several, add "public_ip": "203.0.113.5" to config.json with the public IPv4 address players should use.

The address belongs to the files next to config.json: instance-id, licence.lease and the zerio-domain folder. Keep them, together with config.json, when you move or reinstall the voice server. Without them it gets a new address (so server.cfg must change) and counts as a new machine for your licence.

Your Own Domain

Set "zerio_domain": false, point your domain (for example radio.example.com) at the voice server’s machine, then pick one:

  • Let the voice server get its own certificate. Add this to config.json. Ports 80 and 443 must be free and open on the machine:

    "tls": { "domain": "radio.example.com", "contact_email": "you@example.com" }
  • Use your own web server (when the machine already runs one on 80/443). Set "host": "127.0.0.1" in config.json and forward only /ws to the voice server. For example with Caddy:

    radio.example.com {
    	handle /ws {
    		reverse_proxy 127.0.0.1:30130
    	}
    	respond 404
    }

Then use the domain in server.cfg:

setr zerio_voice_domain "radio.example.com"

Dispatch

The web dispatch console and tone board on portal.radio.zerio-scripts.com work with your own voice server too. Two connections make them work:

  • Your voice server keeps an outbound connection to the portal, signed in with its licence key. There is no port to open, and its console shows portal link: connected.
  • Dispatchers’ browsers connect straight to your voice server for audio, so it must be on a domain with HTTPS. The address from us (the default) has that. With your own domain behind a reverse proxy, set dispatch.public_url in config.json to wss://<your domain>.

Sign in at the portal with your portal email to add dispatch accounts and groups. The Server page shows whether the link is up and which address dispatchers connect to.

To turn dispatch off, set "dispatch": { "portal_link": false } in config.json. Voice keeps working.

Updates

Nothing updates by itself. When a new version is out, the voice server console tells you, and so do zerio-radio admins in game. Type these in the voice server’s console (on Pterodactyl or Pelican, the server’s console on the panel):

CommandWhat it does
statusThe running version, whether it’s healthy, and the last update check.
update checkLook for a new version now.
updateInstall the newest version. The radio is quiet for 10 to 20 seconds. If the new version doesn’t start, it goes back by itself.
stopStop the voice server.

With Docker, run the command instead of typing it: docker compose exec zerio-voice update (or status, or update check). The answer shows up in docker compose logs zerio-voice.

On Linux with systemd there’s no console: stop the service, run it once in a terminal and type update, then start the service again. Or replace the zerio-voice file with the new download and restart the service.

Don’t edit or delete the .zerio-voice folder the voice server creates next to it. It holds the installed versions.

Troubleshooting

You seeWhat to do
licence: no valid licence … reason=missinglicence.key is empty. Copy your production key from the portal (with Docker: LICENCE_KEY in compose.yml).
reason=unknownThe key has a typo. Copy it again, or rotate it on the portal.
reason=instance_limitThe production key already runs on 2 machines. A machine stops counting 13 hours after it was last online.
reason=dev_not_loopbackYou used the development key on a public server. Use the production key.
reason=unreachableThe machine can’t reach portal.radio.zerio-scripts.com over HTTPS. Check its outgoing firewall. It tries again every 5 minutes.
Red “admin token” box in FiveMzerio_voice_admin_token in server.cfg isn’t the same as auth.admin_token in config.json.
Players can’t hear anyoneCheck the port is open (TCP 30130) in every firewall, and that zerio_voice_domain is exactly the address the voice server printed, including :30130. From your own PC, https://<that address>/health should show "status":"ok".
Players can't reach this voice server yetThe port is closed from the internet. Open it in the machine’s firewall, your host’s firewall or panel, or forward it on your router. It checks again every minute.
Red “wrong voice server address (404)” boxServerId in configs/voice.lua must be empty when self-hosting, and zerio_voice_domain must be the printed address.
can't connect to the databaseCheck database.url in config.json: user, password (URL-encoded), host and database name, and that MySQL/MariaDB is running.
can't listen on ...Another program (or a second zerio-voice) already uses that port. Stop it, or change server.port.
zerio domain: … development keyzerio_domain needs the production key. For testing on your own PC with the development key, set "zerio_domain": false and "host": "127.0.0.1", and use setr zerio_voice_domain "localhost:30130".
zerio domain: … public IPv4 addressAdd "public_ip": "<the machine's public IPv4>" to config.json.

With Docker, a container that keeps restarting says why at the end of docker compose logs zerio-voice, for example zerio-voice can't start: the portal doesn't know this licence key.

Still stuck? Ask in our Discord.