How to Install Lychee on Debian Latest

Lychee is a free and open-source photo management application. It allows users to upload, organize, and share their photos on their own servers. In this tutorial, you will learn how to install Lychee on Debian Latest in a few simple steps.

Prerequisites

Before installing Lychee, make sure you have the following:

Step 1: Update Your System

Before installing any new software, it is always recommended to update your system to the latest version. You can update your Debian system by running the following command:

sudo apt-get update && sudo apt-get -y upgrade

Step 2: Install Required Packages

To run Lychee, you need to install some packages on your Debian system, including PHP, MySQL, and other dependencies.

sudo apt-get install -y apache2 mariadb-server php-mysql php-gd php-curl php-xml php-zip unzip

Step 3: Download and Install Lychee

  1. Download the latest version of Lychee from the official website using the following command:
wget https://github.com/LycheeOrg/Lychee/archive/master.zip
  1. Move the downloaded file to the Apache or Nginx web server root directory.
sudo mv master.zip /var/www/html/
  1. Navigate to the web server root directory and extract the downloaded file using the following command:
sudo cd /var/www/html/
sudo unzip master.zip
  1. Rename the extracted folder to "lychee" and set the appropriate permissions.
sudo mv Lychee-master lychee
sudo chown -R www-data:www-data lychee/

Step 4: Configure the Database

  1. Login to the MySQL or MariaDB database management system using the root user.
sudo mysql -u root -p
  1. Create a new database and a new user.
CREATE DATABASE lychee;
CREATE USER 'lycheeuser'@'localhost' IDENTIFIED BY 'lycheepassword';
GRANT ALL PRIVILEGES ON lychee.* TO 'lycheeuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Configure PHP Settings

  1. Open the PHP configuration file using your favorite text editor.
sudo nano /etc/php/7.X/apache2/php.ini
  1. Search and modify the following values:
upload_max_filesize = 20M
post_max_size = 20M
memory_limit = 512M
  1. Save the file and exit the text editor.

Step 6: Configure the Apache or Nginx Web Server

  1. Create a new virtual host configuration file for Lychee using the following command:
sudo nano /etc/apache2/sites-available/lychee.conf
  1. Add the following lines to the file, and save it:
<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html/lychee
    <Directory /var/www/html/lychee/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/lychee_error.log
    CustomLog ${APACHE_LOG_DIR}/lychee_access.log combined
</VirtualHost>
  1. Enable the Lychee virtual host configuration file and reload the Apache web server.
sudo a2ensite lychee.conf
sudo systemctl reload apache2

Step 7: Accessing Lychee

Lychee is now installed and configured on your Debian system. You can access it by navigating to your server's IP address or domain name (e.g., http://yourdomain.com) in a web browser.

Congratulations! You have successfully installed Lychee on Debian Latest. Enjoy your photo management experience!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!