Setting up MineCraft Server in Ubuntu

To setup MineCraft server on Ubuntu, first you need to install Java.

Create a user to run minecraft

You can set a password if you want direct SSH login to this user or login as root, then “su – minecraft”.

Login as user minecraft with SSH or “su”.

Download minecraft server .jar file from

https://www.minecraft.net/en-us/download/server/

At the time of writing, i downloaded

Don’t use above link as it can get older, always go to minecraft site and get new link, so you get latest minecraft server jar file.

You can start minecraft server with command

First time when you run, it exit with some error related to EULA.

You need to edit file

Set

Now minecraft will run. You can create a run.sh file with following command for starting minecrat easily.

Paste following content

To make the file executable, chmod it 755

When you start minecraft from terminal/ssh, it get closed when you disconnect. To keep minecraft server running after you disconnect, use tmux or screen.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *