Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Set Up a FiveM Server on a VPS

FiveM wants stable CPU, solid networking and open ports. A VPS dedicated to the game avoids noisy-neighbor lag from shared hosting.

Steps

  1. Update the system and install basic dependencies:

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y xz-utils git wget curl screen
  2. Create a user/folder and download FXServer artifacts (use a current build URL):

    sudo useradd -m -r -s /bin/bash fivem || true
    sudo mkdir -p /opt/fivem && sudo chown fivem:fivem /opt/fivem
    sudo -u fivem bash -c 'cd /opt/fivem && wget -O fx.tar.xz "FXSERVER_ARTIFACTS_URL" && tar -xf fx.tar.xz'
  3. Add server-data (resources + server.cfg) and set the license key:

    sudo -u fivem bash -c 'cd /opt/fivem && mkdir -p server-data'
    # Edit server-data/server.cfg: sv_licenseKey, endpoints, resources
  4. Open ports and start under screen:

    sudo ufw allow 30120/tcp
    sudo ufw allow 30120/udp
    sudo -u fivem bash -c 'cd /opt/fivem && screen -S fivem ./run.sh +exec server-data/server.cfg'

Tips

  • Prefer SSD and ≥4 vCPU with heavy scripts; network quality matters as much as CPU.
  • Do not expose TXAdmin without a strong password and firewall rules.

ext step

CPU and network built for games: See our game server VPS plans.

Related guides