Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Install a FiveM[GTA 5] Server on Ubuntu
2GB memory

sudo apt-get update
sudo apt-get upgrade

Open Ports :

  • 30120  TCP & UDP30110  TCP & UDP

First, create an empty folder and navigate to it. This folder will hold all your FiveM server files.
mkdir ~/fivem_server
cd ~/fivem_server
Download the latest master branch build from the artifacts server. Copy the URL for the latest server version and use wget <url>
 to download it to the created folder. Once you've downloaded the build, extract it using the following command:

tar -xvf fx.tar.xz
Next clone the cfx-server-data repository to a new folder outside the server files folder. This folder will contain the server resources. The command below will clone the repository to a new folder called fivem_resources in your home directory.

git clone ~/fivem_resources
Generate a FiveM license key, which is completely free and used for server identification. Use your favourite text editor to make a new file called server.cfg in your  fivem_resources folder:

nano ~/fivem_resources/server.cfg

Populate it with the following content:

# 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"

# 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.steam:110000100000000 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

# License key for your server (
sv_licenseKey replaceThisWithYourLicenseKey

Starting the server:

cd ~/fivem_resources && bash ~/fivem_server/ +exec server.cfg

Running the server in background (optional):

cd ~/fivem_resources && screen -s "FiveM server" bash ~/fivem_server/ +exec server.cfg

Forum Jump:

Users browsing this thread: 1 Guest(s)