This tutorial is a brief overview of how to setup a basic RedM server. I will go over simple instructions to get you going.
Overall, the setup process is very similar to Setting up a FiveM Server
Note: Once the RedM documentation exists, this post will be void, albeit still with valuable information
This post will be a wiki entry so anyone can add steps I may have forgotten. Don’t completely mess up the post though. Doing such “troll” actions are not permitted!
Requirements
- Windows or Linux (Ubuntu/Debian recommended)
- Highly Recommended - Git for correct installation
- Windows only - Visual C++ Redistributable 2019 or newer
You must know basic command prompt / terminal usage and Git. If you are unfamiliar with these, please follow some guides online. You must know how to create a folder, change folders, clone a Git repository and start a file.
Installation
The file paths we are going to use may be different, but make sure your file path does not contain spaces
BAD - C:\Users\John Smith\Desktop\MyRedMServer
GOOD - C:\Projects\MyRedMServer
Since the majority of beginner users will be setting up a server on their home PC, I will have more detailed instructions for Windows.
Windows
- Create a new base folder (e.g.
C:\MyRedMServer
) - Inside that folder, create two new folders
a.C:\MyRedMServer\server-files
, for server binaries
b.C:\MyRedMServer\server-data
, for your server resources/scripts - Navigate to the /artifacts/fivem/build_server_windows/master/ / FiveM Artifacts and download the Latest Recommended artifact.
- Open the downloaded server.zip file and extract the contents to your server binaries folder created in step 2a (e.g.
C:\MyRedMServer\server-files
) - Assuming you have Git installed, open up a command prompt window
a. PressWindows key + R
b. In the dialog that opened, typecmd
and press Enter - Navigate to your server-data folder
a.cd C:\MyRedMServer\server-data
- Clone the cfx-server-data repository
a.git clone https://github.com/citizenfx/cfx-server-data .
b. BEWARE Don’t forget the dot!!! - Open up Notepad or any other file editor (Notepad++, vscode)
a. Create a new file and copy+paste the example server.cfg that can be found at the end of this post.
b. Generate a license key on https://keymaster.fivem.net
c. Change thesv_licenseKey changeme
with your license key (e.g.sv_licenseKey myl1c3nsekey
)
d. Save the file asserver.cfg
in the server-data folder (e.g.C:\MyRedMServer\server-data
) - Don’t forget to set the file extension in the save prompt to ‘All Files’! - In the command prompt window from step 5, start your server
a. Type..\server-files\FXServer.exe +exec server.cfg +set gamename rdr3
b. Press Enter and your server will start
Should your server not start or you get an error like “Error authenticating your license key”, please reread the instructions. You missed a step or did it incorrectly.
Linux
Assuming you are SSHed into your machine or have otherwise access.
- Create a new base folder (e.g.
~/redm
) - Inside that folder, create two new folders
a.~/redm/server-files
, for server binaries
b.~/redm/server-data
, for your server resources/scripts - Navigate in your browser to /artifacts/fivem/build_proot_linux/master/ / FiveM Artifacts
a. Right click on the latest artifact
b. Click “Copy link location” or similar prompts - Navigate to the server-files folder
a.cd ~/redm/server-files
- Download the artifact using the link we copied in step 3.
a.wget <link_url>
- Extract the files using
tar
a.tar xf fx.tar.xz
- Navigate to your
server-data
folder and clone the cfx-server-data repository
a.cd ~/redm/server-data && git clone https://github.com/citizenfx/cfx-server-data .
- Create a server.cfg file and copy the example found at the end of this post
a.nano server.cfg
b. Copy + paste example server.cfg - Go to https://keymaster.fivem.net and generate a license key
- Enter the generated license key in your server.cfg by replacing the
changeme
value - Exit nano (Ctrl+X → Y → Enter)
- Start your server
a.bash ../server-files/run.sh +exec server.cfg +set gamename rdr3
If you are experiencing any issues, please reread the instructions carefully.
Notes
- If you are hosting this on your own PC, you can connect to it using
localhost
- Hosting outside of your home network will require you to open the following ports
a. Port 30120 UDP/TCP incoming & outgoing for server traffic
b. Port 30110 UDP outgoing for the server listing
c. Port 30130 UDP outgoing for cfx.re/join proxy links - If you wish your server not to be listed on the server list (assuming ports are setup correctly), add
sv_master ""
in your server.cfg
Example server.cfg
# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
ensure spawnmanager
ensure mapmanager
ensure basic-gamemode
# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"
# A valid locale identifier for your server's primary language.
# For example "en-US", "fr-CA", "nl-NL", "de-DE", "en-GB", "pt-BR"
sets locale "root-AQ"
# please DO replace root-AQ on the line ABOVE with a real language!
# Set your server's hostname
sv_hostname "FXServer, but unconfigured"
# Add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.fivem:1 group.admin # add the admin to the group
# Hide player endpoints in external log output.
sv_endpointprivacy true
# Server player slot limit (must be between 1 and 32, unless using OneSync)
sv_maxclients 32
# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey)
# -> replace "" with the key
set steam_webApiKey ""
# License key for your server (https://keymaster.fivem.net)
sv_licenseKey changeme
We have learned how to download server files, download default resources and setup a basic RedM server.
If you are still having issues, please read the #redm-info channel on the Cfx.re Discord