123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Running Firefly III on Linux [PHP Based Personal Finance Manager]</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,FireFly III,PHP,MariaDB,MySQL,Apache HTTPD,Personal Finances,Personal Finance Manager,Personal Accounting,Debian,FOSS,Free Open Source Software,Free Software,Open Source Software,Linux,Open-Source,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Running Firefly III on Linux [PHP Based Personal Finance Manager]">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="revised" content="07/18/2023 03:21:28 PM" />
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Running Firefly III on Linux [PHP Based Personal Finance Manager]</h1>
- </div>
- <div></div>
- <div id="content">
- <h2>What is Firefly III?</h2>
- <blockquote><em>"Firefly III" is a (self-hosted) manager for your personal finances. It can help you keep track of your expenses and income, so you can spend less and save more. -<a href="https://docs.firefly-iii.org/firefly-iii/installation/self_hosted/?mtm_campaign=docu-internal&mtm_kwd=self_hosted" target="_blank">https://docs.firefly-iii.org/firefly-iii/installation/self_hosted/?mtm_campaign=docu-internal&mtm_kwd=self_hosted</a></em></blockquote>
- <h2>Installation</h2>
- <ol>
- <li>Log into the Linux device</li>
- <li>Run the following commands in a terminal window:
- <div class="codeBlock"># update software repositories<br />
- sudo apt update<br />
- # install prerequisites<br />
- sudo apt install curl wget zip lsb-release apt-transport-https ca-certificates git -y<br />
- # add the php gpg key<br />
- sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg<br />
- # add the php apt repository<br />
- echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list<br />
- # update software repositories<br />
- sudo apt update<br />
- # install available software updates<br />
- sudo apt upgrade -y<br />
- # install Apache HTTPD and MySQL<br />
- sudo apt install apache2 mariadb-server mariadb-client -y<br />
- # install PHP components<br />
- sudo apt install php libapache2-mod-php php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-mbstring php8.1-bcmath php8.1-zip php8.1-intl php-sodium -y<br />
- # install composer<br />
- curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer<br />
- # configure the MySQL database<br />
- sudo su<br />
- mysql_secure_installation</div>
- </li>
- <li>Press Enter to login as root</li>
- <li>Type N and press Enter to not switch to unix socket authentication</li>
- <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
- <li>Type Y and press Enter to remove anonymous users</li>
- <li>Type Y and press Enter to disallow root login remotely</li>
- <li>Type Y and press Enter to remove the test database</li>
- <li>Type Y and press Enter to reload privilege tables</li>
- <li>Run the following command to login into MySQL:
- <div class="codeBlock">mysql -u root -p</div>
- </li>
- <li>Authenticate with the root password set earlier</li>
- <li>Run the following commands to create the Firefly database and database user
- <div class="codeBlock">CREATE DATABASE firefly;<br />
- GRANT ALL ON firefly.* to 'firefly_rw'@'localhost' IDENTIFIED BY 'f!r3f1y:)';<br />
- FLUSH PRIVILEGES;<br />
- EXIT;<br />
- exit</div>
- </li>
- <li>Continue with the following commands:
- <div class="codeBlock"># create the firefly app<br />
- sudo composer create-project grumpydictator/firefly-iii --no-dev --prefer-dist /var/www/firefly<br />
- # set ownership of the firefly directory<br />
- sudo chown -R www-data:www-data /var/www/firefly<br />
- # limit permissions on storage<br />
- sudo chmod -R 775 /var/www/firefly/storage<br />
- # change directory to the application folder<br />
- cd /var/www/firefly<br />
- # edit the .env file<br />
- sudo nano /var/www/firefly/.env</div>
- </li>
- <li>Scroll through the .env file and modify the following values
- <p>SITE_OWNER=<% admin email address %><br />
- TZ=<% timezone %><br />
- DB_CONNECTION=mysql<br />
- DB_HOST=127.0.0.1<br />
- DB_PORT=3306<br />
- DB_DATABASE=firefly<br />
- DB_USERNAME=firefly_rw<br />
- DB_PASSWORD=f!r3f1y:)</p>
- </li>
- <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
- <li>Continue with the following commands in terminal
- <div class="codeBlock"># initialize the database<br />
- php artisan migrate:refresh --seed<br />
- php artisan firefly-iii:upgrade-database<br />
- php artisan passport:install<br />
- # create firefly apache configuration<br />
- sudo nano /etc/apache2/sites-available/firefly.conf</div>
- </li>
- <li>Paste the following configuration into firefly.conf
- <p>Alias /firefly "/var/www/firefly/public/"<br />
- <directory firefly="" public="" var="" www=""><br />
- Options FollowSymlinks Includes ExecCGI<br />
- AllowOverride All<br />
- Require all granted<br />
- Order allow,deny<br />
- allow from all</directory></p>
- </li>
- <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
- <li>Run the following command to enable the Firefly site
- <div class="codeBlock"># enable rewrite module<br />
- sudo a2enmod rewrite<br />
- # enable the firefly site<br />
- sudo a2ensite firefly<br />
- # restart the apache2 service<br />
- sudo systemctl restart apache2</div>
- </li>
- <li>Open a web browser and navigate to http://DNSorIP/firefly</li>
- <li>Enter an email address and password > Click Register</li>
- <li>Welcome to Firefly III</li>
- </ol> </div>
- </div>
- </body>
- </html>
-
|