My boys have built quite large world inside theirs Minecraft. One of them is running local server on his PC and other connects to his computer. But this is not a perfect way of doing things. Older boy has to turn on brotherâs PC to play so I have to pay more for electricity. There is no automatic backup for Minecraft worlds, guys are not able to add plugins to theirs server, etc.
So, they ask me if I can run server as before, few years ago, when I run it on one of my servers with public address. I answered:if I will do it you will start to hate me.
â Why dad?
âBecause our Internet connection is poor. Hey guys, we have Qnap NAS which runs 24/7 and has ability to run Virtual Machines and Linux containers. We can set up one for Minecraft server as before.
âOK, dad. Letâs do it.
This is how we did it and you can follow it this way:
First change default port (8080) of your NAS to some not popular port because we know that some services could run on 8080 automatically and overlap it. And itâs also a small piece of security by obscurity.
Then setupVirtual Switchconnected to physical Ethernet card. Itâs simple as running wizard.
InstallContainer Station.
Install Debian Jessie (you can choose Ubuntu or others) LXC container insideContainer Station.
In our Debian containerSettingswe changedNetwork Modeto âBridgeâ connected to Virtual Switch with DHCP to allow autoconfiguration. This way our container will get IP address from our router.
Run Debian container and check if it gets IP address (we fixed this IP to Debian in router config).
If itâs OK then install Cuberite (which is fine Minecraft server with plugins and web interface for admins).
Open console of Debianâs container and do:
- 2apt install curl
- 4curl -sSfL https://download.cuberite.org | sh
Check if Cuberite is OK:
- 2cd Server
- 4./Cuberite
Close it with Ctrl+c.
Move Cuberite to /srv:
- 2mv Server /srv/cuberite
Make service file for systemd:
- 2vi /etc/systemd/system/cuberite.service
and paste following stuff:
- 2[Unit]
- 4Description=Cuberite Server
- 6After=local-fs.target network.target
- 8[Service]
- 10Type=forking
- 12User=root
- 14WorkingDirectory=/srv/cuberite
- 16ExecStart=/srv/cuberite/Cuberite –service
- 18[Install]
- 20WantedBy=multi-user.target
Then enable it to run Cuberite when container boots:
- 2systemctl daemon-reload
- 4systemctl enable cuberite.service
Run service to check it:
- 2systemctl start cuberite
Look for Cuberite:
- 2ps auxc | grep -i cuberite
You should see it running.
Find IP address of your container:
- 2ifconfig
and go to the following address to manage your Cuberite server,default login/pass is: admin.
- 2http://[container_ip]:8080
You can change it in/srv/cuberite/webadmin.ini.
Take a look at other INI files. Check some awsome plugins and
Be sure that Debian container starts automatically when Container Station is started and of course is Container Station starts when NAS is booting.
The very last thing was to backup old Minecraft world from kidâs PC (here is short guide how to find it) to USB drive and then copy it as/srv/cuberite/world. You compress whole folder and transfer it to container withscp.
Restart Cuberite:
- 2systemctl restart cuberite
Kids now can connect to new Minecraft server with[container_ip]:25565.
Default port for Cuberite is 25565, you can change it in /srv/cuberite/settings.ini.
AND REMEMBER:
CONTROL HOW LONG YOUR KIDS PLAY!
YOU ARE ADMIN. USE YOUR POWER AND QNAP SETTINGS TO SHUT DOWN EVERYTHING.
YOU ARE MOTHER OR FATHER – BE BRAVE!
:)