Back to writing Essay / English

Actual Budget and HTTPS: a 2025 setup experiment

A few free minutes, a SharedArrayBuffer error and a self-signed certificate: my 2025 Compose file, kept as an artifact rather than current instructions.

A short free evening met a surprisingly uncooperative server setup. This is the Compose experiment I shared in January 2025, not a current installation guide.

The other night, I only had a few precious minutes free to myself. And how better to use that time but to quickly set up an Actual Budget server!

I use Portainer to manage my Docker containers, through Stacks. They're basically docker-compose.yml files.

Since AB (that's Actual Budget) was running on a server in my house and not directly on the computer I wanted to access it from, I couldn't use localhost:5006. It wasn't running locally. I had to use the server's address instead, like 192.0.2.42:5006 in this documentation-only example. However, I was welcomed by a message that Actual needed SharedArrayBuffer.

K. Quick Google. SharedArrayBuffer needs a secure context. K. Try https. Doesn't work. It doesn't have a certificate. Great.

Below is the Compose file I shared in 2025—the one I wish I'd found during that short free time that flew away like summer. I would've enjoyed it more. Here ya go stranger, enjoy the sun!

Historical example, not a current secure recipe: I haven't verified this configuration for current Actual Budget or Docker. The self-signed certificate uses a placeholder name, has no explicit subject alternative name, and is not automatically trusted by browsers. The generator can replace its key and certificate when run again; the file also doesn't establish startup ordering and uses unpinned images. Simply switching to HTTPS with this file does not establish a trusted connection. For a current setup, consult Actual Budget's documentation and arrange a certificate trusted by the accessing browser for the actual hostname.

version: '3.1'
services:
  generate_ssl:
    image: alpine
    volumes:
      # Gotta be the same as below
      - ./actual-data:/data
    entrypoint: ["/bin/sh","-c"]
    command:
    - |
      apk add openssl
      openssl req -x509 -nodes -days 365 -subj  "/C=CA/ST=QC/O=Company/CN=website.com" -newkey rsa:2048 -keyout /data/selfhost.key -out /data/selfhost.crt
  actual_server:
    image: docker.io/actualbudget/actual-server:latest
    ports:
      - '5006:5006'
    environment:
      - ACTUAL_HTTPS_KEY=/data/selfhost.key
      - ACTUAL_HTTPS_CERT=/data/selfhost.crt
    volumes:
      - ./actual-data:/data
    restart: unless-stopped

Oh, by the way, if you know a better way to do this, I'd love to hear it—for the greater good!

Image viewer