How To Set Up A Minecraft Server On Linux

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 need will depend on the system you're using, but the JARfile will always work (which is the one we use). If you're not comfortable using the command line and are using Windows, feel free to get the simple-to-use EXE.



Next, we will set up the 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. Open a terminal and type "sudo:apt-get-install openssh-server". This will install an SSH server and allow you to remotely manage the Minecraft Server via SSH. (Alternatively, you can use PuTTy to connect to Windows).



 If you're like me, loving remote management, you'd also need an FTP server in order to transfer the minecraft_server.jar and to retrieve the installation later for backup purposes. Open a terminal and type "sudo:apt-get install 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". This will allow users on your machine only to connect (login with your normal name and password) and allows them to write files.



 You will need to install Java, since both Minecraft and Minecraft Server uses it. "sudo --apt-get-install sun-java6_jre" should do it. As I said, I am not certain what works for everyone so please leave a comment.



We're done. Open PuTTy. Enter the address and log into. To create a folder called "minecraft", write "mkdir". This is where the Minecraft Server will be stored. Open FileZilla (or any other FTP client) and log in. Then, transfer the minecraft_server.jar from /minecraft. If you have a folder that you would like to import into Minecraft, place it in /minecraft. Bring up the SSH again and type "java -Xmx1024M -Xms1024M -java minecraft_server.jar nogui" to start the server. -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. You can test it by joining it.



To close the Minecraft Server, you will need to write "stop". This will save the server to disk. You can also run "save all" to quit the server, but I don't recommend it. To edit the configuration, run "nano-server.properties". You don't usually need to, but it's nice to see what's there. I did not change "online-mode" from false because I didn't feel the need. This was mainly because I know a few people who have hacked Minecraft. Some of them bought Minecraft after trying it out, so it's win for us and win for the developers.



Minecraft Server is currently running on port 555565 by default. It is possible to change this port, but then users will need the port number to connect - i.e. "192.168.0.111:xxxx" - using ":" and then the port.



That's all! Happy mining and crafting!

2c1c