In this tutorial we’ll be using the Ubuntu server. This is not to say that Lychee will not run on other Linux server operating systems. The instructions are essentially the same, minus a few package changes. Just make sure you have MySQL, the latest PHP and Apache2 (or Nginx).
Hardware Requirements
a Linux server distribution that has the ability to run and install snapd any moderately-powerful old desktop PC (DDR-2 era or better) that can stay on at all times and act as a server a VPS or any other type of enterprise-grade server
Installing Ubuntu Server
Go to Ubuntu’s website and download the latest version of Ubuntu Server. After downloading it, make a live installation tool with Etcher. Follow the instructions on the website. Using it is a three-step process. Alternatively, burn the Ubuntu disc image to a DVD or CD.
Using the BIOS on the server, change the boot order so that the Ubuntu Server installation medium loads first. Keep in mind that the BIOS button is different (some are DEL, F2 or ESC) on every machine, so refer to your manual to be sure of the correct button. The Ubuntu Server installation disk is loaded. As a result, a selection menu appears with several options. Select “Install Ubuntu Server” to move onto the installation.
On the next page Ubuntu server asks the user to select the correct language. Using the arrow keys, find your language, then press Enter.
Next, set a hostname for Ubuntu server. Name it “ubuntu-lychee,” “ubuntu-server,” “ubuntu,” or something similar. This is mainly to identify the device on the network from other computers.
Add a username to the server as well as a memorable, secure password.
After setting the username, Ubuntu server brings up the partition manager. Using the arrow keys, select “guided – use entire disk” and press the Enter key. This will allow Ubuntu Server to automatically partition everything.
After the base-installation, Ubuntu server prompts the user to select packages to install. Using the arrow keys to hover over an option, press the spacebar to select. Select LAMP server, standard system utilities and OpenSSH server. Then, wait for the installation to complete. When the installation is finished, restart the machine. Note: installing the LAMP server package will prompt you to add a MySQL root password. Enter a secure, memorable one as it will come in handy later.
Installing Lychee
First, log into MySQL with the root password set up earlier. This will give you root access in MySQL. Now create the Lychee database. Then, change the permissions on the database; add a database user and password. Lastly, flush the privileges, and exit MySQL. Create an Apache2 configuration file. Paste the following: Then save by pressing “Ctrl + O” on the keyboard. Restart apache2. Install git, some PHP addons and grab the Lychee code. Once the installation is done, go to the Apache web folder: Grab the Lychee code: Lastly, change the permissions.
Setting Up Lychee
Use ifconfig to find the local IP address, then enter the IP address into a web browser to access Lychee (something like http://local.ip.address/Lychee). When the Lychee web interface loads, it asks you to specify the SQL database, user and password.
For user: lycheeuser For database: lychee For password: enter the password that was set during the database creation process.
After filling out the information needed, you’ll need to create a login. Enter a username and secure password, then click “Create.”
Using Lychee
Adding photos to your Lychee server is easy! Upload a folder by clicking the “+” sign, then clicking the “Upload” button. From here, browse for your photo and upload it. You should see your new photo in the “unsorted” album instantly.
Create Album
Create a new photo album by clicking the “+” icon, then clicking “Create Album.” To upload to any album, select it in Lychee, then go to the “+” sign and click the “Upload” button.
Import Via Link
Lychee supports uploading via the Web. Find a direct link to any image on the Internet, then click the “+” icon and “Import via Link” to upload the image directly to your photo library.
Other Ways to Import
Besides uploading via Link, Lychee also supports other ways to import. To import a massive amount of photos at once, click “Import via server,” then place the photos in a folder on the server, specify it’s location and click the Import button.
It is also possible to upload via Dropbox. Click the gear icon in the top-left corner, then select “Setup Dropbox.” Follow the onscreen instructions to link Dropbox. When linked, click the “+” sign to import photos into the Lychee library via Drobox.
Conclusion
Online photo management has gotten better in the last few years, but there really hasn’t been many good self-hosted, easy-to-use alternatives Linux users can use – until now. That’s why I’m glad Lychee is around, as it makes it easy for anyone to set up their own online photo system that rivals something that Google or Microsoft would come up with.