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 Cloud is now available!
Host your photos in the cloud - no servers or technical know-how required.
Register and find out more on the brand-new website:

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. Use any web browser (desktop or mobile) to upload photos or manage your photo gallery.
  • Flexible. Store the original photo files on your server or on cloud storage providers such as Memset, Rackspace or Amazon.
  • Theme-able. Override any view with your own using the simple theme system.


I’m a keen (amateur) photographer. I have over 10GB worth of photographs that I’ve taken over the years; photos 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.


Other Apps by Andy

Simply Remind Me

Free e-mail and SMS (text messages) reminders service.

Solid Tools for Developers

Online debugging and diagnostic tools for software developers.


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.