Local Dev Server
This article will give your the basics of setting up a FiveM server that runs on your local computer. Developers will use these local servers to do the majority of their solo testing.
Folder Organization
Create a folder in a spot where you will store your server files. For example, name the folder
fivem
Inside this folder, create another folder called "artifacts".
fivem>artifacts
Also Inside this folder, create another folder "resources"
fivem>resources
Inside the "resources" folder is where all the repositories will go, each folder must be named with brackets around it, so for example.
[scripts] [maps] [vehicles]
, etc The brackets tell fivem this folder is not a resource, but contains other resources.Examples Base Folder Setup:
Example Resource Folder Setup
FiveM Artifacts
Download the latest Fivem Artifacts, release or beta really dosent matter. We use this tool to help decide on artifact versions.
Place the downloaded contents of the ZIP file.
fivem>artifacts
Downloading the Repositories
If don't have one already, create a Gitlab Account - this is different that GitHub.
Download GitHub Desktop, you can alternatively use Git, most users will not need both.
Create a Gitlab Personal Access Token, with name you choose, no expiration date and you must check API. Keep this token safe for later.
In GitLab, go to the repository you want to download, click the blue Code button, and then copy the Clone via HTTPS URL.
Open Gitlab Desktop and go to File > Clone Repository, a dialog will open that looks like below
Select URL
Under the Repository URL, paste in the URL you copied earlier.
Local path should be the specific folder for that repo you set up earlier.
[scripts] [civvehicles] [maps]
, etc. Nothing should be after the folder name in the path.
Choose Clone to start the clone process
If authentication dialog pops up, it your GitLab username and your Gitlab Personal Access Token created earlier.
Once authenticated, it will begin to download the repo to your computer.
Repeat these steps for any repo that you have access to.
For more information on Git and how we use branches, please see Git Procedures
Setting up your Database (Software Developers Only)
Once installed and services are running, create a new database, "mwrpdev" or something, just take note of the database name to change the server.cfg.
Starting your local server
Software Developers will be provided (pinned in a discord channel) a server.cfg. place this server config inside your "fivem" base folder.
fivem>server.cfg
Inside the cfg file, look for areas where you need to input your specific information, your discord ID, your database name, etc.
To start the server installation process, open the fivem>artifacts folder and double click the fxserver.exe
This will generate a few things and will begin the txAdmin install process. Follow the prompts, here is some key information to look for:
When "Select how you want to setup your server" is shown, choose "Existing Server Data"
When it asks for the folder that contains the server.cfg, you will need to copy the full folder path for your
fivem
folder. Example:C:\Users\USER\Desktop\fivem
It should auto detect your server.cfg file if you did the above correctly.
Thats It, your server should start and all resources should load if you did the steps correctly.
Last updated