3 Deploying on a Synology NAS
Niels Franke edited this page 2026-11-16 09:58:35 +01:00

Deploying on a Synology NAS

Heads-up — community guide, not yet officially tested. ContactSheet runs as a standard Docker Compose stack with multi-architecture images (Intel and ARM), which is exactly what Synology's Container Manager runs. So it should work on any Synology that supports Container Manager, but the maintainer hasn't verified it on real hardware yet. If you try it, feedback and corrections are very welcome. Nothing here touches your other Synology apps or DSM itself.

This guide is written for non-technical users. You don't need the command line — everything is done through the DSM web interface (File Station + Container Manager). It has two parts:

  1. Part 1 — Run it on your NAS (works on your home network)
  2. Part 2 — Use your own domain with HTTPS (optional, e.g. gallery.yourstudio.com)

For the general background (storage layout, all environment variables, updating, backups), see the main Self-Hosting and Deployment page — this guide is the click-by-click Synology version of it.


Before you start

  • A Synology NAS that has Container Manager in its Package Center (DSM 7.2 or newer). Most Intel models — the "+" series and similar — have it. If you can install Container Manager, you're good.
  • About 10 minutes.

💡 Keep ContactSheet's folder on an internal NAS volume (the normal /volume1), not on a USB drive or a mapped network share. The app uses a small SQLite database that doesn't like network drives.


Part 1 — Run it on your NAS

Step 1 — Create a folder

Open File Station and create a folder for the app, for example:

docker/contactsheet

(Screenshot: File Station with the new docker/contactsheet folder)

Step 2 — Add the web-server config file

ContactSheet needs one small config file in that folder.

  1. Download nginx.conf from here (right-click → Save link as…): https://raw.githubusercontent.com/nielsfranke/contactsheet/main/nginx.conf
  2. In File Station, open your docker/contactsheet folder and upload the nginx.conf file into it.

Make sure the file is named exactly nginx.conf (not nginx.conf.txt).

(Screenshot: nginx.conf uploaded into the folder)

Step 3 — Create the project in Container Manager

  1. Open Container Manager → Project → Create.
  2. Project name: contactsheet
  3. Path: choose the docker/contactsheet folder you made.
  4. Source: choose Create docker-compose.yml and paste in exactly this:
services:
  backend:
    image: ghcr.io/nielsfranke/contactsheet-backend:latest
    volumes:
      - ./data:/data
      - ./uploads:/data/uploads
    environment:
      TRUSTED_PROXY_HOPS: "${TRUSTED_PROXY_HOPS:-1}"
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-fsS", "http://localhost:8000/api/health"]
      interval: 30s
      timeout: 3s
      retries: 3
      start_period: 30s

  frontend:
    image: ghcr.io/nielsfranke/contactsheet-frontend:latest
    depends_on:
      backend:
        condition: service_healthy
    restart: unless-stopped
    environment:
      BACKEND_INTERNAL_URL: "http://backend:8000"
    healthcheck:
      test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/',r=>process.exit(r.statusCode<500?0:1)).on('error',()=>process.exit(1))"]
      interval: 30s
      timeout: 3s
      retries: 3
      start_period: 20s

  nginx:
    image: nginx:1.27-alpine
    ports:
      - "8765:80"
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
      - ./uploads:/data/uploads:ro
      - ./data/branding:/data/branding:ro
    depends_on:
      backend:
        condition: service_healthy
      frontend:
        condition: service_healthy
    restart: unless-stopped
  1. Click through Next → Done. Container Manager downloads the images (this can take a few minutes the first time) and starts the app.

This uses the ready-made images, so nothing is compiled on your NAS. 8765 is the port the app listens on — it doesn't clash with DSM's own ports. If 8765 is already taken on your NAS, change both 8765 to another number like 8780.

(Screenshot: Container Manager project running, all containers green)

Step 4 — Open ContactSheet

In your browser go to your NAS address followed by :8765, for example:

http://192.168.1.50:8765

(Use the same IP address you use to open DSM, just add :8765.)

The first-run setup wizard opens and walks you through creating your admin account. Done — you have a working ContactSheet on your home network. 🎉

Your photos are stored in docker/contactsheet/uploads, and the database, settings and branding in docker/contactsheet/data.


Part 2 — Use your own domain (optional)

This makes your galleries reachable from anywhere at your own web address with a secure padlock, e.g. https://gallery.yourstudio.com — perfect if you already have a studio website.

You'll use two things Synology gives you for free: a DDNS name and a Let's Encrypt certificate. The cleanest setup is to point a subdomain of your real domain at your NAS.

Step 1 — Turn on Synology DDNS (free)

This gives your NAS a stable internet name even though your home IP address changes.

  1. Control Panel → External Access → DDNS → Add.
  2. Service provider: Synology. Pick a hostname, e.g. yourname.synology.me, and confirm.

(Screenshot: DDNS entry showing Normal/Connected)

Step 2 — Point your subdomain at the NAS

At your domain provider (where you manage yourstudio.com), add one CNAME record:

Type Name / Host Value / Points to
CNAME gallery yourname.synology.me

This makes gallery.yourstudio.com follow your NAS automatically. DNS changes can take up to an hour to take effect.

Step 3 — Open two ports on your router

So the internet can reach your NAS, forward these ports to your NAS in your router settings (usually under Port Forwarding):

  • Port 443 — the secure website traffic.
  • Port 80 — used once to issue and later renew the free certificate.

This step depends on your specific router. If you're unsure, search "port forwarding + your router model", or ask your internet provider.

Step 4 — Get a free HTTPS certificate

  1. Control Panel → Security → Certificate → Add → Add a new certificate → Get a certificate from Let's Encrypt.
  2. Domain name: gallery.yourstudio.com. Enter your email and finish.

(Screenshot: Let's Encrypt certificate issued for the subdomain)

Step 5 — Route the domain to the app

  1. Control Panel → Login Portal → Advanced → Reverse Proxy → Create.

  2. Fill in:

    Source

    • Protocol: HTTPS
    • Hostname: gallery.yourstudio.com
    • Port: 443

    Destination

    • Protocol: HTTP
    • Hostname: localhost
    • Port: 8765
  3. Open the Custom Header tab → Create → WebSocket. (This is required — without it, live updates while clients review photos won't work.)

  4. Save.

(Screenshot: Reverse Proxy rule + the WebSocket custom header)

If your certificate isn't picked up automatically, go to Control Panel → Security → Certificate → Settings and assign the gallery.yourstudio.com certificate to this hostname.

Uploading very large single files? Ordinary photo uploads need nothing extra — a big folder is split into parts automatically. But single multi-gigabyte files (Photoshop .psd/.psb, layered TIFF) and gallery header images up to 100 MB pass through DSM's reverse proxy, which may reject them with a 413 before they ever reach the app. If that happens, upload those files over the local address (http://<nas-ip>:8765) instead, or raise the body-size limit in DSM's proxy configuration. Everyday delivery work is unaffected.

Because Synology's reverse proxy now sits in front of the app, add one setting so it records the correct visitor IP addresses (for the activity log and rate limiting):

  1. In File Station, open docker/contactsheet and create a plain text file named exactly .env (the leading dot is intentional).

  2. Put this single line in it:

    TRUSTED_PROXY_HOPS=2
    
  3. In Container Manager → Project → select contactsheet → Action → Build/Up (or Stop then Start) so the change takes effect.

Skipping this won't break anything — visitor IPs would just all look the same in the logs.

Done

Open https://gallery.yourstudio.com — your galleries are now live on your own domain with HTTPS. Share links you send to clients will use this address automatically.


Everyday tips

  • Backups. Everything lives in the docker/contactsheet folder — back that folder up (e.g. with Synology Hyper Backup) and you've backed up the whole app. ContactSheet also has a built-in backup under Settings → General → Backup & restore.
  • Updating to a new version. In Container Manager → Project → select contactsheet → Action → there's an option to pull the latest images and restart. Your photos and settings are kept.
  • Keep some free space. If you let clients upload photos, each upload must leave at least 5 GB free on the volume — below that, client uploads are refused with an "out of storage space" message so the app's database never runs out of room. Your own uploads aren't affected by this reserve.
  • Semantic photo search. ContactSheet has an optional "search by what's in the photo" feature. It needs extra computing power and is best left off on a NAS — galleries work fully without it.
  • Stuck? In Container Manager → Container, click a container → Log to see what it reports. Open an issue at https://github.com/nielsfranke/contactsheet/issues with that log.