Beaglebone | Redeem | Replicape + Lighttpd + sqlite3 on BeagleBone Black


I’ve been working hard on a project lately called Debrew that adds a web interface to a CNC controller. I decided to go for Lighttpd as the web server, as the Python framework, and sqlite3 as the data base engine. Here is how I did it.

I’m going to write up the whole project in a different post, but I just wanted to post the instructions for getting a basic web interface going on BeagleBone Black. This post assumes using Angstrom (or similar OpenEmbedded flavour, I guess) as the distro. In the following instructions, I’m assuming starting from the Thing image. This image is very minimal, so it lacks stuff like Git..  The most important difference from a Debian based distro is perhaps the package handling system. The instructions are specific for Debrew, so just exchange your project for this.


opkg install git
opkg install python-compile
opkg install wget
opkg install python-setuptools

Instructions for installing the software:

opkg install lighttpd
opkg install sqlite3
opkg install lighttpd-module-fastcgi
opkg install lighttpd-module-rewrite
opkg install lighttpd-module-alias
opkg install python-sqlite3


cd /usr/src/
git clone git://
cd webpy
python install

transfer python software

make executable:

chmod +x /www/pages/debrew/

Edit the lighttpd config file to enable serving Python files:

nano /etc/lighttpd.conf
enable mod_alias, mod_fastcgi, mod_rewrite by commenting out the # opn that line.

Add this to the end of the file:

fastcgi.server = ( ".py" =>
(( "socket" => "/tmp/fastcgi.socket",
"bin-path" => "/www/pages/debrew/",
"max-procs" => 1,
"bin-environment" => (
"check-local" => "disable"

url.rewrite-once = (
"^/favicon.ico$" => "/static/favicon.ico",
"^/static/(.*)$" => "/static/$1",
"^/(.*)$" => "/debrew/$1",

The lighttpd systemd file is broken, so make sure it looks like this:

nano /lib/systemd/system/lighttpd.service

Should look like this:

Description=Lightning Fast Webserver With Light System Requirements

ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd.conf


Install Flup:

cd /usr/src
wget --no-check-certificate
tar -vxf flup-1.0.tar.gz
cd flup-1.0/
python install

Restart lighttpd:

systemctl restart lighttpd

If there are problems during the development, make sure you check both /www/logs/lighttpd.error.log and syslog (journalctl).

Update: With the new Thing-image, this is already pre-installed.

Similar Posts


  1. Is this related to what looked like a delta-bot coffee pourover setup you tweeted a photo of a while back? I’ve thought about making an automatic pourover setup that somehow emulates a person pouring the water, but using a cnc deltabot setup didn’t even cross my mind. Looks awesome!

    1. Yes! Let me just finish the BBB flasher image for it and I will upload all files to a repo. OSHW FTW 😉

Leave a Reply

Your email address will not be published. Required fields are marked *