These instructions are for installing Blue Twilight on your own server or hosting. If you are using Blue Twilight Cloud, you don’t need to install anything – simply access your gallery at the link provided in your welcome email.

Step 1: Download the latest release

The first step is to obtain the current version of Blue Twilight. You can download a zip file containing the latest release from the Releases page on the project’s website.

Step 2: Upload to your server or hosting

Extract the zip file and upload the contents to your server or web hosting. Due to the number of files, it’s recommended to upload the zip file and extract it on your server or hosting – most modern file-transfer tools allow you to do this.

It’s important that the web server has read/write access to the folder you upload Blue Twilight to. Shared hosting packages tend to set the ownership on the files correctly. If you use a dedicated server or VPS, you may need to run a command similar to the below:

(This command is correct for Ubuntu Linux – replace “www-data” with the user your web server runs as.)

sudo chown -R www-data:www-data /path/to/blue-twilight && sudo chmod -R 0755 /path/to/blue-twilight

Step 3: Configure document root

Blue Twilight is written using the Laravel framework which, for security reasons, requires the application’s web root directory to be the “public” sub-directory.

If you run a dedicated server or VPS, this is easy to set up in a virtual host – simply set the DocumentRoot property in your Apache configuration:

<VirtualHost *:80>
    DocumentRoot /path/to/blue-twilight/public
    <Directory "/path/to/blue-twilight/public">
        allow from all
        Require all granted

Unfortunately this process varies significantly for shared hosting – your hosting provider should be able to help you.

Step 4: Perform the install

Browse to the web address that corresponds to the Apache VirtualHost or domain on your shared hosting. You should see a screen similar to the below:

Click the “Install Composer and dependencies for me” button and wait for the results.

This can take up to 5 minutes, so please be patient!

Once the dependencies have been installed, Blue Twilight will perform a quick check of your system and provide the results. If you get all green ticks, you are good to go.

If any items fail, you’ll need to fix them and refresh the page to continue. If you’re running Blue Twilight on shared hosting, you may need to seek help from your hosting provider.

Step 5: Create a MariaDB/MySQL database

The next step of the installation is to connect to your database. You’ll need a blank database already configured, and a username and password to use to connect to it.

If you have access to the MySQL console, here is a sample script to create a blank database called “blue_twilight” and a username called “blue_twilight”. Remember to replace “some-random-password” with your desired (ideally randomly-generated) password!

CREATE DATABASE blue_twilight CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'blue_twilight'@'%' IDENTIFIED BY 'some-random-password';
GRANT ALL ON blue_twilight.* to 'blue_twilight'@'%';

Blue Twilight will connect to your database and, if all is well, create the associated tables. The next step is to create your default administrator account to allow you to login and upload your photos!

Step 6: Login and configure your application

Once the installation is finished, you’ll be taken to your new photo gallery’s home page. It will be empty to begin with.

Click the “Login” link in the top menu bar and login with the e-mail address and password you created in step 5. You can then click “Manage” in the menu bar and start configuring your application.