FiveMBeginnersVPSGetting started20 min read

You bought a VPS for FiveM — Getting started from scratch

Complete guide for those who bought a VPS to build their FiveM server and don't know where to start. Access, base files, folder structure and first boot.


You bought a VPS for FiveM — Now what?

If you bought a VPS from Baires Host to set up your FiveM server and it's your first time managing a server on your own, this guide is for you. It explains everything from scratch: how to access the VPS, how to transfer files (without a web FTP panel), what to download, the base folder structure, and how to start your server for the first time.

What you need to know before starting

Your VPS has no web file panel

Unlike a Game Server with a Pterodactyl panel, a VPS is a bare Linux (or Windows) server. There's no graphical panel to upload files. You'll manage everything through:

  • SSH — to run commands on the server (like a remote terminal)
  • SFTP — to transfer files between your PC and the VPS (like FTP but secure)

Don't worry, it's easier than it sounds.

What you received when you purchased

Baires Host sent you an email with:

  • Server IP (e.g., 23.175.40.60)
  • Username: root
  • Password: a temporary password
  • SSH Port: 22

You can also see this information at: billing.baires.hostServices → your VPS → Information.


PART 1: Access your VPS

Option A: SSH from Windows (recommended)

Open Windows Terminal or PowerShell and run:

bash
ssh root@YOUR_VPS_IP

Real example: ssh root@23.175.40.60

The first time it asks if you trust the host → type yes → enter the password.

If everything works, you'll see something like:

terminal
root@vps:~#

That means you're inside the server.

Option B: PuTTY (graphical alternative)

  1. Download PuTTY from putty.org
  2. Host Name: your IP
  3. Port: 22
  4. Click Open
  5. User: root, Password: the one you received

Option C: If your VPS is Windows

If you chose a Windows Server VPS:

  1. Open Remote Desktop Connection (search "mstsc" in Start)
  2. Enter your VPS IP
  3. Username: Administrator
  4. Password: the one you received

On Windows everything is graphical — it's like sitting in front of that PC.


PART 2: Transfer files (SFTP)

Since there's no web FTP panel, you use an SFTP program on your PC to upload and download files.

Download FileZilla (free)

  1. Go to filezilla-project.org and download the Client (not the Server)
  2. Install it normally

Connect FileZilla to your VPS

  1. Open FileZilla
  2. At the top, in the quick connect bar:
  • Host: sftp://YOUR_VPS_IP (important: sftp://, not ftp://)
  • User: root (or the user you created)
  • Password: your password
  • Port: 22
  1. Click Quickconnect

On the left you see your local files (your PC). On the right you see the server files. You can drag files from one side to the other.

Alternatives to FileZilla

  • WinSCP (Windows only, great for Linux servers)
  • Cyberduck (macOS and Windows)
  • Terminal: scp file.zip root@YOUR_IP:/home/fivem/

PART 3: Prepare the VPS for FiveM (Linux)

If your VPS is Linux (Ubuntu/Debian), follow these steps. If it's Windows, jump to Part 3B.

3.1 — Update the system

bash
apt update && apt upgrade -y

3.2 — Install dependencies

bash
apt install -y git xz-utils curl wget screen mariadb-server

Explanation:

  • git — to clone scripts/frameworks
  • xz-utils — to decompress FiveM artifacts
  • screen — to keep the server running when you close the terminal
  • mariadb-server — database (needed for ESX/QBCore)

3.3 — Create a dedicated user for FiveM

Never run the server as root. Create a user:

bash
adduser fivem
usermod -aG sudo fivem
su - fivem

Now you're working as the fivem user. Everything server-related will live in /home/fivem/.

3.4 — Download FiveM server artifacts

The "artifacts" are the FiveM server executable. Download them from the official site:

bash
mkdir -p ~/fxserver && cd ~/fxserver
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/LATEST_BUILD_URL -O latest_url.txt
wget $(cat latest_url.txt) -O fx.tar.xz
tar -xvf fx.tar.xz
rm fx.tar.xz latest_url.txt

This downloads and extracts the server binaries. Now in ~/fxserver/ you have the run.sh executable.

3.5 — Create the server data folder

bash
mkdir -p ~/fxserver/server-data/resources
cd ~/fxserver/server-data

This is the folder where all your server configuration, scripts and resources live.


PART 3B: Prepare the VPS for FiveM (Windows)

If your VPS is Windows Server:

3B.1 — Download the artifacts

  1. Open the browser on the VPS desktop
  2. Go to: https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
  3. Download the latest .zip file (the one with the highest number)
  4. Extract the ZIP to a folder, e.g.: C:\FXServer\server

3B.2 — Create data folder

  1. Create folder: C:\FXServer\server-data
  2. Inside create a resources folder

3B.3 — Open ports in Windows Firewall

Open PowerShell as Administrator and run:

powershell
netsh advfirewall firewall add rule name="FiveM TCP" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FiveM UDP" dir=in action=allow protocol=UDP localport=30120
netsh advfirewall firewall add rule name="txAdmin" dir=in action=allow protocol=TCP localport=40120

PART 4: Get your FiveM license

Every FiveM server needs a free license key:

  1. Go to keymaster.fivem.net
  2. Log in with your Cfx.re account (if you don't have one, create it at forum.cfx.re)
  3. Click Register a new server
  4. Fill in:
  • Display name: Your server name
  • Initial IP: Your VPS IP
  1. Copy the generated key (you'll need it in the next step)

PART 5: Create the base server.cfg file

This is the main configuration file. Create it in the server-data folder.

From SSH (Linux):

bash
cd ~/fxserver/server-data
nano server.cfg

Base server.cfg content:

bash
# ═══════════════════════════════════════════════
# BASE CONFIGURATION - My FiveM Server
# ═══════════════════════════════════════════════

# Network endpoints (udp BEFORE tcp)
endpoint_add_udp "0.0.0.0:30120"
endpoint_add_tcp "0.0.0.0:30120"

# License key (the one you copied from keymaster.fivem.net)
sv_licenseKey "PASTE-YOUR-KEY-HERE"

# Server name and description (shows in the FiveM server list)
sets sv_projectName "My RP Server"
sets sv_projectDesc "Roleplay server on Baires Host"
sv_hostname "My RP Server - Baires Host"

# Maximum player slots
sv_maxclients 32

# OneSync (improves sync, required for more than 32 players)
set onesync on

# Base server resources
ensure mapmanager
ensure spawnmanager
ensure sessionmanager
ensure chat
ensure hardcap
ensure baseevents

# Basic anti-cheat
sv_scriptHookAllowed 0

# Locale
sets locale "en-US"
sets tags "roleplay, english"

Save the file: in nano, press Ctrl+X, then Y, then Enter.

On Windows:

Create a server.cfg file in C:\FXServer\server-data\ with the same content using Notepad.


PART 6: Download the base resources

FiveM needs some basic resources to run. Download them from the official cfx-server-data repository:

Linux:

bash
cd ~/fxserver/server-data
git clone https://github.com/citizenfx/cfx-server-data.git temp-data
cp -r temp-data/resources/* resources/
rm -rf temp-data

Windows:

  1. Go to https://github.com/citizenfx/cfx-server-data
  2. Click CodeDownload ZIP
  3. Extract the contents of the resources folder from the ZIP into C:\FXServer\server-data\resources\

This gives you the base resources: mapmanager, spawnmanager, chat, hardcap, etc.


PART 7: First server start

Linux:

bash
cd ~/fxserver
screen -S fivem
bash run.sh +set serverProfile default +set txAdminPort 40120 +exec server.cfg

Explanation:

  • screen -S fivem — creates a persistent session (server keeps running if you close the terminal)
  • +exec server.cfg — tells the server to use your configuration
  • +set txAdminPort 40120 — admin panel port

You'll see that txAdmin starts and shows a PIN in the console.

Windows:

Open PowerShell in the server folder and run:

powershell
cd C:\FXServer\server
.\FXServer.exe +set serverProfile default +set txAdminPort 40120 +exec "C:\FXServer\server-data\server.cfg"

PART 8: Configure txAdmin (web panel)

txAdmin is the admin panel for your FiveM server. Access it from your browser.

  1. Open: http://YOUR_IP:40120
  2. Enter the PIN shown in the console
  3. Create your admin account (username + password)
  4. In the setup wizard:
  • Server Name: Your server name
  • Deploy Type: Choose Custom Server Data Path
  • Data Path: /home/fivem/fxserver/server-data (Linux) or C:\FXServer\server-data (Windows)
  • License Key: Paste your keymaster key

Once complete, txAdmin starts your server. From here you can:

  • View the live console
  • Restart the server
  • Manage players (kick/ban)
  • Upload resources

PART 9: Verify it works

Test connection

  1. From your PC (not the VPS), open the browser: http://YOUR_IP:30120/info.json
  • If you see a JSON → the server is online and accessible
  • If it doesn't load → firewall issue (check the ports)
  1. Open FiveM on your PC
  2. Press F8 to open the console
  3. Type: connect YOUR_IP:30120
  4. If you connect → your server is working

If you can't connect — Port checklist

Linux:

bash
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow 40120/tcp
sudo ufw reload

Windows: (we already opened them in step 3B.3, but verify)


PART 10: Folder structure explained

Here's how your server is organized:

terminal
/home/fivem/fxserver/          (or C:\FXServer\server\)
├── run.sh (Linux) or FXServer.exe (Windows)  ← Server executable
├── server-data/                              ← All your server lives here
│   ├── server.cfg                            ← Main configuration
│   ├── resources/                            ← Scripts, mods, everything
│   │   ├── [gamemodes]/                      ← Base gamemodes
│   │   ├── [managers]/                       ← Managers (spawn, map, etc.)
│   │   ├── chat/                             ← Base chat
│   │   └── ... (your RP scripts go here)
│   └── txData/                               ← txAdmin data (don't touch)

Where do I put new scripts/resources?

Each script you download (from GitHub, stores, etc.) goes as a folder inside resources/:

bash
resources/
├── [esx]/              ← ESX Framework (if using roleplay)
├── [standalone]/       ← Independent scripts
├── [vehicles]/         ← Custom vehicles
├── [maps]/             ← Maps and MLOs
├── my-custom-script/ Any script you download

After placing a new resource in the folder, you need to enable it in server.cfg:

bash
ensure resource-name

Or from the txAdmin console:

bash
refresh
ensure resource-name

PART 11: Install a Roleplay framework

To have a Roleplay server (jobs, economy, characters, inventory), you need a framework. The two most popular ones are:

FrameworkStyleLink
ESX LegacyClassic roleplay, easier to learngithub.com/esx-framework
QBCoreModern roleplay, more built-in featuresgithub.com/qbcore-framework

We recommend ESX Legacy if you're just starting because it has more documentation and is simpler to configure.

Check our dedicated guide: Install ESX Legacy for roleplay.


PART 12: Set up the database (MySQL/MariaDB)

Both ESX and QBCore need a database. If you installed MariaDB in step 3.2:

bash
sudo mysql_secure_installation

Answer the questions (set a MySQL root password, remove anonymous users, etc.).

Then create the database for FiveM:

bash
sudo mysql -u root -p

Inside MySQL:

sql
CREATE DATABASE fivem_db;
CREATE USER 'fivem'@'localhost' IDENTIFIED BY 'YourSecurePassword123';
GRANT ALL PRIVILEGES ON fivem_db.* TO 'fivem'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Then you need to install oxmysql (the DB connector for FiveM):

bash
cd ~/fxserver/server-data/resources/
git clone https://github.com/overextended/oxmysql.git

In server.cfg add:

bash
set mysql_connection_string "mysql://fivem:YourSecurePassword123@localhost/fivem_db"
ensure oxmysql

PART 13: Keep the server running (Linux)

With screen (already used)

To exit the terminal without stopping the server:

  • Press Ctrl+A then D (detach)

To return to the console:

bash
screen -r fivem

With systemd (recommended for production)

Create a service that starts FiveM automatically:

bash
sudo nano /etc/systemd/system/fivem.service

Content:

ini
[Unit]
Description=FiveM Server
After=network.target mariadb.service

[Service]
Type=simple
User=fivem
WorkingDirectory=/home/fivem/fxserver
ExecStart=/home/fivem/fxserver/run.sh +set serverProfile default +set txAdminPort 40120 +exec /home/fivem/fxserver/server-data/server.cfg
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable it:

bash
sudo systemctl daemon-reload
sudo systemctl enable fivem
sudo systemctl start fivem

Now the server starts automatically if the VPS reboots.


Summary: What you did

  1. Connected to the VPS via SSH
  2. Learned to transfer files with SFTP (FileZilla)
  3. Downloaded FiveM server artifacts
  4. Created the folder structure
  5. Got your Cfx.re license
  6. Created the base server.cfg
  7. Downloaded the official resources
  8. Started the server and configured txAdmin
  9. Verified the connection
  10. Know where to put new scripts

Next steps

  • Install an RP framework (ESX or QBCore) → see dedicated guide
  • Install vehicles, maps and scripts → upload via SFTP to resources/
  • Configure txAdmin (auto restarts, backups) → see txAdmin guide
  • Optimize performance → see optimization guide

Need help?

If you get stuck on any step, open a ticket on our Discord: https://discord.gg/fTQNWygTjc

Include:

  • Which step you're attempting
  • What error you're getting (copy the exact text)
  • Whether it's Linux or Windows

Our team responds in under 2 hours.


Was this guide helpful?