DEV Community

Cover image for How to Install Firefly III on Ubuntu 24.04
LetsCloud Team for LetsCloud Inc

Posted on • Originally published at letscloud.io

How to Install Firefly III on Ubuntu 24.04

Introduction

Firefly III is an open-source personal finance management application, widely adopted by users who value privacy and control over their financial data. In this article, you'll learn how to install Firefly III manually (without Docker) on a LetsCloud instance, leveraging the platform’s scalability to securely and independently manage your finances.

Goals

This tutorial aims to guide users who want to install and configure Firefly III on a LetsCloud instance without using Docker. The manual installation provides more control and flexibility over the environment using a Linux, PHP, and MariaDB stack. This guide is ideal for developers, infrastructure professionals, and enthusiasts who want full control of their self-hosted personal finance manager.

Requirements

Before getting started, you’ll need:

  • An active LetsCloud plan
  • A Linux instance (recommended: Ubuntu 24.04 LTS)
  • Root (or sudo) access
  • Domain name (optional but recommended)
  • Web server Nginx
  • PHP 8.1 or higher with required extensions
  • MySQL/MariaDB
  • Composer
  • Git

Installation Steps

Update your system

sudo apt update && sudo apt upgrade -y
Enter fullscreen mode Exit fullscreen mode

Install required packages

sudo apt install php php-cli php-common php-mbstring php-xml php-bcmath php-curl php-mysql php-tokenizer php-zip unzip curl git composer nginx mariadb-server -y
Enter fullscreen mode Exit fullscreen mode

Configure the database

sudo mysql -u root
Enter fullscreen mode Exit fullscreen mode
CREATE DATABASE firefly CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'fireflyuser'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON firefly.* TO 'fireflyuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Enter fullscreen mode Exit fullscreen mode

Clone Firefly III

cd /var/www/
sudo git clone https://github.com/firefly-iii/firefly-iii.git
cd firefly-iii
sudo git checkout main
Enter fullscreen mode Exit fullscreen mode

Configure the environment

cp .env.example .env
nano .env
Enter fullscreen mode Exit fullscreen mode

Edit the variables:

APP_KEY=base64:...
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=firefly
DB_USERNAME=fireflyuser
DB_PASSWORD=secure_password
Enter fullscreen mode Exit fullscreen mode

6. Generate the app key

php artisan key:generate
Enter fullscreen mode Exit fullscreen mode

7. Install dependencies and set permissions

composer install --no-dev --optimize-autoloader
php artisan migrate --seed
sudo chown -R www-data:www-data /var/www/firefly-iii
sudo chmod -R 755 /var/www/firefly-iii/storage
Enter fullscreen mode Exit fullscreen mode

Configure Nginx

sudo nano /etc/nginx/sites-available/firefly
Enter fullscreen mode Exit fullscreen mode

File content:

server {
    listen 80;
    server_name your_domain.com;

    root /var/www/firefly-iii/public;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}
Enter fullscreen mode Exit fullscreen mode

Enable the site:

sudo ln -s /etc/nginx/sites-available/firefly /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Enter fullscreen mode Exit fullscreen mode

Access

You can now access Firefly III via your instance’s IP address or configured domain:

http://<your-ip-or-domain>
Enter fullscreen mode Exit fullscreen mode

Security Tip

It’s recommended to enable HTTPS using Let’s Encrypt and Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx
Enter fullscreen mode Exit fullscreen mode

Conclusion

With LetsCloud, you have the freedom to build customized environments like this one, with full control over security, scalability, and personalization. Firefly III is an excellent choice for managing personal or small business finances.

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.