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:
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.
Create a MySQL root password and verify MySQL is running
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
Creating a database for Lychee
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.
CREATE DATABASE lychee_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'shells_user'@'localhost' IDENTIFIED BY 'UltraSecurePassword';
GRANT ALL PRIVILEGES ON lychee_db.* TO 'lychee_user'@'localhost';
Updating php.ini file
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/7.0/apache2/php.ini
Once opened, make these changes to the file:
max_execution_time = 300
post_max_size = 100M
upload_max_filesize = 50M
memory_limit = 256M
Installing the Lychee Files
cd into your web directory.
And use the wget command to download the Lychee files
sudo wget --content-disposition https://github.com/electerious/Lychee/archive/v3.1.6.zip
Verify download with ls -a
Next, we will remove index.html and unzip Lychee-3.1.6.zip
sudo rm index.html
sudo 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 * ./
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