BungeeCloud Forum
How To Install a FiveM[GTA 5] Server on Ubuntu - Printable Version

+- BungeeCloud Forum (https://forum.bungeecloud.org)
+-- Forum: English (https://forum.bungeecloud.org/forumdisplay.php?fid=13)
+--- Forum: Tutorials (https://forum.bungeecloud.org/forumdisplay.php?fid=24)
+---- Forum: vServer (https://forum.bungeecloud.org/forumdisplay.php?fid=28)
+---- Thread: How To Install a FiveM[GTA 5] Server on Ubuntu (/showthread.php?tid=90)



How To Install a FiveM[GTA 5] Server on Ubuntu - Sova - 19-03-2020

requirements:
Minimal:
1cpu
2GB memory


Quote:
Code:
sudo apt-get update
sudo apt-get upgrade





Open Ports :

Quote:
  • 30120  TCP & UDP30110  TCP & UDP

Installation:
First, create an empty folder and navigate to it. This folder will hold all your FiveM server files.
Quote:
Code:
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:

Quote:
Code:
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.

Quote:
Code:
git clone https://github.com/citizenfx/cfx-server-data ~/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:

Quote:
Code:
nano ~/fivem_resources/server.cfg

Populate it with the following content:

Quote:
Code:
# 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"

# 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 "https://url.to/image.png"
#sets banner_connecting "https://url.to/image.png"

# 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 (https://keymaster.fivem.net)
sv_licenseKey replaceThisWithYourLicenseKey

Starting the server:

Quote:
Code:
cd ~/fivem_resources && bash ~/fivem_server/run.sh +exec server.cfg

Running the server in background (optional):

Quote:
Code:
cd ~/fivem_resources && screen -s "FiveM server" bash ~/fivem_server/run.sh +exec server.cfg