- Home
- Guides
- Game Servers
- FiveM
- You bought a VPS for FiveM — Getting started from scratch
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.host → Services → your VPS → Information.
PART 1: Access your VPS
Option A: SSH from Windows (recommended)
Open Windows Terminal or PowerShell and run:
ssh root@YOUR_VPS_IPReal 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:
root@vps:~#That means you're inside the server.
Option B: PuTTY (graphical alternative)
- Download PuTTY from
putty.org - Host Name: your IP
- Port: 22
- Click Open
- User:
root, Password: the one you received
Option C: If your VPS is Windows
If you chose a Windows Server VPS:
- Open Remote Desktop Connection (search "mstsc" in Start)
- Enter your VPS IP
- Username:
Administrator - 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)
- Go to
filezilla-project.organd download the Client (not the Server) - Install it normally
Connect FileZilla to your VPS
- Open FileZilla
- At the top, in the quick connect bar:
- Host:
sftp://YOUR_VPS_IP(important:sftp://, notftp://) - User:
root(or the user you created) - Password: your password
- Port:
22
- 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
apt update && apt upgrade -y3.2 — Install dependencies
apt install -y git xz-utils curl wget screen mariadb-serverExplanation:
git— to clone scripts/frameworksxz-utils— to decompress FiveM artifactsscreen— to keep the server running when you close the terminalmariadb-server— database (needed for ESX/QBCore)
3.3 — Create a dedicated user for FiveM
Never run the server as root. Create a user:
adduser fivem
usermod -aG sudo fivem
su - fivemNow 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:
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.txtThis downloads and extracts the server binaries. Now in ~/fxserver/ you have the run.sh executable.
3.5 — Create the server data folder
mkdir -p ~/fxserver/server-data/resources
cd ~/fxserver/server-dataThis 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
- Open the browser on the VPS desktop
- Go to:
https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/ - Download the latest
.zipfile (the one with the highest number) - Extract the ZIP to a folder, e.g.:
C:\FXServer\server
3B.2 — Create data folder
- Create folder:
C:\FXServer\server-data - Inside create a
resourcesfolder
3B.3 — Open ports in Windows Firewall
Open PowerShell as Administrator and run:
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=40120PART 4: Get your FiveM license
Every FiveM server needs a free license key:
- Go to
keymaster.fivem.net - Log in with your Cfx.re account (if you don't have one, create it at
forum.cfx.re) - Click Register a new server
- Fill in:
- Display name: Your server name
- Initial IP: Your VPS IP
- 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):
cd ~/fxserver/server-data
nano server.cfgBase server.cfg content:
# ═══════════════════════════════════════════════
# 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:
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-dataWindows:
- Go to
https://github.com/citizenfx/cfx-server-data - Click Code → Download ZIP
- Extract the contents of the
resourcesfolder from the ZIP intoC:\FXServer\server-data\resources\
This gives you the base resources: mapmanager, spawnmanager, chat, hardcap, etc.
PART 7: First server start
Linux:
cd ~/fxserver
screen -S fivem
bash run.sh +set serverProfile default +set txAdminPort 40120 +exec server.cfgExplanation:
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:
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.
- Open:
http://YOUR_IP:40120 - Enter the PIN shown in the console
- Create your admin account (username + password)
- In the setup wizard:
- Server Name: Your server name
- Deploy Type: Choose Custom Server Data Path
- Data Path:
/home/fivem/fxserver/server-data(Linux) orC:\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
- 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)
- Open FiveM on your PC
- Press F8 to open the console
- Type:
connect YOUR_IP:30120 - If you connect → your server is working
If you can't connect — Port checklist
Linux:
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow 40120/tcp
sudo ufw reloadWindows: (we already opened them in step 3B.3, but verify)
PART 10: Folder structure explained
Here's how your server is organized:
/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/:
resources/
├── [esx]/ ← ESX Framework (if using roleplay)
├── [standalone]/ ← Independent scripts
├── [vehicles]/ ← Custom vehicles
├── [maps]/ ← Maps and MLOs
├── my-custom-script/ ← Any script you downloadAfter placing a new resource in the folder, you need to enable it in server.cfg:
ensure resource-nameOr from the txAdmin console:
refresh
ensure resource-namePART 11: Install a Roleplay framework
To have a Roleplay server (jobs, economy, characters, inventory), you need a framework. The two most popular ones are:
| Framework | Style | Link |
|---|---|---|
| ESX Legacy | Classic roleplay, easier to learn | github.com/esx-framework |
| QBCore | Modern roleplay, more built-in features | github.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:
sudo mysql_secure_installationAnswer the questions (set a MySQL root password, remove anonymous users, etc.).
Then create the database for FiveM:
sudo mysql -u root -pInside MySQL:
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):
cd ~/fxserver/server-data/resources/
git clone https://github.com/overextended/oxmysql.gitIn server.cfg add:
set mysql_connection_string "mysql://fivem:YourSecurePassword123@localhost/fivem_db"
ensure oxmysqlPART 13: Keep the server running (Linux)
With screen (already used)
To exit the terminal without stopping the server:
- Press
Ctrl+AthenD(detach)
To return to the console:
screen -r fivemWith systemd (recommended for production)
Create a service that starts FiveM automatically:
sudo nano /etc/systemd/system/fivem.serviceContent:
[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.targetEnable it:
sudo systemctl daemon-reload
sudo systemctl enable fivem
sudo systemctl start fivemNow the server starts automatically if the VPS reboots.
Summary: What you did
- Connected to the VPS via SSH
- Learned to transfer files with SFTP (FileZilla)
- Downloaded FiveM server artifacts
- Created the folder structure
- Got your Cfx.re license
- Created the base server.cfg
- Downloaded the official resources
- Started the server and configured txAdmin
- Verified the connection
- 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.