Skip to content

Instantly share code, notes, and snippets.

@liweitianux
Created November 7, 2025 01:22
Show Gist options
  • Save liweitianux/7ee1e048e425bc061aae0bd49cff767f to your computer and use it in GitHub Desktop.
Save liweitianux/7ee1e048e425bc061aae0bd49cff767f to your computer and use it in GitHub Desktop.
PhotoView (Photo gallery for self-hosted personal servers)

PhotoView Notes

Debian Linux

Date: 2025-06-19

Build

  1. Requirements
    $ sudo apt install libdlib-dev  # for go-face
    $ sudo apt install libmagickwand-dev  # for gographics
    $ sudo apt install libmagic-dev  # for gomagic
    $ sudo apt install libatlas-base-dev liblapack-dev  # for linking
    
  2. Web UI
    $ cd ui
    $ npm install
    $ npm run build
    
  3. API Backend
    $ cd api
    $ go build -v -o photoview .
    

Installation

  1. Install files:

    $ mkdir ~/local/photoview
    $ cp -a ui/dist ~/local/photoview/ui
    $ cp -a api/{photoview,data} ~/local/photoview/
    $ cp -a api/example.env ~/local/photoview/.env
    
  2. Optional tools:

    $ sudo apt install darktable  # for RAW photos
    $ sudo apt install ffmpeg  # for video transcoding
    $ sudo apt install exiftool  # for EXIF parsing
    

Configuration

  1. Edit config file:

    $ cd ~/local/photoview
    $ vim .env
    | PHOTOVIEW_SERVE_UI=1
    | PHOTOVIEW_API_ENDPOINT=http://localhost:4001/
    | PHOTOVIEW_UI_ENDPOINT=http://localhost:4001/
    
  2. Start program:

    $ ./photoview
    
  3. Open the web UI: http://127.0.0.1:4001/

    Create the user and use it.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment