Install Actual Budget with Docker on Ubuntu 24.04

Estimated reading: 5 minutes 552 views

Introduction

Actual Budget is an open-source personal finance application designed to help you manage expenses, track spending, and plan your budget efficiently. By hosting it on your own server, you gain full control over your financial data while benefiting from a fast and reliable environment.

In this tutorial, we will deploy Actual Budget on Ubuntu 24.04 using Docker and Docker Compose, then configure Nginx as a reverse proxy so the application can be accessed through a domain name.

This setup provides:

  • A clean and reproducible deployment using Docker

  • Persistent storage for budget data

  • Secure access through an Nginx reverse proxy

  • Easy maintenance and updates

By the end of this guide, your Actual Budget instance will be running and accessible from your server.

Step 1: Connect to the Server via SSH

Linux / macOS

ssh root@YOUR_SERVER_IP

Windows (PowerShell or Windows Terminal)

ssh root@YOUR_SERVER_IP

When connecting for the first time, confirm the SSH fingerprint if prompted. After authentication, you will be logged in as the root user.


Step 2: Update the System

apt update
apt upgrade

These commands update the package list and upgrade all installed software to the latest available versions.


Step 3: Install Required Dependencies

apt install ca-certificates curl gnupg lsb-release

These tools allow the system to securely download and verify packages from external repositories such as Docker.


Step 4: Create Docker Keyrings Directory

mkdir -p /etc/apt/keyrings

This directory is used to store trusted GPG keys required for verifying repository packages.


Step 5: Add Docker GPG Key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

This command downloads and installs Docker’s official signing key so packages can be verified during installation.


Step 6: Add Docker Repository

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \ https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list

The command above adds Docker’s official repository to the system so Docker packages can be installed directly through APT.


Step 7: Update Package List Again

apt update

Refreshing the package index ensures the system recognizes the newly added Docker repository.


Step 8: Install Docker Engine and Docker Compose

apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

This installs:

  • Docker Engine

  • Docker CLI

  • Container runtime

  • Docker Buildx

  • Docker Compose v2


Step 9: Verify Docker Installation

docker version
docker compose version

These commands confirm that Docker and Docker Compose are installed correctly.


Step 10: Create Actual Budget Directory

mkdir -p /opt/actual

This directory will store the Docker configuration and persistent application data.


Step 11: Enter the Directory

cd /opt/actual

You will now work inside the directory that contains the deployment configuration.


Step 12: Create Docker Compose Configuration

Open a new configuration file:

nano docker-compose.yml

Paste the following configuration:

services:
actual:
image: ghcr.io/actualbudget/actual-server:latest
container_name: actual-budget
restart: unless-stopped
ports:
- "127.0.0.1:5006:5006"
volumes:
- ./data:/data
environment:
- ACTUAL_SERVER_URL=https://budget.example.com
- TZ=Europe/Bucharest

Configuration explanation

  • Actual Budget runs inside a Docker container

  • Port 5006 is bound only to localhost for additional security

  • ./data stores all application data persistently

  • ACTUAL_SERVER_URL should match the domain that will access the application

Save and exit the editor.


Step 13: Start Actual Budget

docker compose up -d

This command downloads the container image and starts the Actual Budget server in the background.


Step 14: Verify the Container Is Running

docker ps

You should see a container named actual-budget listed as running.


Step 15: Test Actual Budget Locally

curl http://127.0.0.1:5006

If the application responds, the server is working correctly before exposing it externally.


Step 16: Install Nginx

apt install nginx

Nginx will be used as a reverse proxy to route incoming web traffic to the Actual Budget service.


Step 17: Enable and Start Nginx

systemctl enable nginx
systemctl start nginx

This ensures Nginx starts automatically when the server boots.


Step 18: Create Nginx Reverse Proxy Configuration

Create a new site configuration:

nano /etc/nginx/sites-available/actual

Paste the following configuration:

server {
listen 80;
server_name _;

location / {
proxy_pass http://127.0.0.1:5006;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

This configuration forwards incoming HTTP requests to the Actual Budget container running on port 5006.


Step 19: Enable the Nginx Site

/etc/nginx/sites-available/actual /etc/nginx/sites-enabled/actual
rm /etc/nginx/sites-enabled/default

This activates the new configuration and disables the default Nginx site.


Step 20: Test and Reload Nginx

nginx -t
systemctl reload nginx

The first command verifies the configuration syntax, while the second reloads Nginx so the new settings take effect.


Access Actual Budget

You can now access the application using your configured domain:

http://YOUR_SERVER_IP

The Nginx reverse proxy will forward requests to the Actual Budget container running on your server.


Conclusion

In this tutorial, you successfully deployed Actual Budget on Ubuntu 24.04 using Docker and configured Nginx as a reverse proxy to make the service accessible through a domain name.

This containerized setup makes the application easier to manage, update, and migrate while keeping your financial data stored persistently on the server.

Share this Doc

Install Actual Budget with Docker on Ubuntu 24.04

Or copy link

CONTENTS