Setting up FiveM or RedM Server
Setting up FXServer on Windows
Prerequisites
- Win-rar / 7Zip / some other archive explorer that allows extraction of .7z archives.
- [Recommended] Enable file name extensions & hidden items in file explorer.
- Basic knowledge of how the Windows OS works.
Setting up
- Connect to your VPS
- Create a new folder on your desktop. Call it whatever you want, i’ll call it “FiveM Server”
- Create a folder inside that new folder you just made and call it “Artifacts”.
- Go to FiveM Artifacts Download and click the first one. This will download a .7z file.
- You’ll need to download a tool such as win-rar or 7zip in order to open this file. I’ll be using win-rar.
- Open the server.7z file you downloaded and extract all of the files to the “Artifacts” folder you made.
- Find the
FXServer.exefile and run it.- if you get prompted that windows protected your pc, click run anway. This is not a virus.
- This will open a txAdmin page in the browser. Click “Link Account” to login with your cfx account.
- After linking your CFX Account, follow the setup guide. Be sure to read each option thoroughly.
- When you get to the deployment type, click “Popular Recipes”. From here you’ll be able to select whether or not you want to install the base FiveM Server, ESX, QBCore, or RedM Server.
- You can change the data location if you want, but it’s recommended to leave it default.
- On the “Review Recipe” page, click Next. You’ll need to create a license key on the FiveM Keymaster. When choosing “Server Type”, set this to VPS. After entering all of the information, click “Run Recipe”
- If you chose something like QBCore or ESX, you’ll be prompted to enter database options. Here’s a guide on how to setup MariaDB & a database
- Done! You now have a FX Server setup and ready to go.
Setting up MariaDB on Windows for FXServer
-
Download and install the latest version of MariaDB Server
- If you are going to use HeidiSQL, it already includes MariaDB server in the install, so you can skip this step.
- When prompted for the root password, enter a secure password and save it somewhere. You’ll need this in order to connect to your database server.
-
Download a tool like HeidiSQL to manage your database.
- HeidiSQL includes MariaDB in the download.
-
Click “Open” to open a connection to the database server you just installed.
-
Enter the password you set when you installed MariaDB.
-
Right click on the left panel and click “Create New > Database”.
- Name it whatever you want, but make it something relevant.
-
Now, you can return to txAdmin and enter the information. If you’re setting it up without the txAdmin wizard, keep following this guide.
-
Now you’ll need to make sure you have a mysql-wrapper for FiveM installed. oxmysql is the most used and supported.
-
Configure your server.
- Open the
server.cfgfile and addstart oxmysqlbefore any of the resources that depend on it. - Set a MySQL Connection string via either of the following formats: (You don’t need both)
set mysql_connection_string "mysql://root:12345@localhost:3306/database_name"set mysql_connection_string "user=root;password=12345;host=localhost;port=3306;database=database_name"Replacing the information accordingly.
- Open the
-
You should now see “Database connection established” whenever oxmysql starts on the server.