Setting up FiveM on Windows (v2967+)
Learn how to Setup FiveM on your Windows Virtual Private Server.

1. Getting Started

To get started we will want to download the Prerequisites, Server Data as well as the Latest Artifacts version. To do so we will navigate to the links provided below:

2. Media Installation

1. Visual C++ Redistributable

  1. 1.
    Once downloaded, open it and agree to the Terms and Conditions.
  2. 2.
    Click install.
  3. 3.
    Restart your server.

2. FiveM Server Artifacts + FiveM Server Data

  1. 1.
    Create a new folder called fivemserver.
  2. 2.
    Extract the downloaded FiveM Server Artifacts to your fivemserver folder.
  3. 3.
    From the downloaded Server Data Folder, open the cfx-server-data-master directory
    and extract/copy its resources folder into your fivemserver folder.
  4. 4.
    Inside of your fivemserver folder, create a new file called server.cfg.
  5. 5.
    Copy the contents of the file located below into your server.cfg file and configure it as necessary.

Server.cfg File (Copy/Paste)

1
# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only.
2
endpoint_add_tcp "0.0.0.0:30120"
3
endpoint_add_udp "0.0.0.0:30120"
4
5
# These resources will start by default.
6
ensure mapmanager
7
ensure chat
8
ensure spawnmanager
9
ensure sessionmanager
10
ensure fivem
11
ensure hardcap
12
ensure rconlog
13
ensure scoreboard
14
15
# This allows players to use scripthook-based plugins such as the legacy Lambda Menu.
16
# Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won't be able to use external plugins.
17
sv_scriptHookAllowed 0
18
19
# Uncomment this and set a password to enable RCON. Make sure to change the password - it should look like rcon_password "YOURPASSWORD"
20
#rcon_password ""
21
22
# A comma-separated list of tags for your server.
23
# For example:
24
# - sets tags "drifting, cars, racing"
25
# Or:
26
# - sets tags "roleplay, military, tanks"
27
sets tags "default"
28
29
# A valid locale identifier for your server's primary language.
30
# For example "en-US", "fr-CA", "nl-NL", "de-DE", "en-GB", "pt-BR"
31
sets locale "root-AQ"
32
# please DO replace root-AQ on the line ABOVE with a real language! :)
33
34
# Set an optional server info and connecting banner image url.
35
# Size doesn't matter, any banner sized image will be fine.
36
#sets banner_detail "https://url.to/image.png"
37
#sets banner_connecting "https://url.to/image.png"
38
39
# Set your server's hostname
40
sv_hostname "sonoranservers.com"
41
42
# Nested configs!
43
#exec server_internal.cfg
44
45
# Loading a server icon (96x96 PNG file)
46
#load_server_icon myLogo.png
47
48
# convars which can be used in scripts
49
set temp_convar "hey world!"
50
51
# Uncomment this line if you do not want your server to be listed in the server browser.
52
# Do not edit it if you *do* want your server listed.
53
#sv_master1 ""
54
55
# Add system admins
56
add_ace group.admin command allow # allow all commands
57
add_ace group.admin command.quit deny # but don't allow quit
58
add_principal identifier.fivem:1 group.admin # add the admin to the group
59
60
# Hide player endpoints in external log output.
61
sv_endpointprivacy true
62
63
# enable OneSync with default configuration (required for server-side state awareness)
64
onesync_enabled true
65
66
# Server player slot limit (must be between 1 and 32, unless using OneSync)
67
sv_maxclients 32
68
69
# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey)
70
# -> replace "" with the key
71
set steam_webApiKey ""
72
73
# License key for your server (https://keymaster.fivem.net)
74
sv_licenseKey changeme
Copied!

3. Set Your License Key

All FiveM servers require a free license key to run.
  1. 1.
    Sign in to keymaster using a https://forum.cfx.re account.
2. Click register to register a new license key.
3. Fill in the following information using the public IP address you were sent after paying for your server.
4. You will be given a page with your license information. Hover over the blurred out key and copy it for the next step.
FiveM Keymaster - View Key
5. In your server.cfg file, the sv_licenseKey line will be set to changeme by default. Paste in your new server license key and press save.
FiveM Server Config - License Key

4. Open Ports

Open the port(s) defined at endpoint_add_tcp and endpoint_add_udp in your server.cfg file as by following this tutorial:

5. Start FXServer

  1. 1.
    Look for FXServer.exe located in your fivemserver folder and double click it.
    • Click Run.
  2. 2.
    Once the Command Prompt has finished loading open Google Chrome or Firefox and navigate to: http://localhost:40120/
Command Prompt Finished Loading

6. Configure txAdmin

  1. 1.
    Enter the PIN provided in the Command Prompt window labeled "PIN to add a master account" and click Link Account.
    • Login with your CitizenFX Forum Account
    • Click Yes, Allow if prompted.
  2. 2.
    Enter a backup password and click Save.
  3. 3.
    Click Next and configure txAdmin
    • Server Name: Enter your Server Name, this is seen only if setting up the Discord Integration with txAdmin.
    • Server Data Folder: Navigate to the location of where your server.cfg is located. (Root Directory/fivemserver) and copy that location, paste that location for "Server Data Folder"
    • Server CFG File: Navigate to the location of where your server.cfg is located. (Root Directory/fivemserver) and copy that location, paste that location for "Server Data Folder" and add /server.cfg at the end.
  4. 4.
    Click Save & Start Server.
txAdmin - FiveM Server Panel

Congratulations! You've set up your FiveM Server.

Last modified 6mo ago