CraftBian 2

The first CraftBian 2 version is now ready for some testing! I have made an image ready for Raspberry Pi 2 and 3, which is two separate images for now. I’m making an installation script, so CraftBian 2 should be installable on any device (at least in theory), which will be made available later

Be advised though, that this image IS an ALPHA. Stuff is most certainly broken (hence the testing part), and there will be a lot of features missing from CraftBian 1 .

What this image includes

  • Ubuntu 16.04 linux release for Raspberry Pi
  • Laravel 5.5.28
  • CraftBian v2 ALPHA 1 which includes
    • Functionality to create, edit and delete servers
    • Send server commands through the web interface
    • Start/Stop the server
    • Power management of the Raspberry Pi
    • Limited settings for CraftBian

CraftBian 2 is not a continuation of CraftBian 1.. Its a complete do-over. A rewrite, utilizing the Laravel framework. This also means that many features from CraftBian 1 will not be present in this version of CraftBian 2. Those include:

  • Backup feature
  • Port forwarding feature
  • Auto server restart, and power scheduling
  • User management along with user role control
  • Automated server broadcast over LAN
  • etc.

All those above features are planned to be included later, along with new features.

My goal of this first ALPHA is mainly to see how well this idea works with the Laravel framework.

If you want in on the testing, don’t hesitate to contact me on my email .. Remember, the more testing and feedback i get on this version, the faster i can get new versions out to you, which includes the public release!

In this post I will be explaining some of the changes in CraftBian 2, codewise. These changes has mainly happened because i now utilize Laravel, so this is both notes to my self but might also be useful to others


Laravel uses the MVC design pattern, which CraftBian v1.x did not. In CraftBian v1.x i used my “own” design pattern, with a ViewHandler that generated HTML so somewhat still separated from the View, but not completely. Laravel changes all that so that its now more distinctly separated hence the MVC: Model, View, Controller. Now in the view a templating engine called Blade is used, which gets its variables passed from the Controller. This structures the code much better, and most importantly – makes the code much easy to maintain. Furthermore Laravel provides loads of helper features which makes it easier to do Logging, Localization and even showing messages to the user. All features which CraftBian v1.x was missing very much


In CraftBian v1.x i simply didn’t do localization, which meant that all strings was typed in directly where needed. Laravel uses localization files like the below one

And when needing a specific translation, you call it out via the __() helper function, which takes the filename as input followed by the key needed like so


Logging is also a feature which i would have appreciated back in CraftBian v1.x, mainly because it would be much easier to debug when CraftBians users were having trouble with something, which i needed to assist on. Laravel makes this very easy. An example below of logging a simple information is shown:

As you can see its as simple as calling the static method info inside the Log class. This methods first argument would be a simple titile describing what has happened, and the next parameter is an array containing contextual and relevant info, but it is optional. There are other methods besides info or error, which you can find more info about here .

The log file containing all this is stored in storage/logs/laravel.log

Messages to the user (Flash messages)

CraftBian v1.x missed a lot of feedback to the user, when they did something inside the interface, being everything from saving a file for a Minecraft server, or setting up a backup schedule. In Laravel this is so easy to do with Flash messages:

This is mostly notes to my self, but others might find it useful / interesting  . It also gives you a slight insight in the development of CraftBian 2

I have more things i would like to cover, like the Model structure and how Object relational mapping works in Laravel, which i also get to utilize in CraftBian 2, because it now uses SQLite to store its settings instead of JSON as in CraftBian v1.x.

When CraftBian 2 is going into its closed beta testing, i have thought about how i want versions to be “named” or categorized until the final public release.

There will be three “milestones” before the actual public release and they will be named as follows: (arrow representing what I’m currently working on)

CraftBian 2 ALPHA
The goal of this version is to get basic functionality working. As of this writing, this is the version that CraftBian 2 is currently in. It includes the following:

Core functionality
Logging, Localization and Code structure
Unit power management
Unit status and usage display
CPU, RAM etc. as known from CraftBian v1.x
Minecraft Controls
Starting and stopping
Minecraft Server Console I/O
Basic Minecraft Server Creation
Including the creation of multiple servers
Minecraft Server settings editing
CraftBian basic settings
Basic settings, Timezone setup and Hostname setup
About page including an Updating system
Might be simple at first

CraftBian 2 BETA
After the ALPHA version is in place, bug fixes is needed AND the rest of the relevant functionality from CraftBian v1.x will be moved over

Minecraft Server settings
White/Black list, operators and world handling
More CraftBian settings
Power scheduling, Storage management and user control
Backup feature
Automated Port mappings
Auto server download via API like in CraftBian v1.x
Server LAN broadcast via Python script like in CraftBian v1.x

CraftBian 2 DELTA
This will add (some of?) the new planned features for CraftBian 2 and fix the bugs in them

Force server shutdown if it hangs
Optimize dependancy of remote server
Log submission from Client to me, for easier bugfixing
Web based File browser
First time wizard
Guiding the user to set up different settings

CraftBian v2.0 (Public Release version)
First public release version, hopefully with bugs fixed and new features added. This version will be freely available to everyone who has already purchased CraftBian!

ONLY fix bugs since DELTA version

As you can see, I’ve added some checkboxes and checkmarks, so that you can follow the progress of the upcoming version, which will be updated along the development. Bugs are supposed to be added in BitBucket, but for now I’m going to use this, until i get further into the development!

And as a last thing, heres a screenshot of the current build. Its begging to take shape!

That’s it for now. This list might be updated with new/missing stuff along the way. If you want to help out with the development of CraftBian by testing it out, just write me and I’ll let you know more as soon as its available.

Progress has been slow on development of CraftBian 2. Sorry to say this, but i haven’t really gotten far yet. Now that “Winter is coming”, and i have finally found some time again, I’m hoping that i can actually progress now.

However, there is only a few things  to tell for now.

It seems like the repositories on the original CraftBian image was broken
This isn’t really related to CraftBian 2, but i think it should be mentioned somewhere as it was a little concerning. CraftBians trusty betatester and user Shadowstreik, pointed this out to me the other day, and it seemed to have been broken for at least a week. To the normal user, this shouldn’t be a an issue, but if you tend to keep the packages behind CraftBian up to date, this was halting that process completely. It seems like that Minibian have JUST been fixed, as in as i was writing this post, so that is good news at least. Otherwise i would’ve had to create a completely new image for CraftBian.

I’ve got a Minecraft Server running on the upcoming CraftBian 2 image
Not exactly huge news, but I’ve just gotten a Minecraft Server running on the upcoming CraftBian 2 image. Using the default JAVA runtime environment on a Ubuntu installation makes this task impossible due to very very poor performance. So i had to switch it out with Oracle’s JAVA instead, which boosts performance 100x compared to the original on the Ubuntu image. This is the same package which i use on the current CraftBian image, albeit newer, so performance should, and seems, to be around the same 🙂

CraftBians backend has FINALLY been upgraded!
I’ve wanted to this for over 6 months, but have been waiting for a specific model to be released. CraftBians backend, has until last weekend been running on a Synology NAS. More specific the model called DS214SE. This was a model from 2014, and back then it was the cheapest model they made = the slowest and worst unit spec wise. I didn’t originally intent to run a webserver or any of the other tasks it ended up doing for that matter. It had a single core 700 mhz CPU with 256 mb ram, so not exactly a beast. The new unit is a 2018 model: DS918+, which is Synology’s top model for Home / Small office use. This has a Celeron 4 core cpu @ 1.5 GHz boosting up to 2,4 Ghz, and 4 GB ram, so it should be, and seems to be, a very nice performance boost and hopefully helps the speed of CraftBians webservices and backend.

That is all for now! I hope i get started with the development of the actual interface a little more this weekend. There is ALOT to do yet before anything is even remotely ready for beta testing, but i will keep this space updated, hopefully more often from now on 🙂

I’m glad to announce that the next big CraftBian version has begun its development! I do not have much information yet, as very much can change. Nothing is certain yet. However i do have a few plans for it listed below:

  • Will be based on a light Ubuntu distribution
    Instead of Minibian as is used now, i want to use Ubuntu at it is updated more frequently and still based on Debian. Also wider support across multiple platforms.
  • Multiple platform/board support.
    I hope to make a CraftBian installer, so that you can install the interface on whatever platform you might want to use. Everything from a Raspberry Pi, to a full fledged Server PC. However i still want to provide a full image like you are used to on the current CraftBian release.
  • Build on the Laravel PHP Framework.
    I’ve already begun the early testing phase on this, to test the compatibility of the current functionality in CraftBian
  • Nginx to replace Lighttpd
    Simply because it is better supported

Smaller, yet important changes:

  • Make less dependent on remote server
    One of the things that i don’t quite like about CraftBian v1.x is that if my remote server is down, CraftBian will be very slow or/and maybe even not work properly. This is something i do not want.
  • Better updating system, that can also account for the software behind CraftBian
    When updating CraftBian currently, the software behind it, in Linux, is not updated. This means that if some major change happened on this side, the user would be forced to completely reflash the image with a newer version. Something i do not want.
  • Multi language
    Something i had always intended but never got around to.
  • Logging system, maybe even remote submission of logs
    Another thing i had always wanted, but never got around to, as it would be easier for me to help and debug users having trouble.

This blog is intended for a detailed explanation on the progress of the development of CraftBian 2 and it will include some rather techy terms along with some programming. I also intend to use it for my self, as notes i need to remember along the way.

.. To be continued !