Chapter 14: Docker / Server Deployment
14.1 Server Mode Overview
Photocatalyst supports running in server mode, allowing access and management via a web interface.
Two Server Modes
| Mode | Description | Use Case |
|---|---|---|
| CLI Mode | Launch directly from command line | Development & testing, simple deployment |
| Docker Mode | Containerized deployment | NAS, home server, production environment |
Server Mode Features
- Access the web management interface via browser
- Album sharing functionality
- File upload, browsing, and search (some advanced features require the desktop edition)
14.2 Docker Deployment
Image Architecture
- Standard Edition (x86-64 architecture)
- ARM Edition (Raspberry Pi, Apple Silicon, etc.)
- ARM Accelerated Edition (ARM architecture with GPU acceleration support)
Using docker-compose (Recommended)
Create a docker-compose.yaml file:
services:
lightedium:
image: lightedium:latest
container_name: lightedium
ports:
- "10242:10240"
volumes:
- /your/photos:/photos:ro # Photos directory (read-only)
- ./data:/app/data # Data persistence
environment:
- PORT=10240
restart: unless-stopped
Parameter Description
| Configuration | Description |
|---|---|
ports | Host port mapping (host_port:container_port), default container port is 10240 |
volumes | Volume mounts: photos directory, data directory |
PORT | Service listening port inside the container |
Startup Steps
# 1. Pull the image
docker pull lightedium:latest
# 2. Create the data directory
mkdir -p ./data
# 3. Start the service
docker-compose up -d
# 4. View logs
docker-compose logs -f
Accessing the Service
Open your browser and visit http://your-server-ip:10242 to use the web management interface.
14.3 CLI Mode Deployment
Direct Run
# Compile or download the CLI version
./lightedium --cli
# Specify a port
./lightedium --cli --port 8080
Environment Variable Configuration
export PORT=10240
export DATA_DIR=/path/to/data
export PHOTOS_DIR=/path/to/photos
./lightedium --cli
14.4 Web Management Interface
After accessing via browser, you will see an interface similar to the desktop edition:
- Sidebar navigation
- Photo grid browsing
- Search functionality
- Album management
- Settings page
Differences from the Desktop Edition
| Feature | Desktop Edition | Web Edition |
|---|---|---|
| Local file browsing | ✓ | ✓ |
| AI features | ✓ All | ✓ Depends on hardware |
| File system monitoring | ✓ | - |
| Native menus | ✓ | Web menus |
| Puzzle tool | ✓ | Partial support |
| Share pages | ✓ | ✓ |
14.5 Maintenance Operations
Restarting the Service
docker-compose restart
Updating the Image
docker-compose pull
docker-compose up -d
Backing Up Data
Back up the data directory (containing the database and configuration):
tar -czf backup.tar.gz ./data
Next step: Read Chapter 15 to learn about maintenance and troubleshooting.