Skip to content

Self hosted

In order to run the Firefly III Data Importer (FIDI) you need a working LAMP, LEMP or WAMP running PHP 8.0 and access to the command line. Here are some Google queries to help you.

  1. Install a LAMP stack with PHP 8.0
  2. Upgrade Ubuntu PHP 8.0
  3. PHP 8.0 raspberry pi

Warning

FIDI will not work properly when installed or accessed through a subdirectory on your web server. If you run FIDI from /fidi, /importer or a similar subdirectory your milage may vary and I can't support you.

Preparing your server

Extra packages

Install the following PHP modules:

  • PHP BCMath Arbitrary Precision Mathematics
  • PHP JSON

Installing composer

You need to install composer or download composer.

If you're having trouble with (parts of) this step, please check out the FAQ or open an issue on GitHub.

Installing FIDI

Main command

Browse to /var/www. Enter the following command.

composer create-project firefly-iii/data-importer --no-dev --prefer-dist data-importer 0.9.15

If this gives an error because of access rights, prepend the command with sudo. Then fix the access rights:

sudo chown -R www-data:www-data data-importer
sudo chmod -R 775 data-importer/storage

In general, these access rights aren't terrible important for FIDI, as long as your web server can read all the files.

Configuration

In the data-importer directory you will find a .env file. There are instructions what to do in this file. If you can't find this file, copy .env.example into .env and voila!

Accessing FIDI

You can access FIDI at http://localhost/. If this URL is taken by Firefly III already, make sure your server configuration accepts both. This is called a "virtual host".

Warning

A virtual host would entail setting up two (sub)domains like firefly.local and fidi.local.

Browsing to site

Browsing to the site should be easy. You should see the following screen.

Opening screen of FIDI.

If this is not the case, or something is broken, be sure to open an issue on GitHub or check out the FAQ.

Reverse proxies

To run FIDI behind a reverse proxy, make sure you set the TRUSTED_PROXIES environment variable to either * or the IP address of your reverse proxy.

TLS

To enable TLS in FIDI, your reverse proxy must send the right information to FIDI. Here is some code for nginx:

proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
client_max_body_size 64M;
proxy_read_timeout 300s;

Last update: 2022-08-06