How to Install Firefly III on Manjaro

Firefly III is an open source personal finance manager that helps you track your spending and income. It is a web-based application that can be self-hosted, making it a highly customizable personal finance solution for those who are looking to take control of their finances. In this tutorial, we will guide you through the process of installing Firefly III on Manjaro.

Prerequisites

Before installing Firefly III, make sure that you have the following:

Steps to Install Firefly III

Step 1: Install Required Packages

First, you need to install the following packages using the package manager pacman.

sudo pacman -S php php-fpm php-intl php-gd php-mysql composer

Step 2: Clone Firefly III Repository

Next, you need to clone the Firefly III repository from the official website using Git. Navigate to the default Apache web server directory.

cd /srv/http/

Clone the Firefly III repository using the following command.

sudo git clone https://github.com/firefly-iii/firefly-iii.git

This will download the latest version of Firefly III to your system.

Step 3: Install Dependencies

Change the directory to Firefly III.

cd firefly-iii

Use the composer package manager to download and install the dependencies for Firefly III.

sudo composer install

Step 4: Create MySQL Database

Create a new MySQL database and user for Firefly III using the following commands.

sudo mysql -u root -p

Enter the MySQL root password when prompted.

CREATE DATABASE fireflyiii;
CREATE USER 'firefly'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON fireflyiii.* TO 'firefly'@'localhost';
FLUSH PRIVILEGES;
exit

Replace the username and password with your preferred credentials for the Firefly III database.

Step 5: Set Environment Variables

Copy the .env.example file to .env.

sudo cp .env.example .env

Edit the .env file and set the following environment variables to match your MySQL credentials.

DB_DATABASE=fireflyiii
DB_USERNAME=firefly
DB_PASSWORD=password

Save and close the file when you're finished.

Step 6: Set Directory Permissions

Set the directory permissions for Firefly III using the following commands.

sudo chown -R http:http storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache

Step 7: Configure Apache

Create a new virtual host configuration file for Firefly III in the /etc/httpd/conf/extra directory.

sudo nano /etc/httpd/conf/extra/firefly-iii.conf

Add the following content to the file.

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "/srv/http/firefly-iii/public"
    ServerName firefly.local
    ErrorLog "/var/log/httpd/firefly-iii-error_log"
    CustomLog "/var/log/httpd/firefly-iii-access_log" combined
    <Directory "/srv/http/firefly-iii/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Save and close the file.

Step 9: Enable and Start Services

Enable and start the Apache and PHP-FPM services using the following commands.

sudo systemctl enable httpd
sudo systemctl start httpd
sudo systemctl enable php-fpm
sudo systemctl start php-fpm

Step 10: Access Firefly III web interface

Open your web browser and navigate to http://localhost. The Firefly III setup page will be displayed.

Follow the on-screen instructions to complete the setup process.

Congratulations! You have successfully installed Firefly III on your Manjaro system. You can start using it to track your personal finances.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!