Return to site

How To Set Up A Minecraft Server On Debian 10 - Techlear

  Minecraft is a very popular game. There are many different versions of this game, but they have in common the need for a server to host games and keep track of all players. In this tutorial we will show you how to set up your own Minecraft server on Debian 10, using open-source tools available from their official website. PrerequisiteDebian installation with root privileges is required. - A Minecraft server that is compatible with the version of your Debian release. If you're using Ubuntu, you can check their website to see which one works for you. If it's not clear which one to use, try googling Minecraft Server compatible on Debian /Ubuntu or ask in the comments and we'll help! Make sure to update your Debian system with the latest version. This is a good idea before installing any additional packages because it will provide you with all of the latest updates and security patches for both Debian software as well as installed applications like Minecraft server. Simply execute the following commands in your terminal to do this: These commands are run in tandem; updating first then upgrading once that has completed successfully. Note that when running these commands there are no pending upgrades, they should only take up to five minutes whereas larger upgrades can take much longer so be patient! Install Java This will download the current latest release of Java and install it. If you have multiple versions installed, this will remove them all for simplicity's sake! After you are done, you can verify which version is running by entering the following command in your terminal: That's it! Java has been installed to your server. Create a new Minecraft user In this example, we create a new user named 'minecraft': Once you're done, copy-paste or type your password twice to confirm it. It is important that each account has a unique and secure password. Example output: Add the new sudo user to the group. Install Screen Screen is a GNU utility which can be used for multiplexing terminal sessions. This is a useful tool that allows remote access. You can detach from an existing ssh session and restart it later, without needing to close the instance (which would cause you to be disconnected). To install Screen, type: This command will install the screen program and all its dependencies on your server. This task is over. You can continue to the next task by clicking here. Install Minecraft After exiting your current SSH, log back in using the minecraft user we created earlier. Create a new folder named minecraft and then move it to your desktop. Now, we will download the current Minecraft.net version into this directory. Refer to the Minecraft server page to get the latest version of Minecraft Server, replace the version section below with that URL. Create a startup program This allows your Debian server to start on reboot of your machine or Debian itself. It's also useful in case your home internet connection drops. Copy and paste these lines into your terminal The jar parameter can be set to keep your world persistant or not. If you want a fresh start each time, use nogui. If you don't have enough RAM for this setup in Debian, or Ubuntu, consider dropping -Xmx from 2560M up to something lower like 500M. Save your script with CTRL-O, exit Nano with CTRL-X, then confirm that the file you want to save by pressing y. You should now have a startup script in /home/minecraft/. It will automatically begin on boot. To test it, copy-paste or type the following command. If errors such as java, are not recognized, please double check the java installation process. Start.sh executable Once you are done, type exit in the terminal window or close it if you would like to log out of this user account; then go back to your main screen. To disconnect from that ssh session entirely, simply exit by typing: exit or pressing Ctrl-D when at a prompt. Minecraft servers You can also use nano again and remove ./start.sh. If you have already done so in a previous instance (e.g., for Minecraft Server), then it won't prompt again. Accepting these agreements allows Debian's repositories to download packages from another server on behalf of yours; this can be more convenient as they're often better updated than your own! Once accepted, the installation should take just a few minutes to complete and no further action is necessary until that process has finished downloading all needed files and resources. Next, you need to open the file eula.txt. This will allow your server to connect with the Minecraft game client software. Open the file in your preferred editor. Make sure it reads: eula=true. The next step is using screen to run our Minecraft server process independently so that we don't need to be logged into the minecraft user account at all times when administering the game server remotely via SSH. This will create session minecraft to run the Minecraft process behind the scenes; we can access it from any shell we're logged into. Configure Your Minecraft Server Firewall Next, we need to set up our firewall. Debian has an excellent built-in firewall called ufw that allows us great control over what programs on our system can access outside network resources like the internet! It also includes port forwarding, which allows certain ports to pass depending on criteria like destination address or source IP. In Debian, the default settings currently only allow SSH traffic (e.g., ssh from your local system into this server). Let's start by typing rules for Minecraft. Connect to your Minecraft Server Open your Minecraft client and select the Multiplayer tab. Enter your server's name, IP address, and password. You will need to buy an additional domain name from any domains suppliers in order to play on the public network. Also, Dynamic DNS must be set up by you. This is beyond this tutorial's scope. You can now connect with the server. Click on Join Server. Congratulations! You can now play Minecraft and build worlds. You can build worlds and have fun with your friends, too. For more help and tips, visit the Minecraft Wiki. Setting up a Minecraft Server on Debian is easy, just follow the steps in this post. If you have any questions be sure to comment below. The same steps can be applied to any Debian system, such as Debian Stretch. We hope you have enjoyed this tutorial and hope it has helped you to set up your own server! If you think we've missed something, please let us all know in the comments. Happy mining!

Minecraft servers