How to create a Minecraft server on a VPS

A handful of Minecraft characters walking in a forest
(Image credit: Microsoft)

If you're thinking about setting up (or switching to) a VPS for Minecraft, you came to the right place. If not, keep reading and you might change your mind. 

Since it came into existence over a decade ago, Minecraft has grown into one of the world's best-selling games of all time and a cultural phenomenon attracting over 132 million ambitious players each month. With its simple, colorful, Lego-like visual style and sandbox-survival game design, it’s no surprise Minecraft has become an international icon of creativity.

However, there wouldn’t be Minecraft without its committed online and real-world communities, who are constantly creating new mods and changing the game into something new and captivating. Nowadays, Minecraft comes in many shapes and sizes including on PC, gaming consoles, virtual reality (VR), and smartphones, which offer players plenty of freedom on how to play the game.  

While many Minecraft players are content with this amount of freedom, others are wondering how to create a private virtual space where they can have a good time with their closest friends. So, if you’re one of them, consider using a virtual private server (VPS). While you could also use a dedicated server, they come with a hefty price tag and could blow your budget in a couple of months. Therefore, if you’re not rolling in money, stick to VPS.

Before going to the actual steps on how to set up a Minecraft server with a VPS, let’s learn a bit more about Minecraft servers, VPS, and why you would want to combine them.

What is a Minecraft server?

In simple terms, a Minecraft server is a game server created to host online multiplayer lobbies of the game developed by Mojang Studios and called (you’ve guessed it) Minecraft. By using their own computers as Minecraft servers or utilizing web hosting services (usually for superior performance) to set up a gaming server for their Minecraft world, players can shape the game in ways they weren’t allowed before. For instance, they can give or hold back specific roles from other players, choose how stuff spawns, or reshape the in-game physics to make it more realistic or completely surreal. 


(Image credit: Pixabay)

What is VPS?

While VPS is most often used by individuals and small to mid-sized businesses setting up their websites and building their online presence, this solution can also serve as a stable, secure, and superb game server. It’ll provide its user with a completely isolated virtual environment that is based on a bare-metal server. Since you won’t be getting a dedicated server space with a VPS, it comes with a cheaper price tag. 

However, it’s called “private” because you won’t be forced to share RAM, bandwidth, and other resources with other VPS accounts (as is the case with shared hosting), since this sort of server separates your files from all other users using the operating system (OS).

How to set up a Minecraft server using a VPS

While you have an option to rent a pre-built Minecraft server, setting it up on a VPS will significantly cut the cost and give you complete control over it. So, if you’re planning to set it up on your own, here are the crucial steps:

Best Minecraft server hosting providers: Hostinger, ScalaHosting, Apex Hosting, Shockbyte and BisectHosting logo on a desktop with the Minecraft game background

(Image credit: Future)

1. Consider your needs and pick up a suitable VPS solution 

Needless to say, purchasing a VPS solution is the first step in setting up a Minecraft server on such a solution. While doing this, make sure you choose a solid VPS provider, but also consider the cost in relation to the number of players that you want to host on your server. For instance, if you don’t plan on hosting more than 20 players, a VPS solution offering 1 GB of RAM and 20 GB of storage space should suffice.

2. Connect to the VPS via SSH

The next step might be a bit tricky if you’re not particularly tech-savvy (or have friends who are), and it includes connecting to the VPS using the Secure Shell Protocol (SSH). Since the most widely used SSH client is PuTTY (if you’re using Windows, macOS, or Linux, that is) you can start by downloading it and running it on your system. Then, find a Host Name (IP address), copy the IP address of your VPS (provided by your VPS service provider), and paste it into the “Host Name” field. 

After this, you’ll also want to input the username (also provided by your VPS provider), in the SSH terminal and type in the password to log into the VPS. Now, connect to your VPS over SSH, and once the link is made you can configure your server any way you want it. 

3. Install JDK 

While you’re in the SSH, install Java Development Kit (JDK). Before creating a Minecraft server you’ll need to make sure to download the up-to-date version of Java. Once the server is updated, enter an appropriate command in your console (for instance, on Ubuntu it’s “apt install openjdk-16-jdk”). 

4. Download and install Minecraft on your VPS 

The next step is to create a separate directory for all of your Minecraft content, including your Minecraft installation. You can do this by running another command on the SSH terminal (such as “mkdir –p /Minecraft”), and then navigating it with yet another command (“cd /Minecraft”).  

Once this is complete, it’s time to install Minecraft, so make sure to check Minecraft’s official site for the newest updates.

5. Accept the EULA

While this sounds like something from Captain Obvious’s bag of tips, before running the Minecraft server app, you’ll have to agree to the EULA terms and conditions. Also, try to read what you agree to. This can also be done with a single command (“echo “eula=true” > eula.txt”).

6. Launch your Minecraft server

Once everything it’s set up, it’s time to run your Minecraft server, and you can do it via a command like this “java -Xmx1024M -Xms1024M -jar server.jar nogui”. Also, try to stay patient while waiting for operations running on the SSH command line to finish. 

Benefits of setting up a Minecraft server using VPS

A VPS server doesn’t only offer a good value for money, but it’s also considerably cost-effective, given that it basically offers the functionality of a dedicated server without the costing-a-bomb part. Also, since you won’t be sharing your server with anyone, you’ll have complete control over it, including root access.

As for security, with VPS you can expect to get a full set of security features (including automated and manual data backup), meaning all your data should be safe and secure.

Since VPS is a highly scalable solution, you’ll be able to scale up/down your resources without a hitch. Also, with your Minecraft server hosted in the cloud, you can expect faster performance and lower latency.

At the same time, having your own Minecraft server means you’ll be the one calling the shots, choosing what mods to install, and creating your community.


(Image credit: Microsoft/Mojang)

Taking your Minecraft worlds to the next level

 If you’re thinking about setting up your VPS server for Minecraft, now is the perfect time to do so. VPS solutions provide powerful performance paired with long-term scalability, high customizability, complete access and control, strengthened security, and cost-effective pricing. So, it's no surprise it could do wonders for your Minecraft world as well.

Mirza Bahic is a freelance tech journalist and blogger from Sarajevo, Bosnia and Herzegovina. For the past four years, Mirza has been ghostwriting for a number of tech start-ups from various industries, including cloud, retail and B2B technology.