Skip to content

Instantly share code, notes, and snippets.

@3isenHeiM
Last active December 9, 2020 10:03
Show Gist options
  • Save 3isenHeiM/e34237b83627953621f75a519546297a to your computer and use it in GitHub Desktop.
Save 3isenHeiM/e34237b83627953621f75a519546297a to your computer and use it in GitHub Desktop.
Install Firefly III on OVH web hosting PRO

How to Install Firefly III on OVH web hosting (PRO only)

Requirements

  • OVH web hosting pro (for php CLI access via SSH)
  • MySQL database

Steps

1. Upgrade the PHP version

As of now (november 2020), OVH only proposes PHP 7.3. However, FireFly requires PHP 7.4. There is a small trick to do to enable PHP 7.4 on the hosting server

Edit the file .ovjconfig at the root of tyour hosting server and add/modifiy the following lines :

  app.engine=phpcgi
- app.engine.version=7.3
+ app.engine.version=7.4
  http.firewall=none
  environment=production
+ container.image=stable64

2. Install composer on the server

Login via SSH on the hosting server, and type in the following command :

curl -sS https://getcomposer.org/installer | php

3. Get the Firefly-III project files

We will now download the composer project files. I've decided to put this in a subdomain of my hosting server (subfolder money), so I've modified the argument of the composer crete-project command as this :

php composer.phar create-project grumpydictator/firefly-iii --no-dev --prefer-dist money 5.4.6

This command will fail because the PHP extension php-ldap is not installed (because our provider does not offers it). We'll fix that later.

4. Installation

Now, change the current folder to the subfolder were composer downloaded our files (money in our case).

We will remove the php extension from the requires extension since our provider (OVH) doesn't offer this on mutualised spaces.

Edit the file composer.json in the Firefly-III subfolder (money in our case). Remove the line containig "adldap2/adldap2-laravel": "6.*",. BTW : heads up to firefly-iii/firefly-iii#2944 for the solution ! (y)

It's time to add the database settings.

In order to do so, edit the file .env in the Firefly-III subfolder and update the database credentials in the following lines :

DB_CONNECTION=mysql
DB_HOST=hostname
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=username
DB_PASSWORD=password

We'll have to update composer with these change. Run this command in the current folder :

php ../composer.phar update

Now it's time to actually install Firefly.

Enter this command to start the isntaller :

php ../composer.phar install --no-dev

Enter these commands to initialize the database :

php artisan migrate:refresh --seed
php artisan firefly-iii:upgrade-database
php artisan passport:install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment