---
title: "How to Install Minecraft on Ubuntu"
description: "While Minecraft has dedicated server support, some users prefer to set up their own Minecraft server. There are a number of advantages of setting up your own server, from better performance to higher..."
url: https://www.inmotionhosting.com/support/server/server-usage/install-minecraft-ubuntu/
date: 2021-12-03
modified: 2021-12-06
author: "InMotion Hosting Contributor"
categories: ["Server Usage"]
type: post
lang: en
---

# How to Install Minecraft on Ubuntu

![](https://www.inmotionhosting.com/support/wp-content/uploads/2021/12/install-minecraft-on-ubuntu-1024x538.png)

While Minecraft has dedicated server support, some users prefer to set up their own Minecraft server. There are a number of advantages of setting up your own server, from better performance to higher customizability. One of the most popular platforms used for this purpose is Linux. A Minecraft server can be set up on a number of different Linux distributions, or distros, including Ubuntu and Debian. In this article we will explore how to set up your own Minecraft server on [Ubuntu](https://www.inmotionhosting.com/blog/ubuntu-20-04-lts-release/). Please note that this article requires the use of [Linux commands](https://www.inmotionhosting.com/support/server/linux/command-line-tutorials/) and [SSH connections](https://www.inmotionhosting.com/support/server/ssh/connect-ssh/),

Topics Include:

- [Updating Ubuntu and Installing Java Toolkits](#update)
- [Installing Minecraft](#install)
  - [Connecting to Your New Minecraft Server](#new)

## Updating Ubuntu and Installing Java Toolkits

Before we can start the Minecraft installation, we will first need to ensure that the Ubuntu system is up-to-date and download the necessary Java toolkits. 

1. When logged into your Ubuntu server via SSH, enter the following commands:sudo apt updatesudo apt upgrade
2. Once the system has finished updating, run the following command to install OpenJDK, a Java toolkit used by software developers:sudo apt install default-jre
3. Once Java has been updated, you then need to add `minecraft` as a system user with the following command:sudo adduser minecraft
4. In your home directory, create a folder titled `minecraft`. This folder will be where you download Minecraft and install it. 

## Installing Minecraft

1. Now that your system is prepared for the Minecraft installation, we can proceed with downloading the necessary data. Since Minecraft is not available via default Linux software repositories, we will need to use the following command to download the data directly from the Minecraft developer’s website:wget [https://launcher.mojang.com/v1/objects/3cf24a8694aca6267883b17d934efacc5e44440d/server.jar](https://launcher.mojang.com/v1/objects/3cf24a8694aca6267883b17d934efacc5e44440d/server.jar)
2. Next, create a script called run.sh. In it, put the following command:java -Xms1024M -Xmx2048M -jar server.jar -o true
3. Finally, modify the script to make it executable using the following command:chmod +x  /home/minecraft/run.sh
4. To begin the installation, use the following command:./run.sh
5. Once the installation script runs, the eula.txt file will appear in the /home/minecraft/ folder. Use a text editor to change the value of `eula` to `true`. Then run the script again as in Step 4. If successful, a new, default Minecraft server will be ready to access. Advanced server configurations can be performed by editing the `server.properties` file, found in the `/home/minecraft/` directory. 

##  Connecting to Your New Minecraft Server

1. Now that you’ve installed Minecraft on your own server, you can connect to it using the Minecraft client software. Open Minecraft and navigate to **Multiplayer** and select **Add Server**. 
2. The game will provide you with a form to enter the server IP address as well as a name associated with the server you’re connecting to. Input your server IP and then click** Done**. If the server is working properly, you should join the Minecraft session without issue and begin playing immediately. 

Congratulations, you now know how to set up your own Minecraft server on Ubuntu!

Don’t ruin the game with lag! Get a server that offers the best gaming experience, performance, and processing power with [Bare Metal Hosting](https://www.inmotionhosting.com/game-server-hosting)!

![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Top-Tier Performance ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Perfect for Gaming ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Customizable ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Dedicated Resources

[Game Server Hosting](https://www.inmotionhosting.com/game-server-hosting)
