How to compile and use the Lua powered Mako Server

Posted by SurfskiDude on Nov 27, 2022 10:33 AM EDT
Mail this story
Print this story

Lua is a small, lean, and fast scripting language ideal for working with web servers, especially on small Linux devices and low end Virtual Private Servers.

The Mako Server provides a compact and efficient Lua web framework and non-blocking asynchronous sockets in a tiny ready to run application server package. The Mako Server is a good fit for embedded Linux systems such as the Raspberry Pi. Lua is a powerful and fast programming language that is easy to learn and use.

Make sure you have the following tools installed:

sudo apt install git make gcc unzip

The first thing we need to do is to clone the Barracuda App Server (BAS) GitHub repo. This repo includes the Mako Server. In short, BAS is a web server C library and the Mako Server is a ready to run web server based on the BAS library.

You can now just run the makefile as follows:

make -f

However, let's add a few modules. Lua and the Mako Server can easily be extended and the makefile is set up for compiling two additional common modules: the SQLite database engine and Google's Protocol Buffers. When added, you have access to additional APIs from Lua.

cd src;
git clone 

wget; unzip;

#Move the SQLite source to the BAS/src directory

cd sqlite-amalgamation-3400000/; mv *.c *.h ..
Note: you may want to check that you are downloading the latest SQLite version:

Now, navigate to the BAS/ directory and run make.

cd ../../;
make -f
You can now run the Mako Server


The server typically opens port 9357 (when started as non root) so you can now navigate to http://localhost:9357

You should see the built in intro page.

Now stop the server (CTRL-C) and download the tutorials as follows:

git clone

The example repo includes many examples so let's just try one of the examples, the web shell example:

./mako -l::LSP-Examples/Web-Shell/www

You should see a Linux web based shell (web based SSH) if you navigate to http://localhost:9357

This was a quick introduction. For more, use the following tutorials and documentation:

Online Lua REPL: Tutorials:

Online documentation:

BAS can also be compiled for deep embedded RTOS systems such as the ESP32 microcontroller. Here are two additional tutorials you may find interesting if you work with RTOS powered devices:

ESP32 tutorial: NXP's RT1020 tutorial:

» Read more about: Story Type: Tutorial; Groups: ARM, Developer, Embedded, Linux, Raspberry Pi

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.