Setup Minecraft On FreeBSD 10

This article assumes you have a AKLWEB Host VPS with 2 CPU and 2GB of ram. Please change any settings accordingly to your VPS type. This article also uses Minecraft 1.8, so please change accordingly if you wish to use something different.

Install Basic Tools

You may want to install wgetnano, and screen by running the following command:

pkg install screen nano wget

Install Java

Install OpenJDK 7 by running the following command:

pkg install java/openjdk7

Once it is done, run the following command to verify the installation of OpenJDK 7:

java -version 

If you see the following, then you can proceed to the next step:

openjdk version "1.7.0_71"
OpenJDK Runtime Environment (build 1.7.0_71-b14)
OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode)

Download and Setup Minecraft

Run the following commands to download Minecraft:

cd ~
mkdir mcserver
cd mcserver
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar –no-check-certificate

Once it is downloaded, you will want to create a file called eula.txt and populate it with eula=true. This is applicable to any server after version 1.7.9. By creating this file, you agree with the Mojang EULA which can be found here.

Next, create a file called startup.sh and populate it with the following:

java -Xmx1500M -Xms750M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -jar  minecraft_server.1.8.jar nogui

Save the file and run the following command to start the server:

screen sh startup.sh

If all is successful, you will be able to connect to the IP address of your VPS with the Minecraft game client. You have just setup Minecraft on FreeBSD 10.

Security Note

It is recommended to create a new user specifically for your server to make sure that the Minecraft server does not have root access. Giving a server or application root access poses a security risk. To create a new user, run adduser and follow everything being prompted, but make sure that when it asks about the shell, to choose nologin as a security measure for this user. Once completed, enter into your server directory and run the following command (Change "minecraft" with the username and group you have created):

chown -R minecraft:minecraft .

This will change the owner of the content of that directory to minecraft. Next, run the following command to start the server:

screen su -m minecraft -c "sh startup.sh"

This will start your server as the user minecraft. If everything is successful, the server will be running.

  • Minecraft, Game Servers, BSD
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Starting a Teamspeak 3 Server on CentOS 6.4

Run the following commands to install a Teamspeak 3 server. # Secure Iptables iptables -F...

Multicraft (Minecraft Panel) on CentOS 6

Multicraft Panel Multicraft is a simple, easy to use web-based control panel for Minecraft...

Install a Minecraft Server on CentOS 6

This article will guide you through setting up a Minecraft server on a high performance SSD VPS...

Setup a Multi Theft Auto Server on Debian

This is a tutorial explains how to install a Multi Theft Auto server on Debian. It was last...

Setting Up a Garry's Mod Server

The instructions are designed for Ubuntu 14.04 32 bit, but should work on all versions of Ubuntu....