Installation

Step-by-step guide to install Tommy's Radio on your FiveM server.

Prerequisites

  • FiveM server artifact 4752 or newer (run version in your server console to check)
  • tLib v0.6+ — install the release zip (not the source zip — source lacks the built files), add ensure tLib to server.cfg above tRadio
  • A free TCP port for the voice server (default 7777)

Extract Files

Download the release zip, transfer it to your server, and unzip on the server — don't copy individual files. Place the extracted folder in resources/.

Folder name

Name the folder anything. provide 'tRadio' in fxmanifest.lua aliases exports — scripts calling exports['tRadio']:someExport() find it regardless of folder name. Use your actual folder name in server.cfg.

Configure Settings

Edit config/config.lua. These five fields must be set before starting:

config/config.lua

Config = {
    serverAddress = "localhost", -- Ships as "localhost" — only works for a server on your own PC.
                                 -- Set to "" to auto-detect your public IP, or set it explicitly:
                                 -- "http://YOUR_SERVER_IP:7777"
    serverPort    = 7777,        -- Port for the voice server (must be unused)
    authToken     = "CHANGE_ME", -- Secret key — set a random string, 20+ characters
    adminPassword = "141",       -- Web admin panel password — change before going live
    dispatchNacId = "141",       -- Code dispatchers enter on the dispatch panel login screen
}

Change the defaults

authToken and adminPassword protect your voice server and admin panel — set your own values. The default dispatchNacId of "141" is also the public demo server's dispatch login code; leave it unchanged and anyone who knows it can access your dispatch panel.

Setting adminPassword = "" disables password login for the admin panel entirely — do this only if you use Discord authentication instead.

Open Your Port

The radio voice server needs its own port — separate from FiveM (30120) and txAdmin (40120). You cannot reuse an existing port.

Web Panel Hosting (Pterodactyl / Most Providers)

  1. In your hosting panel find Network, Ports, or Allocations and add a new port (e.g., 50978)
  2. Update config/config.lua:

config/config.lua

Config = {
    serverPort    = 50978,
    serverAddress = "http://YOUR_SERVER_IP:50978",
}
  1. Restart the entire server from the panel — not just the resource
  2. Verify at portchecker.co while the resource is running

Many providers require a support ticket

Pterodactyl-based hosts (Gravel Host, RocketNode, VibeGames, etc.) often require a support ticket to actually open the port after you add it in the panel. Tell them: "I need port [PORT] opened for a custom voice server resource."

VPS / Dedicated Server

Open the port in your firewall and set serverAddress = "" — the script auto-detects your public IP.

# Ubuntu/Debian
sudo ufw allow 7777

# CentOS/RHEL
sudo firewall-cmd --permanent --add-port=7777/tcp && sudo firewall-cmd --reload
# Windows Server
netsh advfirewall firewall add rule name="Radio" dir=in action=allow protocol=TCP localport=7777

Home Server

Forward port 7777 (TCP) in your router settings and set your public IP in serverAddress:

config/config.lua

Config = { serverPort = 7777, serverAddress = "http://YOUR_PUBLIC_IP:7777" }

Common Port Mistakes

  • Using port 30120 or 40120 — already taken by FiveM / txAdmin
  • Leaving serverAddress = "localhost" on a remote server — players can't reach it
  • serverPort and the port in serverAddress don't match
  • Wrong serverAddress format — must include the http:// prefix and the port: "http://IP:PORT"
  • Testing before the resource starts — the port only opens when tRadio is running
  • Assuming your hosting panel opened the port — always verify with portchecker.co

Start the Resource

server.cfg

ensure tLib
ensure tRadio

Use your actual folder name (e.g., ensure [tScripts]/tRadio if it's in a category bracket folder). Restart your server. A successful start prints:

 +----------------------------------------------------+
 |  Tommy's Radio - System Ready                      |
 |  Version: v6.3                                     |
 |  Panel:   http://192.0.2.100:7777/                 |
 |  NAC ID:  141                                      |
 +----------------------------------------------------+

Create Your First Channels

A fresh install has no zones, channels, or codeplugs — you create them in the admin panel. Open http://your-server-ip:port/admin in a browser, log in with adminPassword, and follow the Minimal Working Example below. Everything configured in the admin panel applies live — no restart needed.


Minimal Working Example

The complete chain that puts a police officer on a working radio channel:

1 — Zone & channel (admin panel → Zones):

Zone: "Statewide"
  Channel: "DISPATCH"   type: conventional   frequency: 154.755

2 — Codeplug (admin panel → Codeplugs → New): Set ID to leo, Name to Law Enforcement, NAC to 141, and select at least one layout in Allowed Models. Under Channel Access, enable the DISPATCH channel. Save.

3 — Job mapping — none needed. The shipped JOB_CODEPLUG_MAP in config/sv_functions.lua already maps the jobs police, sheriff, ambulance, and fire to the codeplug ID leo:

config/sv_functions.lua (shipped)

local JOB_CODEPLUG_MAP = {
    ['police']    = 'leo',
    ['sheriff']   = 'leo',
    ['ambulance'] = 'leo',
    ['fire']      = 'leo',
}

Using different job names or codeplug IDs? Edit the map and run restart tRadio — map changes require a restart, admin panel changes don't.

A player with job police now opens a radio (default key F6) pre-loaded with the leo codeplug, sees the Statewide zone, and can transmit on DISPATCH with B. Add more zones, channels, and codeplugs from the admin panel at any time.


Updating tRadio

Replace everything except these files and folders:

KeepReplace
config/config.luaEverything else
config/cl_functions.lua
config/sv_functions.lua
config/locales.json
data.json
layouts/
  1. Download the new release zip and extract it somewhere temporary
  2. Delete everything from your existing folder except the six items above
  3. Copy all files from the new zip into your folder
  4. Run restart tRadio in the server console (use your actual folder name)

Release notes call out any changes to config.lua keys. Check them before updating.

Resetting to defaults

To reset all admin panel settings to defaults: stop the resource, delete data.json, and restart. All zones, channels, codeplugs, and audio settings configured via the admin panel will be lost.