These are instructions for advanced users, wanting to run PhotoStructure for Servers.

Please make sure you've read the pros and cons of both approaches before continuing.

Step 1: Accept the license

Please read and accept the end-user license agreement. Installing and running PhotoStructure indicates your agreement to all terms in the license.

Step 2: Install both Docker and docker-compose

Follow these instructions for docker and these instructions for docker-compose. We use docker-compose to automatically upgrade PhotoStructure.

You’ll need a version of docker-compose that can handle version 3.

Step 3: Download the start script

Open a terminal, and run:

mkdir -p $HOME/photostructure;
cd $HOME/photostructure;
wget https://photostructure.com/server/start-docker.sh;
chmod +x start-docker.sh;
wget https://photostructure.com/server/photostructure.env;

Step 4: Configure your PhotoStructure directories

In a text editor, edit photostructure.env to suit your system.

You may only need to change the LIBRARY value, but make sure you read through the whole file.

Step 5: Start PhotoStructure

Open a terminal and run

cd $HOME/photostructure;
start-docker.sh

By default, start-docker.sh builds a docker-compose.yml file and then runs docker-compose start. If you'd rather run the script in the foreground, run start-docker.sh up. If you just want to see the configuration file it creates, run start-docker.sh config.

Step 6: Welcome to PhotoStructure!

Open a browser to http://localhost:1787 to complete installation.

How to stop PhotoStructure

Open a terminal and run

cd $HOME/photostructure;
docker-compose stop

Uninstalling PhotoStructure

  1. Run docker-compose down to remove PhotoStructure images from your local docker image cache. Careful: do not use the -v option, as that deletes all volume mountpoints.
  2. As you see fit, remove your LIBRARY, CONFIG,  LOG, and TMP directories, but take care not to delete photos and videos you want to keep! If you want to keep the originals in your library, but remove PhotoStructure's preview images and videos, you can delete the $LIBRARY/.photostructure/previews directory.

But, I don’t want to run with docker-compose!

You can run the photostructure/server image without docker-compose, but:

  • ensure you always pull the latest version (we provide no support for older versions)
  • you’ll need to ensure all volume mount points in the Dockerfile are satisfied.

To simplify this work, download the start-docker.sh script using the instructions above, and then run start-docker.sh config. Examine the resulting docker-compose.yml and note the following:

  1. /ps/config needs to point to a directory on your host machine (like $HOME/.config)
  2. /ps/library needs to point to the directory on your host machine with a lot of free disk space
  3. /ps/tmp should point to afast, local disk on your host machine that has several gigs free
  4. If your library directory doesn't already have the photos and videos you want in your PhotoStructure library, add them as volumes, and then add the docker image mountpoints to your SCAN_PATHS. Alternatively, set PS_SCAN_ALL_DRIVES to 1, and let PhotoStructure find your mountpoints automatically.

Photo by Andrew Bain