Building a Tiny CRL Server: Alpine, BusyBox, and Zero Swap

How to serve a certificate revocation list from a minimal Alpine Linux LXC container with BusyBox httpd, and why the CRL distribution point should use plain HTTP.

When you build your own PKI in a home lab, you quickly realize a painful truth: revocation is not optional. You need a place for browsers to fetch your Certificate Revocation Lists (CRLs). And since this is a home lab, you want it to be as lean as humanly possible.

The Blueprint: 1 GB, 128 MB RAM, 0 Swap

For a service that only serves one static file (or a handful of them), throwing a full Debian or Ubuntu LXC at the problem feels like using a sledgehammer to crack a nut. We went with Alpine Linux because the base image is around 3 MB, and the whole system fits comfortably in a tiny footprint.

  • Disk: 1 GB (we use barely 40 MB of it).
  • RAM: 128 MB (we’re seeing about 6 MB of actual usage).
  • Swap: 0 (because if a static file server runs out of 128 MB of RAM, you have bigger problems).

Enter the CRL container (ct-crl.cs.manzana.home).

Realization

Step 1: Laying the Groundwork

We start by creating the directory structure.

📋 NOTE: If you’re using Alpine’s BusyBox shell (ash), brace expansion ({dir1,dir2}) is not supported. You need to create them one by one or explicitly list them.

mkdir -p /var/www/crl
chmod 755 /var/www/crl

Step 2: The Web Server (BusyBox httpd)

Forget Nginx or Apache. We’re going minimal. BusyBox has a built-in HTTP server that is perfect for this. But—and this is a classic Alpine gotcha—it’s not installed by default.

We need the busybox-extras package:

apk add busybox-extras
apk add busybox-extras-openrc

Now, configure the service. We don’t want to run this manually every time. Let’s set the options in /etc/conf.d/httpd:

HTTPD_OPTS="-p 80 -h /var/www/crl"

Start the service and enable it at boot:

rc-update add httpd default
rc-service httpd start

Step 3: The “Did it work?” Test

Drop a test file (or your actual CRL) into /var/www/crl/, then run:

curl -I http://localhost/ca.crl

If you see HTTP/1.1 200 OK and a Content-Length, you’re golden.

Why HTTP and not HTTPS?

You might be tempted to put a TLS certificate on this container. Don’t.

The CRL is already digitally signed by your CA. The browser verifies the signature, not the transport layer. More importantly, if you put a certificate from your own PKI on the CRL server, you create a circular dependency: the browser needs to validate the server’s certificate, which requires fetching the CRL… from that same server. Stick to plain HTTP for the CRL distribution point. It’s safe, it’s standard, and it saves you a headache.