How To Set Up A Minecraft Server On Linux


One of the bad things with Minecraft (if there is such a thing), except being addicted is that you can’t easily “click-and-play” online with your friends. In Counter-Strike, for example, you can host a server while you play using only two mouse-clicks – but how do you do you host a Minecraft Server?



Read on to get the full walkthrough of how to set up a Minecraft Server.



The first step for setting up a Minecraft Server is getting the software (or binaries, if you’d like), which can be found here. The file you want depends on what system you’re going to use, but the JAR-file always works (which is the one we’re using). If you don’t feel comfortable using command line and are using Windows please download the easy to use EXE.



Next step is to set up our environment for our Minecraft Server. As I am using Ubuntu on my netbook, I can’t vouch for that this will work for other types, but I’m pretty sure, so keep that in mind. Bring up a terminal window and type “sudo apt-get install openssh-server”, which will essentially install an SSH-server and give you the ability to remotely manage the Minecraft Server via SSH (you can use PuTTy to connect using Windows).



If you love remote management and are like me, you will also need an FTP Server to transfer minecraft_server.jar. Also, to retrieve the installation later, for backup purposes. Start the terminal by typing “sudo-apt-get vsftpd”. This will require some configuration. So after the installation, go to “sudo apt-get install vsftpd.conf”. Set “anonymous_enable = 0”, remove “#local_enable=YES”, and “#write_enable=YES”. What this does is that it only allows users on your machine to connect (you login with your usual name and password) and allow them to write files.
minecraft usernames



Java is required to run Minecraft Server and Minecraft Server. “sudo apt-get install sun-java6-jre” should to the trick. As I have said, I’m not 100% sure what works for me.



Now we are all set. Open PuTTy, enter your address and log in. Write “mkdir minecraft” to create a folder named minecraft, this is were we’ll put the Minecraft Server. Log in to FileZilla or another FTP client and copy the minecraft_server.jar file to /minecraft. If you have an existing world that you wish to import, place the folder in /minecraft. To start the server, bring up the SSH once more and type “java.xmx1024M.xms1024M.java minecraft_server.jar.jar nogui”. -Xmx defines the maximum RAM java (minecraft servers) can use. –Xms defines the minimum amount. However, it doesn’t seem that it allocates all of it at startup. If you haven’t imported one, Minecraft Server will create a new world. Feel free to check if it works by joining it.



There are a few things more to do. Write “stop” in order to close down the Minecraft Server. This is crucial as it will save everything to the server. You could also run “save/all” to exit the server however I don’t recommend it. To edit the config, run “nano service.properties”. This is not necessary, but it can be useful. I only changed “online-mode” to false since I don’t feel the need to authenticate users, mainly because I have a few friends who are running a hacked version. Some of them bought Minecraft after trying it out, so it’s win for us and win for the developers.



Note that Minecraft Server is running on port 25565 by default, changing the port is okay, but then users will have to enter the port when connecting – i.e. “192.168.0.111?xxxx” – use “:” to find the port.



That’s it! Happy mining and crafting!

Leave a comment

Design a site like this with WordPress.com
Get started