
A Minecraft server will let you play online with other people. In this article, we are going to install a Minecraft server on Ubuntu 18.04.
sudo userCreate a new non-root user with sudo access:
Add mcuser to the sudo group:
Switch to the new sudo user:
Update your system:
Install wget, if it's not already installed:
In order to run a Minecraft server, we will need Java on the server. Install the latest version:
Now, confirm the Java installation:
You will receive output similar to the following:
You can also install Screen, if you want the Minecraft server to be able to run in the background:
Create a new directory to hold all of your Minecraft files, and move to that directory:
Now we can install Minecraft. Be sure to replace 1.11.2 with the current release of Minecraft:
The Minecraft installation is now complete, but you must accept the license agreement before you can use it:
Find the line eula=false and change it to eula=true. Save and exit.
You can now start your Minecraft server:
This command starts the Minecraft server with 1024MB RAM allocated. To allocate more RAM, simply change the -Xmx and -Xms arguments to your desired size. For example, -Xmx2048M -Xms2048M will start the server with 2048MB RAM.
If you want to run the server in the background, first stop the server that is currently running with the command stop. Now create a new Screen instance.
Now run the Java command again:
To exit out of the screen window, press Ctrl + A, then press D. If you want to open the window again, use the command sudo screen -r.
Congratulations, you now have a Minecraft server up and running on Ubuntu 18.04.
0 Comments
Be the first to comment and share your perspective with the community.