Deploying a multiplayer server for GTA V in Yandex Cloud
To enable multiplayer mode in Grand Theft Auto V
To deploy a GTA V multiplayer server in Yandex Cloud:
- Get your cloud ready.
- Create a security group.
- Create a VM for the GTA V server.
- Install the required utilities and packages.
- Start the GTA V server.
- Test the solution.
If you no longer need the resources you created, delete them.
Get your cloud ready
Sign up for Yandex Cloud and create a billing account:
- Navigate to the management console
and log in to Yandex Cloud or create a new account. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVEorTRIAL_ACTIVEstatus. If you do not have a billing account, create one and link a cloud to it.
If you have an active billing account, you can navigate to the cloud page
Learn more about clouds and folders here.
Required paid resources
The infrastructure support cost includes:
- Fee for continuously running VMs (see Yandex Compute Cloud pricing).
- Fee for using public IP addresses and outbound traffic (see Yandex Virtual Private Cloud pricing).
Create a security group
Create a security group with a rule that allows traffic to ports 22005 and 22006. These are the default ports in the GTA V server configuration file.
-
In the management console
, select your folder. -
From the list of services, select Virtual Private Cloud.
-
In the left-hand panel, select
Security groups. -
Click Create security group.
-
In the Name field, specify the name:
gta-v-sg. -
In the Network field, select
default. -
Under Rules, create the following traffic management rules:
Traffic
directionDescription Port range Protocol Source /
Destination nameCIDR blocks Ingress sessions-u22005AnyCIDR0.0.0.0/0Ingress server-http22006AnyCIDR0.0.0.0/0 -
Click Save.
Create a VM for the GTA V multiplayer server
-
Create an SSH key pair:
ssh-keygen -t ed25519We recommend sticking with the default key file name.
-
Create a VM with a public IP address:
Management console-
In the management console
, select the folder where you want to create your VM. -
In the list of services, select Compute Cloud.
-
In the left-hand panel, select
Virtual machines. -
Click Create virtual machine.
-
Select Advanced setup.
-
Under Boot disk image, in the Product search field, type
Ubuntu 22.04 LTSand select a public Ubuntu 22.04 LTS image. -
Under Location, select the availability zone where your VM will reside.
-
Under Disks and file storages, select the
HDDdisk type and set the20 GBsize. -
Under Computing resources, navigate to the
Customtab and specify the platform, number of vCPUs, and RAM size:- Platform:
Intel Ice Lake - vCPU:
2 - Guaranteed vCPU performance:
100% - RAM:
2 GB
- Platform:
-
Under Network settings:
- In the Subnet field, select the network and subnet to connect your VM to. If the required network or subnet is not there, create it.
- Under Public IP address, leave
Autoto assign a random external IP address from the Yandex Cloud pool to your VM. Alternatively, select a static address from the list if you reserved one. - In the Security groups field, select
gta-v-sg.
-
Under Access, select SSH key and specify the VM access credentials:
- In the Login field, enter a username, e.g.,
ubuntu. Do not userootor other names reserved for the OS purposes. To perform operations requiring root privileges, use thesudocommand. -
In the SSH key field, select the SSH key saved in your organization user profile.
If there are no SSH keys in your profile or you want to add a new key:
-
Click Add key.
-
Enter a name for the SSH key.
-
Select one of the following:
-
Enter manually: Paste the contents of the public SSH key. You need to create an SSH key pair on your own. -
Load from file: Upload the public part of the SSH key. You need to create an SSH key pair on your own. -
Generate key: Automatically create an SSH key pair.When adding a new SSH key, an archive containing the key pair will be created and downloaded. In Linux or macOS-based operating systems, unpack the archive to the
/home/<user_name>/.sshdirectory. In Windows, unpack the archive to theC:\Users\<user_name>/.sshdirectory. You do not need additionally enter the public key in the management console.
-
-
Click Add.
The system will add the SSH key to your organization user profile. If the organization has disabled the ability for users to add SSH keys to their profiles, the added public SSH key will only be saved in the user profile inside the newly created resource.
-
- In the Login field, enter a username, e.g.,
-
Under General information, specify the VM name:
gta-v-server. -
Click Create VM.
-
Install the required utilities and packages
-
Use SSH to connect to the VM you created.
-
Install the required
toolchainpackages from the Ubuntu-Toolchain repository,libstdc++6,libatomic1, and thescreenutility to run the terminal session in background mode:sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt update -y && sudo apt install libstdc++6 libatomic1 screen -
Download the server distribution to the current directory:
wget https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz -
Unpack the archive:
tar -xzf linux_x64.tar.gz -
Go to the directory with the server and make the
ragemp-serverfile executable:cd ragemp-srv chmod +x ragemp-server -
If you want, you can install the RAGE.MP Freeroam package. RAGE.MP Freeroam is a simple modification that gives multiplayer users access to all skins, weapons, and vehicles. Players can also restore health and defense. To install the package:
- Go to the directory with the installed server:
cd ~/ragemp-srv- Download the mod distribution from the GitHub developer page:
git clone https://github.com/n-n1ks/rage.mp-freeroam.git- Go to the
rage.mp-freeroamrepository directory and copy the required folders:
cd rage.mp-freeroam cp -r ./client_packages/* ../client_packages/ cp -r ./packages/* ../packages/
Start the GTA V server
-
Run the background screen session:
screen -
In the background session, run the server:
./ragemp-serverMake sure you get The server is ready to accept connections in the output:
[INFO] Starting RAGE Multiplayer server... [============================================================] || || MaxPlayers 100 || Sync rate 40ms || Name RAGE:MP Unofficial server || Gamemode freeroam || Streaming distance 300 || Announcement disabled || Voice chat disabled || Address 127.0.0.1:22005 || Connection limits disabled || Encryption enabled || NodeJS enabled || C# disabled || [============================================================] [INFO] Loading NodeJS packages... [INFO] Starting packages... [DONE] Server packages have been started. [DONE] Started resource transfer server at 22006 port. [DONE] Client-side packages weight: 0.000000 MB (uncompressed: 0.000000 MB). [INFO] Initializing networking... [DONE] Networking has been started: (IPv4-only) at 127.0.0.1:22005 [DONE] The server is ready to accept connections.
Test the solution
-
Download and install RageMP
on the computer with GTA 5:https://cdn.rage.mp/public/files/RAGEMultiplayer_Setup.exe -
Run Grand Theft Auto V via RageMP.
-
In the multiplayer window, click the direct server connection icon.
-
In the dialog box that opens, specify your VM’s public IP address and port
22005. -
Connect to the server by clicking Connect.
-
If you have configured RAGE.MP Freeroam, press F2 to reveal the additional options menu.
How to delete the resources you created
To stop paying for the resources you created: