Skip to main content
  1. Posts/

Update Firefly III on Linux

··101 words·1 min·

##Download the latest release

LATEST_RELEASE="$(wget -q -O- 'https://version.firefly-iii.org/index.json' | jq -r '.firefly_iii.stable.version' )"
wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/${LATEST_RELEASE}/FireflyIII-${LATEST_RELEASE}.tar.gz"
wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/${LATEST_RELEASE}/FireflyIII-${LATEST_RELEASE}.tar.gz.sha256"

Validate the downloaded archive #

sha256sum -c FireflyIII-${LATEST_RELEASE}.tar.gz.sha256

Stop nginx #

systemctl stop nginx

Move the olf installation directory #

mv /var/www/firefly /var/www/firefly-old

Extract the archive #

mkdir /var/www/firefly
tar -xvf FireflyIII-${LATEST_RELEASE}.tar.gz -C /var/www/firefly --exclude='storage'

Copy files from the old install directory #

cp /var/www/firefly-old/.env /var/www/firefly/.env
cp -r /var/www/firefly-old/storage /var/www/firefly

Run upgrade commands #

cd /var/www/firefly
php artisan migrate --seed
php artisan cache:clear
php artisan view:clear
php artisan firefly-iii:upgrade-database
php artisan firefly-iii:laravel-passport-keys

Restore file permissions #

chown -R www-data:www-data /var/www/firefly
chmod -R 775 /var/www/firefly/storage

Start nginx #

systemctl start nginx