New customers: -30% on all services with code NEW
← Back to blog
Tutorial22 March 2026· 8 min read

How to install a FiveM server on a Linux VPS

What is FiveM?

FiveM is a multiplayer framework for GTA V allowing you to create roleplay servers. It's the most popular platform for GTA V RP, with millions of active players.

Prerequisites

  • Linux VPS with minimum 4 GB RAM and 4 vCPU
  • Root SSH access
  • Free FiveM license from keymaster.fivem.net
  • A legal copy of GTA V
  • Step 1: SSH connection and update

    Connect to your VPS:

    ssh root@YOUR_IP

    Update the system:

    apt update && apt upgrade -y

    apt install -y curl wget git xz-utils screen

    Step 2: Create a dedicated user

    Never run FiveM as root:

    useradd -m -s /bin/bash fivem

    su - fivem

    mkdir -p ~/FiveM/server-data

    cd ~/FiveM

    Step 3: Download FiveM artifacts

    wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/LATEST-RECOMMENDED.tar.xz

    tar xf LATEST-RECOMMENDED.tar.xz

    rm LATEST-RECOMMENDED.tar.xz

    Step 4: Download cfx-server-data

    cd server-data

    git clone https://github.com/citizenfx/cfx-server-data.git .

    Step 5: Create server.cfg

    nano server.cfg

    Basic content:

    endpoint_add_tcp "0.0.0.0:30120"

    endpoint_add_udp "0.0.0.0:30120"

    start mapmanager

    start chat

    start spawnmanager

    start sessionmanager

    start basic-gamemode

    start hardcap

    sv_scriptHookAllowed 0

    sv_hostname "My FiveM Server - VexCloud"

    sv_maxclients 32

    sv_licenseKey "YOUR_LICENSE_KEY"

    Replace YOUR_LICENSE_KEY with the key from keymaster.fivem.net.

    Step 6: Open firewall port

    ufw allow 30120/tcp

    ufw allow 30120/udp

    ufw enable

    Step 7: Start the server

    cd ~/FiveM

    bash run.sh +exec server-data/server.cfg

    To run in background (survives SSH disconnection):

    screen -S fivem bash run.sh +exec server-data/server.cfg

    Detach with Ctrl+A then D. Resume with screen -r fivem.

    Join your server

    In FiveM on your PC, press F8 and type:

    connect YOUR_IP:30120

    Recommended RP resources

  • ESX or QBCore: complete roleplay framework
  • oxmysql: MySQL database connection
  • ox_lib: utility library
  • dpemotes: animations and emotes
  • Recommended VexCloud configuration

    Up to 32 players: VPS 4 GB RAM, 4 vCPU, NVMe. Gcore + XDP DDoS protection is essential — FiveM servers are frequent UDP attack targets.

    Get started

    Try VexCloud today

    EQUINIX PA6 Paris infrastructure · DDoS protection included · No commitment

    See VPS plans →