web-based photo library management software
Go to file
2021-08-23 20:39:19 -07:00
assets/img Fix img assets missing in docker 2019-07-06 13:47:42 -07:00
photoapp complete thumbservice auth, docs, parallelism, and client 2021-08-22 15:47:15 -07:00
styles/less make search pager match main feed 2021-08-23 20:39:19 -07:00
templates make search pager match main feed 2021-08-23 20:39:19 -07:00
.dockerignore fix tag renaming not updating ui sidebar 2019-11-14 21:40:58 -08:00
.gitignore fix tag renaming not updating ui sidebar 2019-11-14 21:40:58 -08:00
Dockerfile update nodejs 2021-07-15 13:50:48 -07:00
gruntfile.js Make packaging work 2018-09-09 16:45:51 -07:00
package-lock.json pure-css 2.0 2021-08-15 19:04:55 -07:00
package.json pure-css 2.0 2021-08-15 19:04:55 -07:00
README.md complete thumbservice auth, docs, parallelism, and client 2021-08-22 15:47:15 -07:00
requirements.txt add search view 2021-07-14 15:57:42 -07:00
setup.py thumb server base work 2021-08-18 22:23:43 -07:00


Cloud-native photo and related media library software, with a focus for photography hobbyists.

Photolib provides a simple, rich, and modern UI to manage your photo and video library. It can scale to host hundreds of thousands of photos but is also light and simple enough to host just the couple photos you shoot with your smartphone.

Photolib stores images as a logical "photoset". This allows identical images and metadata to be grouped into one item. Many photographers shoot in multiple formats - that is, to produce multiple files per click of the shutter. A JPEG and a RAW of some sort (Like Canon's CR2) is common. The primary idea behind Photolib's organization is that one click of a camera shutter equals one photoset.

When photos are imported - assuming they are done in the same batch - files are grouped based on their name and extension, using rules that apply to almost every camera format. For example, a camera shooting under the "multiple formats" mode described above would create, from one shot, IMG_1234.JPG and IMG_1234.CR2. Photolib would detect that since these two images have the same file name (the IMG_1234 part), they are the same photo and should be grouped into a photoset.

In addition to controls in the web interface, Photolib provides both a REST API and command-line tools to manage your photo library.


Pre-built releases are not currently available. See Dockerfile for a step-by-step installation from source.

The general steps are:

  • npm install - install modules needed to build the frontend assets
  • grunt - build the frontend assets
  • pip3 install -r requirements.txt - install python dependencies
  • python3 setup.py install - install Photolib and command line tools

Note that the npm and grunt steps can be skipped if you're not planning to run the web UI (e.g. you want only the command-line tools).


After installation, run the server:

  • photoappd --port 8080 --library file://./library --database sqlite:///photos.db --cache ./cache

Arguments are as follows:

  • --library file://./library - file storage uri, in this case the relative path ./library
  • --database sqlite:///photos.db - Sqlalchemy connection uri
  • --cache file://./cache - storage uri to use as a cache for things like thumbnails. It can be the same as the library
  • --port 8080 - listen on http on port 8080
  • --thumb-service - optional address of thumbnail service - see below.

Supported library uri schemes are:

  • file - relative (as above) or absolute file paths - file:///srv/library.
  • minio - minio://username:password@host/bucket_name/path/prefix

Photolib is tested with Minio, but should work with S3. For the database, minio is tested with SQLite and MySQL (using the mysql+pymysql:// driver).

Next, the photousers command can be used to create a user account. Login information is necessary to see images marked as private or upload images. You may want to run this before starting the server, but either order works.

  • photousers create -u dave -p mypassword

That's it - you've set up Photolib! Next steps from here would be to the other command line tools to import media.

Besides browsing, most interaction with Photolib will be done using its CLI tool, photocli. Note that server address, username, and password details need to be provided to the cli via a url flag not shown here. See photocli --help for more information.

Optional: Photolib uses a secondary service to generate thumbnails for video files. After the above installation instructions are complete, run photothumbd on a differnet port with the same arguments. On first run, it will create a user for internal communications and log the username/password. This username/password must be used in the --thumb-service for photoappd.


  • photocli ingest - import new photos into the library:
$ photocli ingest photos/*.jpg raws/*.cr2

or add a new format to an existing photo:

$ photocli ingest -c 52679a30-cee4-45c4-8d83-80ee92242e1c photos/*.jpg
  • photocli checkdupes - scan files and print those not already in the library:
$ find source -type f -exec shasum -a 256 {} \; | tee shas.txt
544b5a4f3898abae73260930ee70931a3992c048649692cef89b37576e886f69  source/2018-12-09 13.52.22.jpg
d2c2c30ca4986d364026644881d667162031008e60aac6a69d7b18230b7ea98c  source/2019-04-08 20.05.02.jpg
9d42859ed92d7fb978cf73b41293480e1eab03d2d3a14c185c4daf3a49d324ab  source/2019-06-19 16.28.07.png

$ photocli checkdupes --sha-files shas.txt

TODO: support not using --sha-files.

This command, along with ingest, allows for fun tool combinations like so:

photocli checkdupes --sha-files shas.txt | xargs -d "\n" photocli -y ingest

This would ingest all the files listed in shas.txt that aren't already in the database.


  • On map page, provide a link back to the mapped set

  • Flesh out CLI:

    • data manipulation
      • combine photosets
      • split photosets
    • Relink function - make a photo a member of another photo
    • Config that is saved somewhere
    • Album features
    • Support additional fields on upload like title description tags etc
    • delete features
    • tag features
      • Tag on import
    • modify features (tags & images)
    • "Batch" tag on import
      • Generate a tag on import
      • Save it in config and re-use it (if passing --same-batch)
      • photos imported as a batch will be under 1 tag
  • Longer term ideas:

    • "fast ingest" method that touches the db/storage directly. This would scale better than the API ingest.
    • Dynamic svg placeholder for images we can't open
    • Proactive thumbnail generation
    • on photo thumbs on the feed, a little "2" indicating there are 2 images in the set (or w/e number for that item)
    • dark theme
    • more information from the images like on http://exif.regex.info/exif.cgi
  • my photos problems

    • recently imported imotrip photos not time offset lol
      • time offset options in ui?