Lychee is a free photo management application that works just like Photos for Apple or Google Photos for Android. The only difference is that you can manage it on your own server and have full control and privacy. In this article, we will be guiding you through setting up Lychee so you can start storing your photos on your own cloud with ShellsTM.
First, we will need to make sure that we have apache, PHP and MySQL installed. For step by step instruction on this please click on the link below:
How to install LAMP stack on your Ubuntu Shell?
Also, if you would like to access Lychee remotely from anywhere you will need to purchase a public IP. Select the link below for more information
Once you have your web server installed, we can now move on to installing Lychee.
Creating a root password for MySQL
sudo mysqladmin -u root password Password
Replace "Password" with your own secure password. Example below:
Before moving on let's enable MySQL to start at boot and check its status to see if it is running.
sudo systemctl enable mysql
sudo systemctl status mysql
If it is not running, we will use the systemctl start command
sudo systemctl start mysql
Now let's move on to create a database for Lychee.
Log in to MySQL as root.
sudo mysql -u root -p
And create the database as below. You can replace lychee_db, shells_user, and SecurePass with your own user information.
Once we have confirmed MySQL is running and have created a database for Lychee, we will need to update the php.ini file to be able to handle the file processing of photos.
sudo nano /etc/php/8.0/apache2/php.ini
Once opened, make these changes to the file:
cd into your web directory.
cd var/www/html/
And use the wget command to download the Lychee files
Verify download with ls -a
Next, we will remove index.html and unzip Lychee-3.1.6.zip
Once files are uncompressed, let's move all of the installation files to the web root directory:
sudo mv -v Lychee-3.1.6/* Lychee-3.1.6/.* /var/www/html 2>/dev/null
Update ownership to avoid permission issues
sudo chown -R www-data:www-data * ./
restart apache
sudo systemctl restart apache2
We are now all set. We just need to log in with our database and user info we created earlier. You can do this by going to your web address if you have purchased a public IP or typing in localhost on your web browser.
Once connected, you will need to create a user account.
And that's it, you are now ready to manage your own photos on ShellsTM