This guide will get you Laverna running inside a super tiny and secure Alpine Linux container.


Setup Laverna

Install dependencies

apk add openssl unzip

Download Laverna files

mkdir -p /var/www/
cd /var/www/
wget -O
unzip -uo

Install Nginx

We need a web server to serve Laverna. We’re going to use nginx.

apk add nginx

We need to update nginx to point at the directory that houses Laverna. This only takes one change in /etc/nginx/nginx.conf. Change the root value under server to /var/www/laverna

- root http
+ root /var/www/laverna

Start your new site

All we have left is to start nginx, and set it to start at boot.

rc-update add nginx
rc-service start nginx

You can now visit your site at http://[ip address]

Clean Up

In an effort to keep our container as small as possible, we should clean up after ourselves.

rm /var/www/
apk del unzip

Start Laverna container at system boot

We’ve setup our Laverna service to start up when the container boots, but we also need to set up our Laverna container to start when the host boots.

From the host machine, edit /var/lib/lxc/laverna/config to add the following line: = 1

To test to make sure your container will boot on startup, shut down the container and then run the following command:


This command starts all containers that are marked to boot on startup. After running this command you should be able to navigate to Laverna from your web browser.

Now what?

Take some actual notes