Deploying a Minecraft server in Yandex Cloud
Follow this tutorial to deploy the current version of a Minecraft
To deploy a Minecraft server in Yandex Cloud:
- Get your cloud ready.
- Create a security group.
- Create a VM for the Minecraft server.
- Install the utilities and start the server.
- Test the server.
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 create or select a folder for your infrastructure on the cloud page
Learn more about clouds and folders here.
Required paid resources
The infrastructure support cost includes:
- Fee for a continuously running VM (see Yandex Compute Cloud pricing).
- Fee for a public IP address and outgoing traffic (see Yandex Virtual Private Cloud pricing).
Create a security group
Create a security group with a rule allowing incoming traffic on port 25565 for Java Edition or 19132 for Bedrock Edition. These are the default ports for client access in the Minecraft server configuration file. Also, rules allowing SSH access to the VM to configure the server and VM access to the internet to download software will be added to the security group.
-
In the management console
, select your folder. -
Navigate to Virtual Private Cloud.
-
In the left-hand panel, select
Security groups. -
Click Create security group.
-
In the Name field, specify the name:
minecraft-sg. -
In the Network field, select
default. -
Under Rules, create the following traffic management rules:
Traffic
directionDescription
Port range
Protocol
Source /
Destination nameIPv4 CIDR
Inbound
Client access to the Minecraft server25565/19132AnyAddress range0.0.0.0/0Inbound
SSH access to the VM22AnyAddress range0.0.0.0/0Outbound
VM internet access0-65535AnyAddress range0.0.0.0/0 -
Click Save.
Create a VM for the Minecraft 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. -
Navigate to Compute Cloud.
-
In the left-hand panel, select
Virtual machines. -
Click Create virtual machine.
-
Under Boot disk image, select Ubuntu 24.04 LTS.
-
Under Location, select an availability zone where your VM will reside.
-
Under Disks and file storages, configure the boot disk:
- Type:
HDD. - Size:
18 GB.
- Type:
-
Under Computing resources, navigate to the Custom tab and specify the Minecraft server recommended parameters:
- Platform:
Intel Ice Lake - vCPU:
2 - Guaranteed vCPU performance:
100%. - RAM:
2 GBfor Java Edition or4 GBfor Bedrock Edition.
- Platform:
-
Under Network settings:
-
In the Subnet field, enter the ID of a subnet in the new VM’s availability zone. Alternatively, 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 there are no networks in the list, click Create network to create one:
- In the window that opens, specify the network name and select the folder where it will be created.
- Optionally, enable the Create subnets setting to automatically create subnets in all availability zones.
- Click Create network.
-
-
In the Public IP address field, select
Autoto assign the VM a random external IP address from the Yandex Cloud pool. Alternatively, select a static address from the list if you reserved one. -
In the Security groups field, select the
minecraft-sgsecurity group you created earlier.
-
-
Under Access, select SSH key and specify the VM access credentials:
-
In the Login field, enter a name for the user you want to create on the VM, e.g.,
ubuntu.Alert
Do not use
rootor other OS-reserved usernames. For 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.
-
-
-
Under General information, specify the VM name:
minecraft-server. -
Click Create VM.
Recommended virtual machine configuration for Java Edition:
Configuration Number of players vCPU RAM Disk size Minimum 1-4 2 1GB 150MB HDD or more Recommended 5-10 2 2GB 200MB HDD or more Ideal 10+ 4 4GB 200MB SSD or more Warning
Note that this configuration table is in line with the default settings defined in
server.properties. The bigger the game world grows, the higher the requirements, especially for RAM. In addition, larger rendered areas, villages, and other dynamic objects will result in higher virtual server requirements. -
Install the utilities and start the server
-
Use SSH to connect to the VM you created.
-
Install the required Java packages from the repository and the
screenutility to run the terminal session in background mode:Note
The command below installs JRE version
25. To start the current Minecraft server version, you may need a newer JRE version. Therefore, check the suitable JRE version on Minecraft Wiki before you install this package.sudo apt update -y \ && sudo apt install -y openjdk-25-jre-headless screen -
Create a separate system user named
minecraftto start the server:sudo useradd -r -m -d /opt/minecraft-server -s /bin/bash minecraftWhere:
-r: Creating a system user.-m -d /opt/minecraft-server: Creating the user’s home directory at/opt/minecraft-server. It will contain the server files.-s /bin/bash: Assigning thebashshell for the user.
-
Follow this link
and copy the URL to download the distribution of the current server version. -
Download the current distribution to the server directory using
wget:sudo wget -O /opt/minecraft-server/minecraft_server.jar <download_link>Where
<download_link>is the distribution download link you got in the previous step. Here is an example:https://piston-data.mojang.com/v1/objects/97ccd4c0ed3f81bbb7bfacddd1090b0c56f9bc51/server.jar -
Create the
eula.txtfile to automatically accept the EULA terms:echo "eula=true" | sudo tee /opt/minecraft-server/eula.txt -
Grant the
minecraftuser the following permissions for the server directory and all its contents:sudo chown -R minecraft:minecraft /opt/minecraft-server -
In the server directory, run the
screenbackground session on behalf of theminecraftuser:sudo -u minecraft bash -c 'cd /opt/minecraft-server && screen -S minecraft' -
In the background session, run the server:
java -Xms1024M -Xmx1024M -jar minecraft_server.jar noguiWait for the game world to be created.
[14:16:47] [Server thread/INFO]: Preparing level "world" [14:16:48] [Server thread/INFO]: Selecting global world spawn... [14:17:05] [Server thread/INFO]: Loading 0 persistent chunks... ... [14:17:05] [Server thread/INFO]: Preparing spawn area: 100% [14:17:05] [Server thread/INFO]: Time elapsed: 17317 ms [14:17:05] [Server thread/INFO]: Done (17.788s)! For help, type "help" -
Optionally, you can leave the
screensession running in the background by pressing Ctrl + A + D and return to the VM main terminal.If there is only one such background session with the server running and you want to return to it, run the following command:
sudo -u minecraft screen -rIf there are multiple background sessions, get their list by running the following command:
sudo -u minecraft screen -listResult:
There is a screen on: 35154.minecraft (06/12/26 14:15:56) (Detached) 1 Socket in /run/screen/S-minecraft.Then, enter the session using its ID from the list:
sudo -u minecraft screen -r 35154Note
The
minecraftuser does not have a password or SSH key, so you cannot connect to the VM directly on their behalf. To perform operations under this user, connect to the VM over SSH with your credentials and switch tominecraftusing the following command:sudo -iu minecraftThis will start a login session, and
/opt/minecraft-serverwill instantly become the current directory. To return to your session, run theexitcommand or press Ctrl + D. -
After running the server, in the directory, you will see new directories and the files required for server operation and configuration, including the logs:
4096 Jun 12 14:16 . 4096 Jun 12 14:07 .. 220 Mar 31 2024 .bash_logout 3771 Mar 31 2024 .bashrc 4096 Jun 12 14:16 .cache 807 Mar 31 2024 .profile 2 Jun 12 14:16 banned-ips.json 2 Jun 12 14:16 banned-players.json 10 Jun 12 14:10 eula.txt 4096 Jun 12 14:16 libraries 4096 Jun 12 14:16 logs 60417480 Apr 9 10:20 minecraft_server.jar 2 Jun 12 14:16 ops.json 1676 Jun 12 14:16 server.properties 2 Jun 12 14:16 usercache.json 4096 Jun 12 14:16 versions 2 Jun 12 14:16 whitelist.json 4096 Jun 12 14:18 world
-
Use SSH to connect to the VM you created.
-
Install the
screenutility to run the terminal session in background mode and theunziputility to unpack the distribution:sudo apt update -y \ && sudo apt install -y screen unzip -
Create a separate system user named
minecraftto start the server:sudo useradd -r -m -d /opt/minecraft-server -s /bin/bash minecraftWhere:
-r: Creating a system user.-m -d /opt/minecraft-server: Creating the user’s home directory at/opt/minecraft-server. It will contain the server files.-s /bin/bash: Assigning thebashshell for the user.
-
Follow this link
and copy the URL to download the distribution of the current server version. -
Download the current distribution to the server directory using
wget:sudo wget -O /opt/minecraft-server/bedrock-server.zip <download_link>Where
<download_link>is the distribution download link you got in the previous step. Here is an example:https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.26.23.1.zip -
Unpack the distribution archive to the server directory, then delete the archive:
sudo unzip /opt/minecraft-server/bedrock-server.zip -d /opt/minecraft-server \ && sudo rm /opt/minecraft-server/bedrock-server.zip -
Grant the
minecraftuser the following permissions for the unpacked files:sudo chown -R minecraft:minecraft /opt/minecraft-server -
In the server directory, run the
screenbackground session on behalf of theminecraftuser:sudo -u minecraft bash -c 'cd /opt/minecraft-server && screen -S minecraft' -
In the background session, run the server. The Bedrock Edition server requires libraries from the server directory, so make sure to specify it in the
LD_LIBRARY_PATHvariable:LD_LIBRARY_PATH=. ./bedrock_serverWait until you see the message confirming that the server is ready:
[2026-06-14 13:36:44:060 INFO] Starting Server [2026-06-14 13:36:44:060 INFO] Version: 1.26.23.1 [2026-06-14 13:36:44:060 INFO] Session ID: 4a018b28-5121-4abe-a814-e4ee70455c37 [2026-06-14 13:36:44:060 INFO] Build ID: 45295249 [2026-06-14 13:36:44:060 INFO] Branch: r/26_u2 [2026-06-14 13:36:44:060 INFO] Commit ID: 49b09b8167bf5f877690429d12747f30342d1db6 [2026-06-14 13:36:44:060 INFO] Configuration: Publish [2026-06-14 13:36:44:060 INFO] Level Name: Bedrock level [2026-06-14 13:36:44:061 INFO] No CDN config file found at: cdn_config.json for dedicated server [2026-06-14 13:36:44:061 INFO] Game mode: 0 Survival [2026-06-14 13:36:44:061 INFO] Difficulty: 1 EASY [2026-06-14 13:36:44:063 WARN] Content logging to console is disabled. Enable it with content-log-console-output-enabled=true in server.properties [2026-06-14 13:36:44:608 INFO] Opening level 'worlds/Bedrock level/db' [2026-06-14 13:36:44:626 INFO] Pack Stack - None [2026-06-14 13:36:45:565 INFO] IPv4 supported, port: 19132: Used for gameplay and LAN discovery [2026-06-14 13:36:45:565 INFO] IPv6 supported, port: 19133: Used for gameplay [2026-06-14 13:36:45:605 INFO] Waiting for Minecraft services... [2026-06-14 13:36:45:806 INFO] Server started. -
Optionally, you can leave the
screensession running in the background by pressing Ctrl + A + D and return to the VM main terminal.If there is only one such background session with the server running and you want to return to it, run the following command:
sudo -u minecraft screen -rIf there are multiple background sessions, get their list by running the following command:
sudo -u minecraft screen -listResult:
There is a screen on: 30989.minecraft (06/17/26 12:23:18) (Detached) 1 Socket in /run/screen/S-minecraft.Then, enter the session using its ID from the list:
sudo -u minecraft screen -r 30989Note
The
minecraftuser does not have a password or SSH key, so you cannot connect to the VM directly on their behalf. To perform operations under this user, connect to the VM over SSH with your credentials and switch tominecraftusing the following command:sudo -iu minecraftThis will start a login session, and
/opt/minecraft-serverwill instantly become the current directory. To return to your session, run theexitcommand or press Ctrl + D. -
After running the server, in the directory, you will see new directories and the files required for server operation and configuration:
4096 Jun 14 13:49 . 4096 Jun 14 12:43 .. 36 Jun 14 13:49 .bash_history 220 Mar 31 2024 .bash_logout 3771 Mar 31 2024 .bashrc 807 Mar 31 2024 .profile 0 Jun 15 12:56 Dedicated_Server.txt 3 May 20 23:35 allowlist.json 222788240 May 20 23:36 bedrock_server 31241 May 20 23:35 bedrock_server_how_to.html 4096 May 20 23:36 behavior_packs 4096 May 20 23:36 config 4096 May 20 23:36 data 4096 May 20 23:36 definitions 4096 Jun 14 13:36 development_behavior_packs 4096 Jun 14 13:36 development_resource_packs 4096 Jun 14 13:36 development_skin_packs 4096 Jun 14 13:36 minecraftpe 484 May 20 23:35 packetlimitconfig.json 3 May 20 23:35 permissions.json 4096 Jun 14 13:36 premium_cache 8548 May 20 23:17 profanity_filter.wlist 398 May 20 23:35 release-notes.txt 4096 May 20 23:36 resource_packs 11650 May 20 23:35 server.properties 4096 Jun 14 13:36 treatments 4096 Jun 14 13:36 world_templates 4096 Jun 14 13:36 worlds
Test the server
-
Download and install the Minecraft client
. -
Run Minecraft Java Edition.
-
Click Multiplayer.
-
Select Direct Connection.
-
In the Server address field, specify the public IP address of the
minecraft-serverVM and click Join Server.
-
Download and install the Minecraft client
. -
Run Minecraft Bedrock Edition.
-
Click Start.
-
Select Server, then click + Add server.
-
Give the server a name of your choice. In the Server address field, specify the public IP address of your
minecraft-serverVM. Leave the default port. Click Add and play.
How to delete the resources you created
To stop paying for the resources you created: