Skip to content

Installation

PhotoDock edited this page Jun 6, 2026 · 1 revision

Installation

PhotoDock ships as a Docker image: ghcr.io/mischa323/photodock:latest (also tagged per release, e.g. :2.6.0).

All runtime data lives in a single ./data folder (accounts, settings, uploads, the encryption key, optional TLS certs). Back that folder up.


Option A — Docker Compose (recommended)

Create a docker-compose.yml:

services:
  photodock:
    image: ghcr.io/mischa323/photodock:latest
    ports:
      - "8080:8080"     # HTTP
      - "8081:8081"     # HTTPS (self-signed cert auto-generated if none provided)
    environment:
      PORT: 8080
      HTTPS_PORT: 8081
      SSL_CERT: /data/ssl/cert.pem
      SSL_KEY:  /data/ssl/key.pem
      DATA_FILE: /data/data.json
      UPLOADS_DIR: /data/uploads
    volumes:
      - ./data:/data
    restart: unless-stopped

Then:

docker compose up -d

Open http://<host>:8080 and continue with First‑time setup.


Option B — Portainer (stack)

  1. Stacks → Add stack → Web editor.
  2. Paste the compose file from Option A.
  3. Deploy the stack.
  4. Data persists in the stack's data volume/bind‑mount.

To update later: Stacks → your stack → Pull and redeploy (enable re‑pull image).


Option C — From source

Requires Node.js 18+ (20+ recommended).

git clone https://github.com/Mischa323/PhotoDock.git
cd PhotoDock
npm install
npm start            # serves on http://localhost:8080

Environment variables

Variable Default Purpose
PORT 8080 HTTP port.
HTTPS_PORT 8081 HTTPS port (a self‑signed cert is generated if SSL_CERT/SSL_KEY are missing). Set empty to disable HTTPS.
SSL_CERT / SSL_KEY data/ssl/* TLS cert + key (PEM).
DATA_FILE data.json Path to the JSON state file.
UPLOADS_DIR uploads/ Where photos are stored.
PHOTODOCK_SECRET_KEY (auto) 32‑byte key (64 hex chars or base64) used to encrypt secrets at rest. If unset, an auto‑generated secret.key is used. Recommended in production so the key comes from your secrets manager.
APP_VERSION (package.json) Override the displayed version.

Behind a reverse proxy (HTTPS)

Devices connect to the server over HTTPS on port 443 through your reverse proxy (nginx, Caddy, Traefik, Synology reverse proxy, …). This is the recommended way to expose PhotoDock and is required for cloud OAuth (Microsoft/Google) and remote devices.

  • Proxy https://photos.example.com → the container's :8080.
  • The app trusts the first proxy hop (X‑Forwarded‑Proto/For) for correct IPs and secure cookies.
  • Set this exact address as your Public dashboard URL in First‑time setup — it drives device/API links, cloud redirect URIs and email links.

If you only run on a LAN, you can use the built‑in HTTPS on :8081 with the auto‑generated self‑signed certificate, but cloud OAuth needs a real public HTTPS URL.

Next: First‑time setup.

Clone this wiki locally