ℹ️
Installation steps assume a fresh install of Ubuntu 22.04. Steps may need tweaking if other OS or version is used. Steps assuming user logged in as root
Update and install dependencies
apt update && apt install -y curl wget jq npm nano git git-lfs
Create folder structure
mkdir -p /home/redm/server-files && mkdir -p /home/redm/server-data
Download and install latest artifacts
cd /home/redm/server-files && wget https://zedhosting.gg/downloads/cfx_install.sh && bash cfx_install.sh
Navigate to the server-files folder and install base cfx files
cd /home/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
cd /home/redm/server-data && nano server.cfg
Go to https://keymaster.fivem.net (opens in a new tab) 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)
Install PM2 and configure to start on boot
npm install -g pm2
cd /home/redm/server-files && wget https://zedhosting.gg/downloads/redm_start.sh && wget https://zedhosting.gg/downloads/run.sh
pm2 start redm_start.sh --name redm && pm2 startup && pm2 save
You can now monitor and restart RedM with pm2
pm2 logs redm
pm2 restart redm
pm2 monit
To update the server
cd /home/redm/server-files && wget https://zedhosting.gg/downloads/cfx_updater.sh
cd /home/redm/server-files && bash cfx_updater.sh
Base Config File
# 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 "events, guns, robberies"
# Or:
# - sets tags "roleplay, wildwest, outlaw"
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 "en-US"
# Set your server's hostname
sv_hostname "Zed Goes West || by ZedHosting.gg"
# 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) use 10 for dev servers
sv_maxclients 10
# 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