Laravel Laravel
  • Prologue

    • Release Notes
  • Getting Started

    • Installation
    • Configuration
    • Docker
    • Update
    • Upgrade from v3
  • Advanced Topics

    • Settings
    • Keyboard Shortcuts
    • Advanced Setups
    • Honeypot and Teapots
    • External tracking with Matomo,
      Google Analytics & Co
  • Frequently Asked Question

    • General
    • Installation, migration, upgrade, update
    • Troubleshooting
  • Contributing

    • Contribution Guide
    • API Documentation
    • Lychee logic overview
    • Directory Structure
    • Front-end
  • Laravel

Update

  • Update requirements
  • Update using Git
  • Using Docker compose
  • Update manually
  • Update via the GUI

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

  • If you used the release channel (downloading a zip file), go to Update manually
  • If you installed via git clone then you can either use a similar process or do it directly online via the Graphical User Interface of Lychee.

Update requirements

  • 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.

Update using Git

Fully updating Lychee with git is the easiest way:

# download the lastest 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:

git pull

Using Docker compose

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.

{tip} When using docker, a version rollback is difficult to apply: it requires to bash into the container to run the required migrate commands on the new version before dropping the tag to the previous value.

With Rolling update tag

This procedure is for those following one of those tags:

  • latest — the last official release
  • nightly or dev — the last build from the master branch (peer reviewed)
  • alpha — the last build from the alpha branch (no peer review)

Simply run the following.

docker compose down
docker compose pull
docker compose up -d

The database migrations will be applied automatically.

With version tag.

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.

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.

Update manually

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 and click on the Apply migration button.

Update via the GUI

This requires:

  • git to be installed
  • write access for your web user (www-data for apache2) to all the folders, files and .git/.
  • exec to be available as a php function.
  • allow_online_git_pull has to be set to 1

1. Go to your Diagnostic page and check for updates

Notice that Lychee version (git) tells you:

  • the commit number — "dfad796",
  • which branch you are on — "master",
  • you do not have information if you are up to date or not — "Data not in Cache".

However you should see a "check for Updates" button:

If you click on it, it will ask your server to check how far behind you are from the bleeding edge version of Lychee:

2. Refresh your Diagnostic page

Notice that Lychee version (git) now tells you:

  • that you are behind — "1 commits behind master (dc5f03a)"
  • that the last check for update was done some times ago — "(9 seconds ago)"

3. Apply the update

By clicking on "Update available" this will trigger server side a git pull and artisan migrate.

You can see the log result of the command line printed above the diagnostic information. By default composer calls are disabled.

4. Check for updates

We can once again check for updates:

And we are done.

{tip} Caught a mistake or want to contribute to the documentation? Edit this page on Github!