-
A native MacOS PhotoPrism server and launcher application for PhotoPrism
- Embed PhotoPrism server and the launcher in one MacOS app "PhotoPrism"
- Native macOS window: Clean interface to manage your PhotoPrism server
- Start/Stop Server: Start and stop the PhotoPrism server with one click
- Open Web UI: Automatically opens the web interface (http://localhost:2342)
- Show Logs: View server logs
- Open Pictures Folder: Quick access to your photos (originals and imports)
- Open Data Folder: Access to application data (cache, database, etc.)
- Preferences: Configure custom folders and auto-start options
- Official PhotoPrism icon: Uses the official PhotoPrism logo
- Complete bundle: Includes FFmpeg for video processing, ExifTool for metadata extraction
PhotoPrismLauncher/ ├── PhotoPrismLauncher/ │ └── AppDelegate.swift # Main application code ├── build-launcher.sh # Standalone launcher build ├── build-photoprism-installer-with-launcher.sh # Full build script └── README.mdThis script clones PhotoPrism, compiles it, builds the launcher, bundles all dependencies, and creates a .pkg installer:
chmod +x build-photoprism-installer-with-launcher.sh ./build-photoprism-installer-with-launcher.sh ### Build both PKG and DMG or with options: ./build-photoprism-installer-with-launcher.sh --pkg-only # PKG only ./build-photoprism-installer-with-launcher.sh --dmg-only # DMG only ./build-photoprism-installer-with-launcher.sh --help # Help
./build-photoprism-installer-with-launcher.sh # Les deux
The script automatically:
- Checks for required dependencies (Homebrew, Xcode SDK, etc.)
- Downloads TensorFlow and ONNX Runtime libraries
- Downloads FFmpeg and FFprobe (video processing)
- Downloads ExifTool (metadata extraction)
- Clones and compiles PhotoPrism
- Downloads the official PhotoPrism logo and generates icons
- Builds the native Swift launcher
- Bundles all dylibs with corrected rpaths
- Creates a .pkg installer
- Creates a .dmg installer
Prerequisites:
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Required packages (the script will prompt to install missing ones)
brew install go node npm git make pkg-config vips librsvgPhotoPrismLauncher/
├── temp/ # Temporary build files
│ ├── photoprism/ # PhotoPrism source
│ ├── tensorflow/ # TensorFlow libraries
│ ├── onnxruntime-*/ # ONNX Runtime libraries
│ └── PhotoPrism.app/ # Built application
└── dist/ # Final output
└── PhotoPrism-{version}.pkg
- Pictures:
~/Pictures/PhotoPrism/originals/: Original photosimport/: Import folder
- Application Data:
~/Library/Application Support/PhotoPrism/storage/: Database, cache, thumbnails, etc.storage/config/: Configuration files
- Logs:
~/Library/Logs/PhotoPrism/photoprism.log
These paths can be customized in Preferences (⌘,).
- Username:
admin - Password:
photoprism
- macOS 12.0 (Monterey) or newer
- Apple Silicon (M1/M2/M3/M4)
- Xcode Command Line Tools with SDK 12.0+
- Homebrew
To check your SDK version:
xcrun --show-sdk-versionIf the SDK is outdated, update Xcode or Command Line Tools:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --installPhotoPrism.app/
└── Contents/
├── Info.plist
├── PkgInfo
├── MacOS/
│ ├── PhotoPrism # Swift launcher (main executable)
│ ├── photoprism-server # PhotoPrism server binary
│ ├── ffmpeg # FFmpeg video processor
│ ├── ffprobe # FFprobe metadata reader
│ ├── exiftool # ExifTool metadata extractor
│ └── lib/ # ExifTool libraries
├── Resources/
│ ├── AppIcon.icns # Application icon
│ └── assets/ # PhotoPrism web assets
└── Frameworks/
├── libtensorflow*.dylib # TensorFlow
├── libonnxruntime*.dylib # ONNX Runtime
├── libvips*.dylib # Image processing
├── libheif*.dylib # HEIF support
└── ... # Other dependencies
Access preferences with ⌘, or via the menu PhotoPrism Launcher > Preferences...
- Pictures Folder: Where your photos are stored (originals and imports)
- Data Folder: Where PhotoPrism stores its data (database, cache, etc.)
- Start server when app launches: Automatically start the server on app launch
Modify the PHOTOPRISM_HTTP_PORT environment variable in AppDelegate.swift in the startServer() function.
Add entries to the environment dictionary in the startServer() function in AppDelegate.swift.
New Feature: The launcher now automatically detects if port 2342 is in use and offers options:
- Stop Existing Process: Automatically kills the existing process and starts fresh
- Open Existing Server: Simply opens the browser to the existing server
- Cancel: Cancels the operation
New Feature: The application uses a 4-stage progressive shutdown system to ensure all PhotoPrism processes terminate properly when you:
- Quit the application (⌘Q)
- Click "Stop Server"
The 4 stages are:
- Graceful shutdown via
photoprism stop - SIGTERM to process group
- SIGKILL to process group
- Nuclear option (kill by port + name)
After quitting, verify no processes remain:
ps aux | grep photoprism | grep -v grep # Should be empty
lsof -i :2342 # Should be emptyUse the helper script for interactive process management:
./scripts/kill-photoprism.shOr use the nuclear option one-liner:
(lsof -ti :2342 | xargs kill -9 2>/dev/null; pkill -9 -i photoprism 2>/dev/null) && echo "✓ Done"- Check logs: Click "Show Logs" button
- Verify folders exist and are writable
- See TROUBLESHOOTING.md for detailed solutions
- Process Management: See PROCESS_MANAGEMENT.md for technical details on the shutdown system
- FFmpeg Integration: See FFMPEG_INTEGRATION.md for video processing details
- Live Photos: See LIVE_PHOTOS.md for Apple Live Photos and Android Motion Photos support
- Update Xcode Command Line Tools (see System Requirements)
- Ensure SDK version is 12.0 or newer
- The build script bundles all required dylibs
- Check
Contents/Frameworks/in the app bundle
For more issues, see the comprehensive Troubleshooting Guide.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Chris Bansart (@chrisbansart)
- PhotoPrism - AI-Powered Photos App
- Jellyfin Server for macOS - Architecture inspiration
- TensorFlow - Machine learning framework
- libvips - Image processing library