Install Minecraft server on Ubuntu Linux with Java

Steps needed to install Minecraft on Ubuntu

Creeper

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:

https://ubuntu.com/tutorials/install-jre#3-installing-oracle-jre

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
wget http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar

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 https://s3.amazonaws.com/Minecraft.Download/versions/1.12.1/minecraft_server.1.12.1.jar
# 1.7.4 download
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.7.4/minecraft_server.1.7.4.jar
# 1.16.5 download 2021-04-20
wget -O minecraft_server.jar https://launcher.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/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 server.properties file.

Change the 

nano server.properties
# or
vi server.properties

 

Visit sunny St. George, Utah, USA