Friday, December 2, 2016

How to Self Host Images and Photos with Lychee

Prerequisites:

Run updates:

> sudo apt-get update
Install LAMP
Go ahead and install Apache, PHP and MySQL using these commands:

> sudo apt-get install apache2
> sudo apt-get install php

> sudo apt-get install mysql-server

> sudo apt install php libapache2-mod-php
If you are asked to create a username and password for MySQL, make a note of this as you’ll need it later.

To configure Lychee, we need make sure that the following list of extensions is enabled in our PHP build:

session
exif
mbstring
gd
mysqli
json
zip
To see what extensions are pre-enabled on your box, type this command:

> sudo php –m
In my test, my VPS was missing mbstring, gd, mysqli and zip. Let’s get these enabled.

I ran:

sudo apt-get install php-cli php-gd php-mysqlnd php-curl php-json php-zip php-mbstring
For good measure, let’s restart apache.

> sudo service apache2 restart
Let’s confirm that the extensions are enabled

> sudo php –m
According to my output, all of the prerequisites now seem to be installed. If you are missing some of the other prerequisites, you might have to do some Googling to get the exact command you need.
Now we must adjust the PHP.ini file in order for Lychee to work properly. Use the following command:

> nano /etc/php/7.0/apache2/php.ini
You’ll want to find the following lines and change it to these settings:

max_execution_time = 200

post_max_size = 100M

upload_max_size = 100M

upload_max_filesize = 20M

memory_limit = 256M
Hint, you’ll be able to use CTRL+W to find these terms in Nano editor. You’ll simply find these values and change them and save the PHP.ini file.

Hit CTRL+O to save and select yes. You’ll want to hit CTRL+X to exit. It’s a good idea to reload Apache using the command we used previously to do so.

From here, we can clone the Lychee files onto the VPS. Use the following sequence of commands:

> cd /var/www/html

> git clone https://github.com/electerious/Lychee.git

> chown -R www-data:www-data /var/www/html/Lychee
Then change the permissions of the upload directory.

> cd Lychee

> sudo chmod -R 777 uploads/ data/
From here, let’s restart Apache one more time.

> sudo service apache2 restart
Congrats, you’ve installed Lychee. Let’s login to the app to continue configuring your new photo sharing application self-hosted on your VPS.

In your browser, go to http://<IPADDRESS>/Lychee

You’ll be asked for a server name, database username, database password and database name. If you’ve followed these instructions, you should simply enter in the database username and password that you created in a previous step and leave the rest of the fields blank.

Once this is complete, you’ll be able to create an administrative username and password for the Lychee app.

Now that the application setup is complete, you can begin uploading your photos onto your privately administrated virtual private server. For more information about Lychee, visit the project’s page on GitHub.



Photo-Management
lychee.electerious.com
Screenshot of Lychee

Self-hosted photo-management done right

Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.

Manage

Managing your photos has never been easier. Upload, move, rename, describe, delete or search your photos in seconds. All in one place, right from your browser.

Share

Sharing like it should be. One click and every photo and album is ready for the public. You can also protect albums with passwords if you want. It's under your control.

View

Look at all your images in full-screen mode, navigate forward and backward by using your keyboard or let others enjoy your photos by making them public.

Open

Lychee is completely open-source. Everyone can take advantage of the work we have already done and improve it. We are open for every suggestion or help.

Secure

Your server, your data, your rules. Never depend on someone else. Lychee is a self-hosted solution, so you are in the full control of your photos.

Beautiful

Our goal was to create a web app everyone can use. Lychee works intuitive and comes with a stunning, beautiful interface.

Made for photographers

Lychee is the perfect place to store all your photos. No storage limit, no compression, no loss in data. We even support and display your EXIF and IPTC Metadata. And if you want, you can make your photos public for your audience. With just one click.

EXIF

Get the most out of our photos. Lychee supports EXIF and IPTC Metadata. Always available one click away. Clearly listed next to all other information.

Import

Import your photos from various sources. From you local computer, server, via URL or even from your Dropbox.

Tag

Never lose one of your photos in the depth of your albums. Tag them or mark them as important. Every single photo or all selected photos at once.

No comments:

Post a Comment