Updating Lychee
The way you can update Lychee depends on how you did your installation:
- If you used Docker, go to Using Docker compose
- If you used the release channel (downloading a zip file), go to Update manually
- If you installed via
git clone, go to Update using Git
- 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.
Using Docker compose
Section titled “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.
With Rolling update tag
Section titled “With Rolling update tag”This procedure is for those following one of those tags:
latest— the last official releaseedgeormaster— the last build from themasterbranch
Simply run the following.
docker compose downdocker compose pulldocker compose up -dThe database migrations will be applied automatically.
With version tag.
Section titled “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.0image: lycheeorg/lychee:v5.1.2Save and run the following.
docker compose downdocker compose pulldocker compose up -dThe migration will be applied automatically and you should be running the requested tagged version.
Update manually
Section titled “Update manually”This update will be the one you have to use if you are following the Release channel.
- Download the newest Version
- Replace all existing files, excluding
public/uploads/,public/dist/user.cssand.env(anddatabase/database.sqliteif using SQLite as your database) - Go into the
Diagnosticpage (this will mostly happen automatically) and click on theApply migrationbutton.
Note: if using rsync to upload stuff to the web server, something like this might be used:
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/Update using Git
Section titled “Update using Git”Fully updating Lychee with git is the easiest way:
# download the lastst filesgit pull# update composer dependenciescomposer install --no-dev# apply the database migrationphp artisan migrate# update Node.js dependenciesnpm install# generate frontend assetsnpm run buildIf you have the post-merge hook set up the following is enough:
git pull