FiveM server documentation
Deploy a roleplay-ready FiveM environment with a clean base install, proper script structure, and a reliable server management routine.
How to install FiveM server
FiveM uses FXServer artifacts and a server data folder. On managed hosting, this is often prewired. On a VPS or custom environment, use the workflow below.
-
Create the server directories
Create one folder for the FXServer binaries and another for your server data. Keeping them separate makes upgrades cleaner.
mkdir -p ~/fivem/server ~/fivem/server-data cd ~/fivem/server -
Download the latest Linux artifact
Upload the archive from the FiveM artifacts page or download it directly on the machine, then extract it into the
serverfolder.tar xf fx.tar.xz -C ~/fivem/server cd ~/fivem/server-dataTip: Keep the artifact filename versioned so you know which build is currently deployed when troubleshooting after an update. -
Prepare server data and configuration
Add your
server.cfg, choose a database-backed framework if needed, and confirm your endpoint settings, sv_licenseKey, and txAdmin profile details are correct.endpoint_add_tcp "0.0.0.0:30120" endpoint_add_udp "0.0.0.0:30120" sv_maxclients 32 set steam_webApiKey "YOUR_STEAM_WEB_API_KEY" sv_licenseKey "YOUR_CFX_RE_KEY" ensure mapmanager ensure chat ensure spawnmanager ensure sessionmanager ensure hardcap ensure rconlog -
Start the server with txAdmin or run.sh
Managed hosts usually expose txAdmin in the panel. On a VPS, launch the FXServer binary from the server folder and follow the txAdmin web wizard.
cd ~/fivem/server bash ./run.sh +set serverProfile default
How to add scripts
Every resource should live inside your resources folder and be started from server.cfg or the txAdmin recipe manager.
-
Upload the script into a dedicated folder
Use SFTP or the hosting file manager to place the script in a clear path such as
resources/[standalone]/script-name. -
Verify the manifest file
Most modern resources use
fxmanifest.lua. Older resources may still use__resource.lua. Read the author’s install notes for dependencies like ox_lib, MySQL, or ESX/QBCore. -
Ensure the resource in the correct load order
Framework dependencies must start before scripts that rely on them. Place libraries first, then frameworks, then jobs, UI, and gameplay packs.
ensure oxmysql ensure ox_lib ensure qb-core ensure qb-target ensure my-custom-housing -
Restart only what changed
For live servers, use a targeted resource restart instead of rebooting the whole instance when possible.
ensure my-custom-housing restart my-custom-housing
How to start, stop, and restart the server
You can control the instance from your host panel, txAdmin, or the console. Use controlled restarts whenever scripts touch databases or player state.
| Action | Recommended method | Why it matters |
|---|---|---|
| Start server | Panel start button or run.sh | Ensures the process boots with the expected profile and monitoring. |
| Soft restart | txAdmin scheduled restart | Warns players and can run cleanup hooks before the instance goes down. |
| Resource restart | restart resource-name | Fastest fix for one script without affecting the full player base. |
| Stop server | quit or panel stop | Lets the process exit cleanly instead of being killed abruptly. |
status
players
restart qb-target
quit
Before planned restarts, announce downtime inside txAdmin, verify OneSync and database services are healthy, and keep backups of critical resource configs.
Still having issues? Contact support
Join our Discord if txAdmin is inaccessible, artifacts will not boot, or a resource creates console spam after deployment.