Skip to content

Installation FAQ

How can I install Lychee without SSH access?

Section titled “How can I install Lychee without SSH access?”
  1. Download the latest release
  2. Extract and upload the folder via FTP
  3. access the website

If you are at the wrong address you will be told to go to the public folder. Once open, you will be redirected to the install procedure. Completed you will be able to create an admin account and enjoy Lychee.

How do I upgrade from Lychee v3 to Lychee v4?

Section titled “How do I upgrade from Lychee v3 to Lychee v4?”

The process is described here.

To back up your Lychee installation you need to perform the following steps:

  1. Create a copy of at least the following parts of the Lychee directory tree (e.g., /var/www/html/Lychee):
.env
public/dist/user.css
public/uploads/
  1. Dump the Lychee database to a file. E.g., if you are using MySQL, run:
Terminal window
mysqldump -u user -ppassword --databases lychee_database > lychee_backup.sql

Replace user, password, and lychee_database by the values of DB_USERNAME, DB_PASSWORD, and DB_DATABASE from the .env file in the Lychee folder.

How can I migrate my installation to a new host?

Section titled “How can I migrate my installation to a new host?”
  1. Back up your installation as described above
  2. Download the latest release of Lychee.
  3. Overwrite the files with your back up
  4. Restore the database on the new host, e.g., for MySQL: mysql -u user -ppassword < lychee_backup.sql

Can I host Lychee with a subpath with Nginx? Like https://example.dev/lychee/

Section titled “Can I host Lychee with a subpath with Nginx? Like https://example.dev/lychee/”

Yes, here is a configuration to help you:

location ^~ /lychee {
alias /var/www/lychee/public;
index index.php;
try_files $uri $uri/ @lychee;
location ~ \.php$ {
if (!-e $request_filename) {
rewrite ^/lychee/?(.*)$ /lychee/index.php?/$1 last;
break;
}
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
location @lychee {
rewrite /lychee/(.*)$ /lychee/index.php?/$1 last;
}

Can I host Lychee with a subpath with Apache? Like https://example.dev/lychee/

Section titled “Can I host Lychee with a subpath with Apache? Like https://example.dev/lychee/”

Yes, the process is described here.

From #311

Short answer: Lychee will work without a writable app/ folder.

The minimum set of directories that need to be http-writable is as follows:

storage/
public/uploads/small
public/uploads/big
public/uploads/thumb
public/uploads/medium
public/uploads/import
public/dist

Can I migrate from a 64-bit system to a 32-bit system?

Section titled “Can I migrate from a 64-bit system to a 32-bit system?”

Yes, but it’s not trivial or recommended. After copying the database:

  1. Download this file to your database/migrations/ folder.
  2. Run the SQL command delete from migrations where migration='2019_04_07_193345_fix_32bit'; to make sure it will run.
  3. Run php artisan migrate. This should run a one-off migration that was originally added to allow 32-bit systems to migrate from Lychee v3.

This will only work on top-level albums. Subalbums will require manual intervention.

How can I stop artisan migrate and composer from running after every git pull?

Section titled “How can I stop artisan migrate and composer from running after every git pull?”

We’ve set composer to install git pre-commit and post-merge hooks by default.

  • The pre-commit is to help developers by checking and fixing and code style problems before they hit our testing. If you aren’t committing and changes, this will not be run.
  • The post-merge ensures that your dependencies and database version are kept current. This can be disabled by creating a file .NO_AUTO_COMPOSER_MIGRATE in your Lychee root and deleting (if necessary) .git/hooks/post-merge. If you disable this script, you will need to run composer and artisan migrate manually.