Skip to main content
  1. Posts/

Install Firefly III Data Importer on Linux

··208 words·1 min·
Install Firefly III Data Importer on Linux

Requirements #

PHP 8.4 #

See here how to install the latest PHP because Firefly III requires PHP 8.4.

apt #

Install the required packages:

apt install php-fpm php-bcmath php-json php-intl php-curl php-zip php-sodium php-gd php-xml php-mbstring php-mysql mariadb-server nginx jq

Source Code #

The following command sets the DATA_IMPORTER_VERSION to the latest stable version of Firefly III Data Importer:

export DATA_IMPORTER_VERSION="$(wget -q -O- 'https://api.github.com/repos/firefly-iii/data-importer/releases/latest' | jq -r '.tag_name')"

Download the archive:

wget "https://github.com/firefly-iii/data-importer/releases/download/$DATA_IMPORTER_VERSION/DataImporter-$DATA_IMPORTER_VERSION.tar.gz"

Download the checksum:

wget "https://github.com/firefly-iii/data-importer/releases/download/$DATA_IMPORTER_VERSION/DataImporter-$DATA_IMPORTER_VERSION.tar.gz.sha256"

Check the downloaded archive:

sha256sum -c "DataImporter-$DATA_IMPORTER_VERSION.tar.gz.sha256"

Install #

Create the folder for Data Importer:

mkdir /var/www/data-importer

Extract the downloaded tar archive:

tar -xvf "DataImporter-$DATA_IMPORTER_VERSION.tar.gz" -C /var/www/data-importer/

Create the .env file:

cp /var/www/data-importer/.env.example /var/www/data-importer/.env

Change the owner of the files:

chown -R www-data:www-data /var/www/data-importer

Set the correct permission:

chmod -R 0775 /var/www/data-importer

Configure #

nano /var/www/data-importer/.env

Nginx #

Configuration example for nginx:

nano /etc/nginx/sites-available/data-importer
server {

        listen 8080;

        server_name _;

        # Set root path
        root /var/www/data-importer/public;
        index index.php;

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

        # Set FastCGI
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
                fastcgi_pass unix:/var/run/php/php-fpm.sock;
        }

        # Disable accessing hidden files except .well-known
        location ~ /\.(?!well-known).* {
                deny all;
        }
}

Access #

Use SSH Local Port Forwarding:

ssh -N -L 8080:localhost:8080 user@firefly.example.com

Open with the default browser:

xdg-open "http://localhost:8080"