How To Set Up A Minecraft Server On Linux

From Wifi Adapters DB
Jump to: navigation, search

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 need depends on the system you use, but the JARfile works every time (which is what we are using). If you don't feel comfortable using the command-line and are using Windows, you can 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. 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 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". This will require some configuration. Run "sudo nano.conf /etc/vsftpd.conf" after the installation and set "anonymous_enable=NO", "#local_enable=YES", "#write_enable=YES" to remove the "#". This will allow only certain users to connect to your computer (login using your usual name and password), and allow them to create files.



Java is required for Minecraft Server and Minecraft Server. "sudo:apt-get install sunjava6-jre should do the trick. As I mentioned before, I don't know what works for you. Please leave a comment or search another way to get the runtime environment.



Alright - we're now set. Open PuTTy and enter the address to log in. Write "mkdir minecraft" to create a folder named minecraft, this is were we'll put the Minecraft Server. Open up FileZilla (or another FTP client), log in, and transfer the minecraft_server.jar to ~/minecraft. If you have an existing world that you wish to import, place the folder 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. Minecraft Server will now create another world if it hasn't already. It's possible to test it by joining it.



A few more things to add, but we are almost there. Type "stop" on the Minecraft Server to stop it. 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". games 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 bought Minecraft after they tried it out. So it's win for both us and 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" - using ":" and then the port.



That's all! Happy mining and crafting!