My “drugs” of choice

So, I’ve made this blog. That’s nice, but what do you know about me? Why am I writing about debian, tomcat and minecraft?

I though I’ll give you, dear reader, a little information about myself, and about the software that I use on a daily basis (and I think that speaks volumes about me). So…

I use Debian Testing for my personal laptop, a Lenovo Z500. I have dual boot with Windows 8.1, mostly for gaming, and mostly unused, since the games I’m playing lately are available on Linux (to be honest, I mostly play minecraft :-P). I choose Gnome-Shell as desktop environment, and Bumblebee for the dual graphics cards support.

For web browsing, I use mostly Iceweasel, with a couple of add-ons, like firebug and AdBlockPlus. I also have Chromium, so I can test a different web browser whenever I’m doing web development. I have Calibre to manage the ebooks in my Kindle, Gedit for text editing, and Latexila and LibreOffice to edit complex documents (Although, If you are planning on sending me any document, please read this first!). I use Inkscape and Gimp for image editing, and Openshot for video editing, and I watch those videos (and many more!) in vlc.

At my workplace, I also have Debian, but with KDE. In that PC, I use Eclipse and maven for java development, Pycharm and Kate for python, Kile for latex, and Vim for pretty much every other thing. I also use git and github for version control. Finally, I use Apache, Apache Tomcat, MariaDB, and some of its modules (like mod_wsgi) for the deployment of most of our work, on a couple of Ubuntu virtual servers.

This blog is hosted on a VPS running CentOS 7, using nginx, Apache, php and MariaDB, as well as WordPress. My minecraft server is hosted in a different VPS with Debian stable.

Finally, I have a fairphone running android (I considered CyanogenMod, but I’ve put that on hold).

And I think that sums it up pretty well. What do you think? ­čśë

PD: Also, coffee. Lots of the stuff.

Using pahimar’s forgecraft script on a minecraft server

I play minecraft. A lot. And so, some time ago I decided to setup a server on a VPS to play modded with some friends, and when looking on setting up the server, I came across with Pahimar’s Forgecraft script. Okay, less “came across” and more “hear about in a stream”. But eitherway, let’s get going.


You will need a debian-like server with java installed, as well as a copy of the minecraft server, either moded or vanilla


Installing the init script

So, the init script looks something like this:

(Due to the script beeing rather large, I’ve moved it to github: )

You will need to change the relevant variables in the header. Set the username to run the server jar, the folder where the server lives,  the backups folder and the java home to your java installation.

Then, just save the script in /etc/init.d/ and enable it:

root@host:~# update-rc.d minecraft defaults

And you are good to go.

Setting the check server

As you may have notice, in Pahimar’s repo there is a java class called “CheckServer”. This class is responsible for keeping tabs on the server, and restarting it, in the case it would not respond to any command. So, in the previous init script, you should have set the CHECKSERVER variable to where the java class is. Build it, and it’s done:



Setting up the backups

Finally, the script includes a backup method using rdiff-backup. Just add the command to the crontab, with whatever frecuency you want the backups. I chose 1 hour:

# Minecraft backups every hour
0 * * * * /etc/init.d/mc170 backup >>/opt/minecraft/backup.log 2>&1


Food for though

  • ┬áThere are a lot of Java Options there. For a normal minecraft server It should suffice with just the memory options.
  • The CheckServer script may work better in other language, like python or bash, where you don’t need to compile it.