You'll need a cloud server to host minecraft, and we've got the simplest cloud server platform anywhere!
Click the link below to create your server on our platform:
Note: This button will redirect you to the home page to create your server. After creating your server, return to this guide and continue with the next step.
Now that your server is up and running, let's connect to it using SSH. You created an SSH key during server creation and saved it. You will use this key to connect to your server.
We have provided an example SSH command that you can use. It is under "Access" on the home page for your server.
Click on the command (it is automatically copied).
Open a Powershell window and paste in the command. If you stored the SSH key file in a folder, you will have to add that to the command.
You can also just type in the command as follows:
ssh -i [path_to_ssh_file] root@[ip_address]
Replace the following:
sudo apt update
sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker
docker --version
mkdir -p ~/minecraft-data
sudo chmod -R 755 ~/minecraft-data
Pull the latest itzg/minecraft-server
image from Docker Hub:
sudo docker pull itzg/minecraft-server
Run the Minecraft server using the following command, ensuring it will restart unless stopped:
sudo docker run -d -p 25565:25565 -v ~/minecraft-data:/data -e EULA=TRUE --restart unless-stopped --name minecraft-server itzg/minecraft-server
Here’s a breakdown of the flags used:
-d
: Runs the container in detached mode (in the background).-p 25565:25565
: Maps port 25565 on the server to port 25565 in the container, allowing access to the Minecraft server.-v ~/minecraft-data:/data
: Mounts your server’s ~/minecraft-data
directory as the container’s /data
directory, preserving game data.-e EULA=TRUE
: Accepts the Minecraft EULA.--restart unless-stopped
: Ensures the container will automatically restart if the server reboots or if the container stops unexpectedly.Check that your Minecraft server is running by listing active Docker containers:
sudo docker ps
To manage your server, you can shut it down and restart it whenever you need it. The Minecraft Docker container will restart automatically on startup due to the --restart unless-stopped
option set earlier.
Your Minecraft server is now set up for consistent uptime and automatic restart on reboot! Enjoy your gaming experience!
© Copyright 2024. Make Life Great LLC. All rights reserved.