Firefly-III
Preparation
sudo apt update
sudo apt upgrade -y
sudo apt install -y nginx curl software-properties-common php8.3 php8.3-{cli,zip,gd,fpm,common,mysql,zip,mbstring,curl,xml,bcmath,imap,ldap,intl} php-json
Check to see if php is running
php -v
and systemctl status php8.3-fpm
Adjust some php settings
sudo nvim /etc/php/8.3/fpm/php.ini
search for and change or enable the following lines of code
memory_limit = 512M
[Date]
date.timezone = Europe/Berlin
stop apache
sudo systemctl stop apache2
sudo systemctl disable apache2
remove nginx file
sudo rm /etc/nginx/sites-enabled/default
create "firefly.dodekaeder.name" in sites-enabled folder and then paste in the config below
sudo nvim firefly.dodekaeder.name
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.3-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)(/.+)$;
}
}
restart
sudo systemctl restart nginx php8.3-fpm
If you get an error due to duplicate web servers, you need to remove the symbolic link in sites-available (ls -l) and then rm the link
Install mariaDB
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- \
--mariadb-server-version="mariadb-10.11" --os-type="ubuntu" --os-version="noble"
sudo apt install -y mariadb-server mariadb-client
sudo mysql_secure_installation
test installation
mysql -u root -p
in the mysql shell, check version with the command in bold
SELECT VERSION();
while still inside the mariaDB shell:
CREATE DATABASE firefly_db;
CREATE USER 'fireflyuser'@'localhost' IDENTIFIED BY 'yourpasswordhere';
GRANT ALL PRIVILEGES ON firefly_db.* TO 'fireflyuser'@'localhost';
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/
sudo chown elias /var/www/html
composer create-project grumpydictator/firefly-iii --no-dev --prefer-dist firefly-iii 6.1.24
cd /var/www/html/firefly-iii
Change in the ".env" file those lines:
DB_HOST=127.0.0.1
DB_DATABASEE=firefly_db
DB_USERNAME=<usr>
DB_PASSWORD=<pwd>
DB_SOCKET=/run/mysqld/mysqld.sock
TZ=Europe/Berlin
continue instalation
php artisan migrate:refresh --seed
php artisan firefly-iii:upgrade-database
php artisan passport:install
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
sudo nvim /etc/locale.gen and uncomment the line en_US.utf8, en_US.UTF-8
sudo locale-gen
sudo systemctl restart nginx php8.3-fpm
That should be it. Navigate to the container IP address and you should get firefly Login
Nginx
Install Nginx with
sudo apt install nginx
sudo service nginx start
sudo systemctl enable nginx
Create a new Configuration File with:
sudo vim /etc/nginx/sites-available/mywebsite
and test ist with sudo nginx -t
and then restart with sudo service nginx restart
PHP
install php 8.3 with
apt-get install ca-certificates apt-transport-https software-properties-common
# Add Ondrej's PPA
sudo add-apt-repository ppa:ondrej/php
sudo apt update
# Install new PHP 8.3 packages
sudo apt install php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl}
# Install FPM OR Apache module
sudo apt install php8.3-fpm
# OR
# sudo apt install libapache2-mod-php8.2
# On Apache: Enable PHP 8.3 FPM
sudo a2enconf php8.3-fpm