Creating a FiveM server on Windows Server 2019

Visual C++ 2019: Download

Notepad ++: Download
7zip: Download

Related Articles
Setting up automatic restarts on txadmin

Getting started
Creating a new directory for your FiveM server
Downloading the latest FiveM artifacts - FiveM Artifacts Download
Downloading FiveM cfx-server-data - cfx-server-data Download
Getting your FiveM server key FiveM keymaster

Extracting the files & Creating a server config
Extract the artifacts that you've downloaded into the directory that you created earlier
Extract the cfx-server-data into your server directory
Creating your server.cfg
Go into your main server directory where FXserver.exe Is located
Locate the view tab at the top of file explorer & select View and make sure FIle name extensions is checked.
Create the server.cfg by right clicking in your explorer and selecting New & Text document. Make sure it's called server.cfg and not server.cfg.txt
Once your server.cfg is created you can open it and paste the default FiveM server.cfg configuration listed below
# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only.
endpoint_add_tcp ""
endpoint_add_udp ""

# These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure scoreboard

# This allows players to use scripthook-based plugins such as the legacy Lambda Menu.
# Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won't be able to use external plugins.
sv_scriptHookAllowed 0

# Uncomment this and set a password to enable RCON. Make sure to change the password - it should look like rcon_password "YOURPASSWORD"
#rcon_password ""

# 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 an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail ""
#sets banner_connecting ""

# Set your server's hostname
sv_hostname "FXServer, but unconfigured"

# Nested configs!
#exec server_internal.cfg

# Loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars which can be used in scripts
set temp_convar "hey world!"

# Uncomment this line if you do not want your server to be listed in the server browser.
# Do not edit it if you *do* want your server listed.
#sv_master1 ""

# 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

# enable OneSync with default configuration (required for server-side state awareness)
onesync_enabled 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 (
# -> replace "" with the key
set steam_webApiKey ""

# License key for your server (
sv_licenseKey changeme

Don't close your server.cfg yet, You need to change the changeme line of your sv_licenseKey replace it with your fivem key from FiveM Keymaster

Configuring your firewall
Open your Windows Defender Firewall with Advanced Security
Create a new rule under port
Select TCP port & Under Specific remote ports add 30120
On the Action tab select "Allow the connection"
Name the rule "FiveM"
Allowing FXServer.exe through the firewall
Open Control Panel
Search "Windows Defender Firewall"
When you're on the page select "Allow an app or feature through Windows Defender Firewall"
Select "Allow another app..."

Once there select Browser and look for your FiveM server directory and select "Fxserver.exe"

Once you've selected FXServer.exe click ADD

Setting up Txadmin
To start your FiveM server you must go to your server directory and run fxserver.exe
FXServer.exe should open a console IF YOU CLOSE THIS YOUR FIVEM SERVER WILL STOP
Once FXServer.exe is started open your browser of choice and type localhost:40120 into your search bar. If you did it correctly you will be redirected to this page. The pin is located in the console of fxserver.exe
Once you've entered your pin you will be redirected to the fivem forums page where you need to enter your account information or create a new account, This is so that your txadmin will be linked with your FiveM account
Create a txadmin password
Setting your server directory & server.cfg , you can find your server directory by clicking the blank part at the top of your server directory. For the config you could paste the exact same thing but add /server.cfg, Example: C:\Server\server.cfg

You're done! You can now access txadmin and start your server from there
If you restart your windows server you must run txadmin.exe to start your server
Was this article helpful?
Thank you!