How To Set Up A Minecraft Server On Linux


You can''t click-and play online with your friends, which is one of the downsides to Minecraft. 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 choose depends on which system you are using, but the JAR-file is always valid (which is the one that we use). korobi is now blogging 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. Although I am using Ubuntu on my netbook, it is not possible to guarantee that this will work for all types of computers. However, I am pretty certain that it will work for me. 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. Open a terminal and type "sudo:apt-get install Vsftpd". You will need to configure this. After the installation, run sudo nano /etc/vsftpd.conf and set "anonymous_enable=NO" and remove the "#" from the "#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.



Java is required to run Minecraft Server and Minecraft Server. "sudo:apt-get install sunjava6-jre should do the trick. As I have said, I''m not 100% sure what works for me.



Now we are all set. Open PuTTy, enter the adress and log in. Write "mkdir minecraft" to create a folder named minecraft, this is were we''ll put the Minecraft Server. Open FileZilla, or another FTP client, and log in. Next, copy the minecraft_server.jar into /minecraft. If you have a world you''d like to import, place that folder inside ~/minecraft and rename it to "world". 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. You can test it by joining it.



To close the Minecraft Server, you will need to write "stop". This will save everything on the server. However, you can run "save" to stop 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 only changed "onlinemode" to false because I don’t feel the necessity to authenticate users. This is mostly due to the fact that I know a few friends who run a hacked edition. Some of them purchased Minecraft after having tried it out. It''s win-win for us and win-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" - use ":" and then the port.



I think that''s it! Happy mining and crafting!