Tutorial How To Create A Minecraft Server On A VPS

From Human's Love
Jump to: navigation, search

Minecraft is a popular sandbox video game. It needs to be hosted on a server if you wish to play in multiplayer.



You can rent a pre-built Minecraft server or you can set it up yourself on a VPS or on a dedicated server. This will reduce the cost and give you full control over your game instance.



This tutorial explains how to launch a Minecraft Java Edition server on an OVHcloud VPS and test its connectivity.



This guide will show you how to use one or more OVHcloud solutions with external tools, and will describe the actions to be carried out in a specific context. ou may need to adapt the instructions according to your situation.



If you encounter any difficulties performing these actions, please contact a specialist service provider and/or discuss the issue with our community. You can find more information in the Go further section of this guide.



Requirements



- A Virtual Private Server in your OVHcloud account - A GNU/Linux distribution installed on the server - Administrative access (root) via SSH to your server - A basic understanding of GNU/Linux administration



Instructions



This tutorial is based on version "1.17" of Minecraft Java Edition and OpenJDK version "16.0.1".



Step 1: Prepare the server



The first step is to set up your VPS for a Minecraft installation. It is recommended to order a new VPS or reinstall an existing one from your OVHcloud Control Panel, using the latest available release of Ubuntu or Debian. Please refer to our Getting started guide if necessary.



Once the OS is installed, connect to your VPS with SSH as described in the Getting started guide.



First update the packages to their latest versions:



Use the following command to ensure all required packages are installed.



Install the Java package:



To avoid security vulnerabilities on your system, create a user named "minecraft" who will carry out the server actions:



Simply press the Enter key to skip filling in the usual account information.



The user is now created. Note that no password was specified for this user. This is normal because the account is only accessible when already connected via SSH with your own user account.



Switch to the new user:



The following commands need to be executed by the user "minecraft".



To complete the setup preparations, create a folder named server. Korobi Is Now Blogging



Step 2: Install your Vanilla Minecraft server



A "Vanilla" server is an instance without any add-ons or plugins. You will experience the game the way it was created by the developers.



First you will need to copy/paste the download link for the server software. Right-click on the Minecraft download link and select Copy Link location from the context menu.



Back in your command line terminal, make sure you are still in the server folder and use wget to download the file. Replace download_link with the actual URL from your clipboard.



Before launching the server, you need to agree to the End User License Agreement. To achieve this, enter the following command.



A file named eula.txt is now located at the root level of your server, containing the line eula=true. This will tell the software that you accept the Minecraft EULA. We invite you to review the terms and conditions on the Minecraft website.



Your server can now be started.



During step 1, we installed the screen package which allows opening multiple sessions of the terminal (shell). We will start Minecraft in a new session that can run in the background. Using screen can be very handy since it gives you the possibility to launch multiple Minecraft servers simultaneously.



First, we will create a new shell named minecraft1:



The active terminal window will switch to a new shell session. You can create multiple shells; list them with this command:



To detach from the shell (and keep it running), press Ctrl, then a, then d on your keyboard.



To switch from one shell to another, use this command:



You can also press Ctrl, then a, then n on your keyboard.



In the previously created minecraft1 shell, launch the Minecraft server with the following command. (Use ls to verify the filename in case it differs.)



To shut down your server, enter the command stop.



Step 3: Connect to the server



Your server instance is now functional. To play the game, download the Minecraft client from the official Minecraft website.



Install and launch the client for your operating system and sign in.



On the next screen, enter the server name in the field Server Name, and the IP address of the server in the field Server Address.



By default, no port needs to be specified.



Your Vanilla Minecraft server is now installed on your VPS.



Please note that this installation guide should also work on an OVHcloud dedicated server or a Public Cloud. instance. With those services, you will have the advantage of better stability since the hardware is dedicated.



Go further



For add-ons, mods and to personalise your Minecraft experience, please consult this official documentation: https://help.mojang.com/.



Join our community of users on https://community.ovh.com/en/.



Did you find this guide useful?



Please feel free to give any suggestions in order to improve this documentation.



Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.



Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.



Thank you. Your feedback has been received.