Skip to content

Instantly share code, notes, and snippets.

@Chanyuth
Forked from Engr-AllanG/fireflyguide.md
Last active February 6, 2024 06:52
Show Gist options
  • Save Chanyuth/c505bf959207c19368c4da4e17e26880 to your computer and use it in GitHub Desktop.
Save Chanyuth/c505bf959207c19368c4da4e17e26880 to your computer and use it in GitHub Desktop.
Firefly-III Ubuntu 20.04 Proxmox Installation Guide

The Following Guide is the revision from the original guide with the corrected steps from the comments and myself.


This is a summarized guide I created while installing Firefly-III in a Proxmox (6.2-15) container running Ubuntu 20.04.

I followed this tutorial. It has a link to this other tutorial for installing mariaDB. Furthermore, the official Firefly-iii documentation is Here .

This guide has everything I did in one concise summary. Not much is explained. This will take about 1.5 hrs.

Note: I initially followed the official instructions and used a LAMP stack. I had issues with apache and getting the webserver to work (likely because I am not familiar with apache and am more comfortable with nginx).

To begin, first read through the two tutorials and official documentation so that you hav an idea of whats going on

Container

First, create a 20.04 unprivileged container with 1 core, 512 mb ram, and default 8GB hard disk space. CT 128 with IP 192.168.1.128

Installation Instructions

Did I mention to first read through the two tutorials and official documentation?

Move to the new CT console

Prep

apt update
apt upgrade
apt install nginx curl -y
apt install software-properties-common

Follow this guide to install php

apt install -y php8.2-{cli,zip,gd,fpm,common,mysql,mbstring,curl,xml,bcmath,imap,ldap,intl}

Check to see if php is running

php -v and systemctl status php8.2-fpm

Adjust some php settings

nano /etc/php/8.2/fpm/php.ini

use ctrl-w to search for and change or enable the following lines of code

memory_limit = 512M

[Date]
date.timezone = yourtimezone

stop apache

systemctl stop apache2
systemctl disable apache2

backup nginx file

cd /etc/nginx/sites-available/
mv default{,.bak}

remove symlink

rm /etc/nginx/sites-enabled/default

create firefly.conf in sites-available folder and then paste in the config below

nano /etc/nginx/sites-available/firefly.conf

server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        #server_name  subdomain.domain.com;
        root         /var/www/html/firefly-iii/public;
        index index.html index.htm index.php;

        location / {
                try_files $uri /index.php$is_args$args;
                autoindex on;
                sendfile off;
       }

        location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_read_timeout 240;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        }

    }

symlink the file in sites-available to sites-enabled

ln -s /etc/nginx/sites-available/firefly.conf /etc/nginx/sites-enabled/firefly.conf

restart

systemctl restart nginx php8.2-fpm

Install mariaDB

apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'
apt update
apt install mariadb-server mariadb-client
mysql_secure_installation

test installation

mysql -u root -p

in the mysql shell, check version with the command in bold

MariaDB [(none)]> SELECT VERSION();

while still inside the mariaDB shell:

CREATE DATABASE firefly_db;
GRANT ALL PRIVILEGES ON firefly_db.* TO 'fireflyuser'@'localhost' IDENTIFIED BY 'yourdatabasepassword';
FLUSH PRIVILEGES;
exit;

cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

test composer

composer -V

install firefly - change the version number at the end of the command below to whatever the latest is

cd /var/www/html/

export COMPOSER_ALLOW_SUPERUSER=1

composer create-project grumpydictator/firefly-iii --no-dev --prefer-dist firefly-iii 6.0.23

cd /var/www/html/firefly-iii

Update /var/www/html/firefly-iii/.env to

TZ=yourtimezone

TRUSTED_PROXIES=**

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=firefly_db
DB_USERNAME=fireflyuser
DB_PASSWORD=yourdatabasepassword

Edit everything else you need. Save the file

php artisan migrate:refresh --seed
php artisan firefly-iii:upgrade-database
php artisan passport:install

sudo chown -R www-data:www-data .
sudo chmod -R 775 storage

Make sure we have the right locale enabled (currency and language?)

First check to see what is enabled. I want (en_US.utf8, en_US.UTF-8)

locale -a

nano /etc/locale.gen and uncomment the line en_US.utf8, en_US.UTF-8

locale-gen
systemctl restart nginx php8.2-fpm

That should be it. Navigate to the container IP address and you should get firefly Login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment