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: Make sure you're on supported hardware

PhotoStructure for Node is only tested on Ubuntu LTS (18.04), and requires a 64-bit CPU.

Step 3: Install Node.js

Install the “LTS” version:

PhotoStructure requires version 10 or later. We recommend the current LTS version, 12.13.

curl -sL | sudo -E bash -;
sudo apt update;
sudo apt install nodejs

If you prefer nvm, that works fine, too.

Step 4: Set up node-gyp

Follow the steps at

Step 5: Install required tools

sudo apt install -y build-essential python2.7-dev git dcraw perl ffmpeg libjpeg-turbo-progs sqlite3

PhotoStructure for Node has only been tested from Python 2.7 builds. VLC is not needed if FFmpeg is available.

Step 6: Create a role user

Consider creating a role user to run PhotoStructure, as you should do for any service.

sudo adduser --disabled-password photostructure

The following steps assume this role user is named “photostructure”.

This role user needs read access to where your photos and videos are, and write access to

  1. the directory that holds your PhotoStructure library
  2. ~photostructure/.config/PhotoStructure, and
  3. /tmp

(If you'd rather /var/tmp be used as a scratch directory, set the PS_TMP_DIR environment variable appropriately).

Step 7: Clone and run

This assumes you’re going to install photostructure into the new role user’s home directory, ~photostructure.

sudo -u photostructure bash;
cd ~photostructure;
git clone;

The first time you run, it will download and compile dependencies, which will take a minute, and then launch PhotoStructure. Subsequent starts will be much faster, unless there is a new release, which will be pulled down automatically and recompilation will happen as needed.

The output of will be a localhost URL to your library. Open the URL in your browser on that machine to finish setup.

Note that the PhotoStructure web service binds to localhost only by default, so if you want to access it elsewhere, you need to set the exposeNetworkWithoutAuth library setting to true, or set the environment variable PS_EXPOSE_NETWORK_WITHOUT_AUTH to 1. Note that as of version 0.6, there is no authentication functionality within PhotoStructure. This feature will be added in a subsequent release.

After the URL is emitted to the terminal, if you use the --pidfile $PIDFILE option, the process will daemonize and return you to your shell prompt.

Run photostructure-for-servers/ --help to get supported CLI options.

Shut down PhotoStructure

If you’re running in the foreground in a terminal, just hit ctrl-c.

If you’ve daemonized it with a --pidfile, run something like photostructure-for-servers/photostructure --stop --pidfile /var/run/