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:
- Prepare your cloud.
- 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.
Prepare your cloud
Sign up for Yandex Cloud and create a billing account:
- Go to the management console
and log in to Yandex Cloud or create an account if you do not have one yet. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one.
If you have an active billing account, you can go to the cloud page
Learn more about clouds and folders.
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 outgoing 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. -
In 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 Incoming sessions-u
22005
Any
CIDR
0.0.0.0/0
-
Click Save.
Create a VM for the GTA V multiplayer server
-
Create an SSH key pair:
ssh-keygen -t ed25519
We recommend leaving the key file name unchanged.
-
Create a VM with a public IP address:
Management console-
In the management console
, select the folder to create your VM in. -
In the list of services, select Compute Cloud.
-
In the left-hand panel, select
Virtual machines. -
Click Create virtual machine.
-
Under Boot disk image, select Ubuntu 22.04 image.
-
Under Location, select an availability zone to place your VM in.
-
Configure the boot disk under Disks and file storages:
- Type:
HDD
. - Size:
20 GB
.
- Type:
-
Under Computing resources, navigate to the Custom tab and specify:
- Platform:
Intel Ice Lake
. - vCPU:
2
. - Guaranteed vCPU performance:
100%
. - RAM:
2 GB
.
- Platform:
-
Under Network settings:
-
In the Subnet field, specify the subnet ID in the availability zone of the VM you are creating or select a cloud network from the list.
-
Each network must have at least one subnet. If there is no subnet, create one by selecting Create subnet.
-
If you do not have a network, click Create network to create one:
- In the window that opens, specify the network name and select the folder to create it in.
- (Optional) Select the Create subnets option to automatically create subnets in all availability zones.
- Click Create network.
-
-
In the Public IP field, select
Auto
to assign the VM a random external IP address from the Yandex Cloud pool or select a static address from the list if you reserved one in advance. -
In the Security groups field, select the
gta-v-sg
security group you created earlier.
-
-
Under Access, specify the information required to access the VM:
-
In the Login field, enter the name of the user to create on the VM, e.g.,
ubuntu
.Alert
Do not use
root
or other usernames reserved by the operating system. To perform operations requiring superuser permissions, use thesudo
command. -
In the SSH key field, select the SSH key saved in your organization user profile.
If there are no saved SSH keys in your profile, or you want to add a new key:
- Click Add key.
- Enter a name for the SSH key.
- Upload or paste the contents of the public key file. You need to create](../../../compute/operations/vm-connect/ssh.md#creating-ssh-keys) a key pair for the SSH connection to a VM yourself.
- Click Add.
The SSH key will be added to your organization user profile.
If users cannot add SSH keys to their profiles in the organization, the added public SSH key will only be saved to the user profile of the VM being created.
-
-
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 created VM.
-
Install the required
toolchain
packages from the Ubuntu-Toolchain repository,libstdc++6
,libatomic1
, and thescreen
utility 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-server
file 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-freeroam
repository 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-server
Make 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: