Skip to content

Updating Lychee

The way you can update Lychee depends on how you did your installation:

  • Your system must comply with the latest system requirements of the latest version of Lychee.
  • Ensure that you are using the version 4 of Lychee. Updates from older version of Lychee are more complex.

Don’t forget to take a look at the Changelog to see what’s new and to check for any actions that may be required.

There are two cases. Either you are pinned to a release tag, e.g. v5.1.2 or you are using a rolling update tag.

This procedure is for those following one of those tags:

  • latest — the last official release
  • edge or master — the last build from the master branch

Simply run the following.

Terminal window
docker compose down
docker compose pull
docker compose up -d

The database migrations will be applied automatically.

First edit your docker-compose.yml to point to the version you would like to migrate to.

image: lycheeorg/lychee:v5.1.0
image: lycheeorg/lychee:v5.1.2

Save and run the following.

Terminal window
docker compose down
docker compose pull
docker compose up -d

The migration will be applied automatically and you should be running the requested tagged version.

This update will be the one you have to use if you are following the Release channel.

  1. Download the newest Version
  2. Replace all existing files, excluding public/uploads/, public/dist/user.css and .env (and database/database.sqlite if using SQLite as your database)
  3. Go into the Diagnostic page (this will mostly happen automatically) and click on the Apply migration button.

Note: if using rsync to upload stuff to the web server, something like this might be used:

Terminal window
rsync -vrtz --delete --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --exclude=public/uploads/ --exclude=public/dist/user.css --exclude=.env --exclude=database/database.sqlite Lychee/ user@web.server.web:~/www/your_path_to/lychee/

Fully updating Lychee with git is the easiest way:

Terminal window
# download the lastst files
git pull
# update composer dependencies
composer install --no-dev
# apply the database migration
php artisan migrate
# update Node.js dependencies
npm install
# generate frontend assets
npm run build

If you have the post-merge hook set up the following is enough:

Terminal window
git pull