Blue Twilight: PHP photo gallery

Open-source self-hosted PHP photo gallery software, using MariaDB/MySQL. A great alternative to Instagram, Flickr, Twitter and Facebook.

Blue Twilight is an open-source, self-hosted photo gallery web application written in PHP and using MariaDB or MySQL for data storage. You run the PHP photo gallery on your own server or web hosting - so you are in full control over who can access your images.

Blue Twilight is:

  • Simple to use. Any web browser (desktop or mobile) can be used to upload photos or manage your photo gallery.
  • Flexible. Photo files can be stored on your server or on cloud storage providers such as Memset, Rackspace or Amazon.
  • Theme-able. A simple theme system allows you to override any view with your own.

I'm a keen (amateur) photographer and I have over 10GB worth of photographs I've taken over the years, that I want to show off to the world.

They are definitely nothing amazing, but they're mine and I want people to see them. I don't want to upload the originals to photo-sharing websites such as Flickr or Instagram, or social media sites like Facebook and Twitter.

For years I've used open-source PHP photo gallery software such as Gallery 3, Piwigo and Zen Photo. One of the things I've noticed is that these tools stagnate. Gallery 3 is no longer with us (RIP) and Piwigo and Zen Photo (the current best alternatives) both lack cloud support (Rackspace, S3, OpenStack.)

So - as an experienced developer - I wrote my own. Here it is: Blue Twilight.


Mobile Friendly

Built to work well on smartphones, tablets and desktop PCs and Macs.


Runs on your own server or web hosting - you keep full control of your images.

Public and Private Galleries

Proudly show your photos to the world or keep them just for you? You choose!

Restrict Access to Originals

Protect your original artwork by restricting visitors access to the full-size, original image uploaded.


Runs on PHP and MariaDB (or MySQL) - supported by the majority of web hosts. The source code is also open and freely-available.

Local or Cloud Storage

Stores images locally on the server or uploads to cloud storage. Where available, uses the cloud provider's CDN to reduce bandwidth used by images.


Current Release

23rd Apr 2017
Download | Release Notes