Install Minecraft server on Ubuntu Linux with Java

Steps needed to install Minecraft on Ubuntu


Check what version of Java you are running

java -version

# Be sure to update your packages
sudo apt update

Install Open Java JRE on Ubuntu Linux

# install Java
sudo apt install openjdk-8-jre

Install Oracle Java (Minecraft site suggests this version)

Visit Ubuntu's website for instructions on installing Oracle Java:

This method is no longer working to install Oracle Java

### Do NOT use this obsolete method!
# sudo apt-get purge openjdk-*
# sudo add-apt-repository ppa:webupd8team/java 
# sudo apt-get update 
# sudo apt-get install oracle-java8-installer

Download and Install Minecraft Client on Ubuntu Linux

Minecraft Download page  

Open your terminal and enter the following commands.

mkdir minecraft
cd minecraft

Download and Install Minecraft Server on Ubuntu Linux

You can find the latest release here

Minecraft Server Download page

# Latest release download
wget -O minecraft_server.jar
# 1.7.4 download
wget -O minecraft_server.jar
# 1.16.5 download 2021-04-20
wget -O minecraft_server.jar

Run your new Minecraft server on Ubuntu Linux

Enter the following command in your terminal to start your server.

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Agree to the Minecraft EULA

You need to agree to the EULA to run the server. Edit the eula.txt file and set eula=true. This will overwrite eula.txt with "eula=true"

echo "eula=true" > eula.txt

Update my Minecraft Server Settings

You can change the settings of your server by opening up the file.

Change the 

# or


Visit sunny St. George, Utah, USA