Self Hosted Private Photo Gallery with Chevereto
Welcome Chevereto fans!
In this episode of Breaking Up With Big Tech we bring you a quick setup guide for your own self hosted private photo gallery using popular photo hosting software, Chevereto. Chevereto comes in two flavors
- Chevereto is a commercial software product available at a very reasonable rate.
- Chevereto-Free is the open source fork of the commercial product. Chevereto-Free removes features such as external storage (Amazon S3, Google Cloud, etc), as well as the social media functions.
This guide will cover Chevereto-Free.
You will need your own domain name, and a either a physical or virtual server. You will also need to configure a DNS record pointing to your physical or virtual server. In this example we will use photos.yourdomain.com, and we assume a Debian/Ubuntu host. Replace yourdomain.com in the examples below with your own domain.
Apache VirtualHost
Create DocumentRoot
First we need to create a directory to hold the Chevereto installation files.
$ sudo mkdir -p /var/www/vhosts/photos.yourdomain.com/docs
VIrtualHost Configuration
Now create a new Apache VirtualHost configuration file in /etc/apache2/sites-available/photos.yourdomain.com.conf
<VirtualHost *:80>
ServerName photos.yourdomain.com
ServerAlias photos.yourdomain.com photos.yourdomain.com
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301]
</VirtualHost>
<VirtualHost *:443>
ServerName photos.yourdomain.com
ServerAlias photos.yourdomain.com photos.yourdomain.com
ErrorLog logs/photos.yourdomain.com-error.log
CustomLog logs/photos.yourdomain.com-access.log combined
LogLevel warn
DocumentRoot /var/www/vhosts/photos.yourdomain.com/docs/
<Directory /var/www/vhosts/photos.yourdomain.com/docs>
Require all granted
AllowOverride All
</Directory>
# HSTS (mod_headers is required) (15768000 seconds = 6 months)
Header always set Strict-Transport-Security "max-age=15768000"
SSLCertificateFile /etc/letsencrypt/live/photos.yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/photos.yourdomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
Alias /icons /usr/share/httpd/icons
<Directory /usr/share/httpd/icons>
Require all granted
</Directory>
Alias /error /usr/share/httpd/error
<Directory /usr/share/httpd/error>
Require all granted
</Directory>
</VirtualHost>
Securing the VirtualHost with LetsEncrypt
$ sudo letsencrypt certonly --standalone --agree-tos --renew-by-default --email hostmaster@yourdomain.com --domains photos.yourdomain.com
Restart Apache
$ sudo systemctl restart apache2
This completes the Apache configuration. On to installing Chevereto-Free
Deploying Chevereto-Free
Create Chevereto Database
Chevereto uses MySQL (MariaDB) to store information about your images, albums and more. To create the database connect to your MySQL (MariaDB) server and create the database:
MariaDB [(none)]> create database chevereto;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> grant all on chevereto.* to chevereto@localhost identified by "YOUR_DATABASE_PASSWORD";
Query OK, 0 rows affected (0.002 sec)
Download Chevereto-Free
Download and unpack Chevereto-Free from Github and unpack the zip file.
$ curl -L -o chevereto-free-master.zip https://github.com/Chevereto/Chevereto-Free/archive/master.zip
$ unzip chevereto-free-master.zip
$ sudo mv Chevereto-Free-master/* Chevereto-Free-master/.??* /var/www/vhosts/photos.yourdomain.com/docs/
$ sudo chwon -R www-data /var/www/vhosts/photos.yourdomain.com/docs/
Download Chevereto Installer.php
The developer of Chevereto has created an easy to use installer script to do the work of installing the software. Download the script to your server for installation.
$ curl -L -o installer.php https://raw.githubusercontent.com/Chevereto/installer/master/installer.php
$ sudo mv installer.php /var/www/vhosts/photos.yourdomain.com/docs/installer.php
$ sudo chown www-data /var/www/vhosts/photos.yourdomain.com/docs/installer.php
Run Chevereto Installer.php
Now point your favorite browser to https://photos.yourdomain.com/installer.php.
When prompted for a license key, click the button to use Chevereto-Free
This guide does not support cPanel. Skip cPanel.
Provide the database connection details from the earlier MySQL (MariaDB) database creation step.
Provide the administrator user’s details
Configure appropriate email addresses for Chevereto-Free to use when sending emails.
Finish the installation process.
When completed, click the “Go To Dashboard” button
Chevereto-Free Dashboard
Set Website to Private mode
Navigate to https://photos.yourdomain.com/dashboard/settings
Here, scroll down to the bottom of the “Website” options, set “Website privacy mode” to “Private” and click the “Save changes” button.
Increase allowed upload size
Chevereto-Free only allows 2MB photo uploads by default. This value must be increased for high resolution photos.
Next Steps: Upload Photos, Create Albums, Invite Friends!
Your Self Hosted Private Photo Gallery with Chevereto is now ready to use.
Point your browser to https://photos.yourdomains.com/upload to begin adding photos.
Create albums to organize your photos
Invite friends and family to share your photos. Create your own online photo sharing community for your closest friends and relatives.
Wrap-Up
Chevereto is a great online photo album application. Chevereto-Free offers most features that an individual user or small group are likely to need, and there are no licensing costs at all.
We hope this guide has been useful in helping you end your abusive relationship with Big Tech by starting your own self hosted private photo gallery with Chevereto.
Free Stuff!
Be sure to become a subscriber to be notified of additional tutorials and guides that will help you in Breaking Up with Big Tech. All new subscribers receive free cloud credits!