How to Install Lychee on Void Linux

Lychee is a free and open-source photo management tool that enables users to organize, edit, and upload their photos to their website or cloud. In this tutorial, you will learn how to install Lychee on Void Linux.

Prerequisites

To successfully install Lychee on Void Linux, you will need the following:

Step 1: Install Required Dependencies

The first step is to install the required dependencies for Lychee. Use the following command to install them.

sudo xbps-install -S php7 php7-gd php7-mysqli php7-exif php7-curl php7-json php7-zip php7-mbstring

Step 2: Download and Extract Lychee

Download the latest version of Lychee from the official website or use the following command to download it:

wget https://github.com/LycheeOrg/Lychee/archive/master.zip

Extract the downloaded file using the following command:

unzip master.zip

Move the extracted directory to your web server's document root directory. For example, if you are using Apache, move the directory to /srv/http/.

sudo mv Lychee-master /srv/http/lychee

Step 3: Configure Database

Create a new MySQL or MariaDB database and user for Lychee. For example, to create a new database named lychee and user named lycheeuser, run the following commands:

mysql -u root -p
CREATE DATABASE lychee;
CREATE USER 'lycheeuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON lychee.* TO 'lycheeuser'@'localhost';
FLUSH PRIVILEGES;
exit;

Replace password with your desired password.

Step 4: Configure Lychee

Navigate to the Lychee installation directory and rename the data directory.

cd /srv/http/lychee
cp -r data data.bak
rm -rf data
mkdir data
chmod -R 777 data

Next, copy the config.php.example file and rename it to config.php.

cp includes/config.php.example includes/config.php

Edit the config.php file and modify the following fields with your database credentials:

$config['dbHost'] = 'localhost';
$config['dbUser'] = 'lycheeuser';
$config['dbPassword'] = 'password';
$config['dbName'] = 'lychee';

Restart your web server and PHP to apply the changes.

sudo service httpd restart
sudo service php-fpm restart

Step 5: Access Lychee

Finally, access Lychee by navigating to http://your-domain.com/lychee in your web browser. You should be able to log in and start uploading photos.

Congratulations! You have successfully installed Lychee on Void Linux.

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!