> ## Documentation Index
> Fetch the complete documentation index at: https://centrixnodes-mintlify-a7997d9e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FiveM Server Setup

> How to setup a FiveM server on a Linux VPS

## Step 1: Connect to Your Linux VPS

Connect to your VPS using an SSH tool like [PuTTY](https://putty.org/index.html).

When you open PuTTY, you'll see an interface like this:

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/linux/fivemserversetup/putty.jpg?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=32b72674baf8710abc8d373d766e1b29" alt="PuTTY interface" width="445" height="437" data-path="images/linux/fivemserversetup/putty.jpg" />

Enter two things on this screen: your Host Name (IP address), and the port (usually `22`).

After entering that information, you'll see a login screen:

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/linux/fivemserversetup/puttylogin.jpg?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=5f4a592f05a0d2e52db41f0e2e872190" alt="PuTTY login" width="646" height="415" data-path="images/linux/fivemserversetup/puttylogin.jpg" />

Enter the username from the email you received when you bought your VPS (usually `root`).

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/linux/fivemserversetup/puttypassword.jpg?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=87af7427a2aecf3ecb022f91209bee20" alt="PuTTY password" width="650" height="414" data-path="images/linux/fivemserversetup/puttypassword.jpg" />

On the next screen, enter the password from that same email.

## Step 2: Go to Your Home Directory

Paste or type this command to change to your home directory:

```bash theme={null}
cd /home
```

## Step 3: Create Your FiveM Directory

Create a `fivem` directory and change into it:

```bash theme={null}
mkdir fivem
cd fivem
```

## Step 4: Install Your FiveM Artifacts

Get your FiveM Linux artifacts from the [FiveM artifacts page](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/).

When you open that page, you'll see a site like this:

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/linux/fivemserversetup/fivemlinux.jpg?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=7c76fc8f4bfd894dcc4f6e6d320b0c91" alt="FiveM Linux Artifacts Website" width="1352" height="881" data-path="images/linux/fivemserversetup/fivemlinux.jpg" />

Right-click the artifact you want and select **Copy link address**.

Head back to your Linux VPS and run the following command (replace the link with your artifact link):

```bash theme={null}
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/23683-1062db8a7b8e0c03f7c159be4cbfa181f49b2cc1/fx.tar.xz
```

This downloads all the artifact files. Once the download is done, run:

```bash theme={null}
tar -xvf fx.tar.xz
```

This unzips the artifacts and installs them in the directory.

## Step 5: Start a tmux Session

To keep your server running after you close the PuTTY window, start a tmux session.
`tmux` is usually already installed, but if it isn't, run the following commands.

Debian/Ubuntu/Mint/Kali:

```bash theme={null}
sudo apt update && sudo apt install tmux -y
```

RHEL/CentOS/Rocky Linux/Alma Linux (RHEL 8+):

```bash theme={null}
sudo dnf install tmux -y
# For older CentOS/RHEL versions, you may need EPEL:
# sudo yum install epel-release -y && sudo yum install tmux
```

Verify your installation by typing:

```bash theme={null}
tmux -v
```

Then start your session by typing:

```bash theme={null}
tmux
```

## Step 6: Open Your FiveM Ports

You need to open your FiveM ports so you can set up txAdmin and join the server.
Run the following commands:

```bash theme={null}
ufw allow 30120/tcp
ufw allow 30120/udp
ufw allow 40120/tcp
```

## Step 7: Start Your Server

Run the following command to start your server:

```bash theme={null}
./run.sh
```

After starting your server, you'll see this screen:

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/linux/fivemserversetup/startfivemserver.jpg?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=ce3ac2579fae1acf31a1f7acab9e9ed2" alt="FiveM txAdmin screen on Linux VPS" width="634" height="390" data-path="images/linux/fivemserversetup/startfivemserver.jpg" />

Open the website shown on that screen, enter the PIN from the screenshot, and follow the next steps.

## Step 8: Configure Your Server Name

After accessing the txAdmin panel, you'll be prompted to set up your server configuration. Choose a short, memorable server name that will be used in the txAdmin interface and Chat/Discord messages (e.g., `tutorial`, `examplerp`, `dev`).

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image3.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=a4b9fbebd1820695b01e9f559d964271" alt="txAdmin Setup Page" width="1751" height="988" data-path="images/txAdmin/txAdminTutorial-image3.png" />

## Step 9: Choose Your Deployment Type

Next, you'll need to select how you want to set up your server. txAdmin offers several deployment options:

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image4.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=d103138108c55b4025db1785ae03a16c" alt="txAdmin Deployment Type Selection" width="1750" height="988" data-path="images/txAdmin/txAdminTutorial-image4.png" />

### Popular Recipes (Recommended)

This is the easiest option for beginners. Select a template from a curated list of community favorites. This includes QBCore, ESX, and a Default template for you to customize.

<Tip>
  Choose **Popular Recipes** if you're new to FiveM server setup or want a quick start with a pre-configured framework.
</Tip>

### Other Deployment Options:

* **Existing Server Data**: Select an existing server data folder on the host. Only use this if you already have a `server.cfg` and a `resources` folder.

* **Remote URL Template**: Based on a Recipe URL in the YAML format. You'll have the option to edit the Recipe before running it.

* **Custom Template**: Recommended if you have a custom recipe-based server or if you are writing your own recipe. You will be asked for the recipe right after this page.

<Note>
  For most users, **Popular Recipes** is the recommended choice as it provides tested and working server configurations.
</Note>

## Step 10: Review Recipe

After you select your deployment type, txAdmin shows the recipe configuration — the YAML used to set up your server.

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image5.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=0908f38cc367660f1406cf12e024f48b" alt="txAdmin Review Recipe" width="1750" height="988" data-path="images/txAdmin/txAdminTutorial-image5.png" />

The recipe includes:

* **Engine version** (e.g., `$engine: 3`)
* **Server name** and description
* **Tasks** that will be executed (downloading resources, configuring files, etc.)
* **Source repository** information (where resources will be downloaded from)

You can review the recipe and make any changes if needed. However, for most users, the default configuration works perfectly.

<Tip>
  Click **Next** to proceed with the default recipe. It's pre-configured to work out of the box.
</Tip>

## Step 11: Enter Server Registration Key

Now you need to enter your FiveM Server Registration Key (formerly known as License Key). This key is required to run a FiveM server.

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image6.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=db1b5597edef37b92215dfe32cac16d6" alt="Server Registration Key Input" width="1750" height="988" data-path="images/txAdmin/txAdminTutorial-image6.png" />

The key can be obtained from the [Cfx.re Portal](https://portal.cfx.re/). Enter your registration key in the field provided.

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image7.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=3833128c601a394e6a9fb066c0fc6a29" alt="Server Registration Key Field" width="1750" height="988" data-path="images/txAdmin/txAdminTutorial-image7.png" />

<Note>
  If you don't have a registration key yet, visit the Cfx.re Portal to create one. For more information, check the guide: [How to create a registration key](https://docs.fivem.net/docs/server-manual/setting-up-a-server/#license-key-registration).
</Note>

Once you've entered your key, click **Run Recipe** to proceed with the server setup.

## Step 12: Configure server.cfg

After the recipe runs, txAdmin opens the `server.cfg` file editor — your server's main configuration file, where you can customize various settings.

<img src="https://mintcdn.com/centrixnodes-mintlify-a7997d9e/HMypk6FIeo2dR4YT/images/txAdmin/txAdminTutorial-image8.png?fit=max&auto=format&n=HMypk6FIeo2dR4YT&q=85&s=156d9a2bded4f57bdd9ed06d96999c96" alt="Configure server.cfg" width="1751" height="988" data-path="images/txAdmin/txAdminTutorial-image8.png" />

<Check>
  **Congratulations!** If you've followed all the steps correctly, your FiveM server should now be up and running. You can access your txAdmin panel to manage your server, view players, and configure additional settings. Everything should be good to go!
</Check>
