|
| 1 | +--- |
| 2 | +title: "FiveM Server Setup" |
| 3 | +description: "How to setup a FiveM server on a Linux VPS" |
| 4 | +icon: "server" |
| 5 | +--- |
| 6 | + |
| 7 | +## Step 1: Connect to your Linux VPS |
| 8 | + |
| 9 | +You can connect to your vps by using an SSH tool like putty which can be found [here](https://putty.org/index.html) |
| 10 | + |
| 11 | +When you open putty you will be greeted with an interface like this |
| 12 | + |
| 13 | +<img |
| 14 | + src="/images/linux/fivemserversetup/putty.jpg" |
| 15 | + alt="Putty interface" |
| 16 | +/> |
| 17 | + |
| 18 | +After reaching this screen you will put in two things. The first one will be your Host Name (IP Address) and the second thing will be the port (Always 22 in most cases). |
| 19 | + |
| 20 | +After putting that information in you will be greeted with a screen that looks like this |
| 21 | + |
| 22 | +<img |
| 23 | +src="/images/linux/fivemserversetup/puttylogin.jpg" |
| 24 | +alt="Putty login" |
| 25 | +/> |
| 26 | +Put in the username you got in your email when you bought your VPS. (Most times its root) |
| 27 | + |
| 28 | +<img |
| 29 | + src="/images/linux/fivemserversetup/puttypassword.jpg" |
| 30 | + alt="Putty Password" |
| 31 | +/> |
| 32 | + |
| 33 | +You will then reach the page above put in your password that you get in the same email you got when you bought your vps. |
| 34 | + |
| 35 | + |
| 36 | +## Step 2: Go to your home directory |
| 37 | + |
| 38 | +You can go to your home directory by pasting or typing this command in. |
| 39 | + |
| 40 | +```bash |
| 41 | +cd /home |
| 42 | +``` |
| 43 | + |
| 44 | +## Step 3: Make your FiveM Directory |
| 45 | + |
| 46 | +Make your five directory and go into it. |
| 47 | + |
| 48 | +```bash |
| 49 | +mkdir fivem |
| 50 | +cd fivem |
| 51 | +``` |
| 52 | + |
| 53 | +## Step 4: Install your FiveM artifacts in your directory. |
| 54 | + |
| 55 | +You can get your FiveM Linux Artifacts [here](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/) |
| 56 | + |
| 57 | +When you get to that website you will be greeted with a site that looks like this. |
| 58 | + |
| 59 | +<img |
| 60 | + src="/images/linux/fivemserversetup/fivemlinux.jpg" |
| 61 | + alt="FiveM Linux Artifacts Website" |
| 62 | +/> |
| 63 | + |
| 64 | +Right click on the artifacts you want and hit copy link address. |
| 65 | + |
| 66 | +Head back to your Linux VPS and run the following commands (replace the link with your artifacts link) |
| 67 | + |
| 68 | +```bash |
| 69 | +wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/23683-1062db8a7b8e0c03f7c159be4cbfa181f49b2cc1/fx.tar.xz |
| 70 | +``` |
| 71 | +It will download all the files for the artifacts. After that is done you will run the following command |
| 72 | + |
| 73 | +```bash |
| 74 | +tar -xvf fx.tar.xz |
| 75 | +``` |
| 76 | +It will then unzip the artifacts and install them in the directory. |
| 77 | + |
| 78 | + |
| 79 | +## Step 5: tmux your session |
| 80 | + |
| 81 | +In order to ensure your server stays up after leaving the putty window you must enter a tmux session. |
| 82 | +90% of the time tmux is installed but in case its not run the following commands |
| 83 | + |
| 84 | +Debian/Ubuntu/Mint/Kali: |
| 85 | +```bash |
| 86 | +sudo apt update && sudo apt install tmux -y |
| 87 | +``` |
| 88 | + |
| 89 | +RHEL/CentOS/Rocky Linux/Alma Linux (RHEL 8+): |
| 90 | +```bash |
| 91 | +sudo dnf install tmux -y |
| 92 | +# For older CentOS/RHEL versions, you may need EPEL: |
| 93 | +# sudo yum install epel-release -y && sudo yum install tmux |
| 94 | +``` |
| 95 | +Verify your installation by typing |
| 96 | +```bash |
| 97 | +tmux -v |
| 98 | +``` |
| 99 | +Then enter your session by typing |
| 100 | +```bash |
| 101 | +tmux |
| 102 | +``` |
| 103 | + |
| 104 | +## Step 6: Open your fivem ports |
| 105 | + |
| 106 | +You will need to port forward your fivem ports in order to use & setup txadmin and join the server. |
| 107 | +Do this by running the following commands |
| 108 | + |
| 109 | +```bash |
| 110 | +ufw allow 30120/tcp |
| 111 | +ufw allow 30120/udp |
| 112 | +ufw allow 40120/tcp |
| 113 | +``` |
| 114 | + |
| 115 | +## Step 7: Start your server |
| 116 | + |
| 117 | +Run the following command to start your server |
| 118 | + |
| 119 | +```bash |
| 120 | +./run.sh |
| 121 | +``` |
| 122 | + |
| 123 | +You will be greeted by this screen after starting your server. |
| 124 | + |
| 125 | +<img |
| 126 | + src="/images/linux/fivemserversetup/startfivemserver.jpg" |
| 127 | + alt="FiveM txadmin screen on linux vps" |
| 128 | +/> |
| 129 | + |
| 130 | +Head to that website you see on that screen put in the pin from the screenshot and follow the next steps. |
| 131 | + |
| 132 | +## Step 8: Configure Your Server Name |
| 133 | + |
| 134 | +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`). |
| 135 | + |
| 136 | +<img |
| 137 | + src="/images/txAdmin/txAdminTutorial-image3.png" |
| 138 | + alt="txAdmin Setup Page" |
| 139 | +/> |
| 140 | + |
| 141 | +## Step 9: Choose Your Deployment Type |
| 142 | + |
| 143 | +Next, you'll need to select how you want to set up your server. txAdmin offers several deployment options: |
| 144 | + |
| 145 | +<img |
| 146 | + src="/images/txAdmin/txAdminTutorial-image4.png" |
| 147 | + alt="txAdmin Deployment Type Selection" |
| 148 | +/> |
| 149 | + |
| 150 | +### Popular Recipes (Recommended) |
| 151 | + |
| 152 | +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. |
| 153 | + |
| 154 | +<Tip> |
| 155 | + Choose **Popular Recipes** if you're new to FiveM server setup or want a quick start with a pre-configured framework. |
| 156 | +</Tip> |
| 157 | + |
| 158 | +### Other Deployment Options: |
| 159 | + |
| 160 | +- **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. |
| 161 | + |
| 162 | +- **Remote URL Template**: Based on a Recipe URL in the YAML format. You'll have the option to edit the Recipe before running it. |
| 163 | + |
| 164 | +- **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. |
| 165 | + |
| 166 | +<Note> |
| 167 | + For most users, **Popular Recipes** is the recommended choice as it provides tested and working server configurations. |
| 168 | +</Note> |
| 169 | + |
| 170 | +## Step 10: Review Recipe |
| 171 | + |
| 172 | +After selecting your deployment type, you'll be presented with the recipe configuration. This shows you the YAML configuration that will be used to set up your server. |
| 173 | + |
| 174 | +<img |
| 175 | + src="/images/txAdmin/txAdminTutorial-image5.png" |
| 176 | + alt="txAdmin Review Recipe" |
| 177 | +/> |
| 178 | + |
| 179 | +The recipe includes: |
| 180 | +- **Engine version** (e.g., `$engine: 3`) |
| 181 | +- **Server name** and description |
| 182 | +- **Tasks** that will be executed (downloading resources, configuring files, etc.) |
| 183 | +- **Source repository** information (where resources will be downloaded from) |
| 184 | + |
| 185 | +You can review the recipe and make any changes if needed. However, for most users, the default configuration works perfectly. |
| 186 | + |
| 187 | +<Tip> |
| 188 | + Simply click **Next** to proceed with the default recipe configuration. The recipe is pre-configured to work out of the box. |
| 189 | +</Tip> |
| 190 | + |
| 191 | +## Step 11: Enter Server Registration Key |
| 192 | + |
| 193 | +Now you need to enter your FiveM Server Registration Key (formerly known as License Key). This key is required to run a FiveM server. |
| 194 | + |
| 195 | +<img |
| 196 | + src="/images/txAdmin/txAdminTutorial-image6.png" |
| 197 | + alt="Server Registration Key Input" |
| 198 | +/> |
| 199 | + |
| 200 | +The key can be obtained from the [Cfx.re Portal](https://portal.cfx.re/). Enter your registration key in the field provided. |
| 201 | + |
| 202 | +<img |
| 203 | + src="/images/txAdmin/txAdminTutorial-image7.png" |
| 204 | + alt="Server Registration Key Field" |
| 205 | +/> |
| 206 | + |
| 207 | +<Note> |
| 208 | + 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). |
| 209 | +</Note> |
| 210 | + |
| 211 | +Once you've entered your key, click **Run Recipe** to proceed with the server setup. |
| 212 | + |
| 213 | +## Step 12: Configure server.cfg |
| 214 | + |
| 215 | +After the recipe runs, you'll be presented with the `server.cfg` file editor. This is your server's main configuration file where you can customize various settings. |
| 216 | + |
| 217 | +<img |
| 218 | + src="/images/txAdmin/txAdminTutorial-image8.png" |
| 219 | + alt="Configure server.cfg" |
| 220 | +/> |
| 221 | + |
| 222 | +<Check> |
| 223 | + **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! |
| 224 | +</Check> |
0 commit comments