Synology
On a Synology NAS the models are usually already there, in a shared folder. The site runs next to them in Container Manager and reads that folder directly.
You need DSM 7.2 or newer and a model that supports Container Manager (most “+” models and several others; see Synology’s compatibility list).
-
Install Container Manager from the Package Center.
-
Make the folders. In File Station:
- The models: an existing shared folder, for example
3d-prints(/volume1/3d-prints). - For the site:
docker/3mf-library(Container Manager creates thedockershared folder), with an empty folderdatainside:/volume1/docker/3mf-library/data.
- The models: an existing shared folder, for example
-
Pick the user the site runs as, and find its numbers. Use your own DSM account or create one (for example
3mflibrary) with read-only access to the models folder and read/write access todocker. Then find its user and group id: enable SSH (Control Panel → Terminal & SNMP), log in and run:Terminal window id 3mflibraryuid=1027(3mflibrary) gid=100(users) groups=100(users)Here that’s
1027:100. (The first user created on a Synology usually has 1026; theusersgroup is 100.) -
Create the project. Container Manager → Project → Create:
- Project name:
3mf-library - Path:
/docker/3mf-library - Source: Create docker-compose.yml, and paste this, with your own values in the four marked lines:
services:3mf-library:image: ghcr.io/jurjen74/3mf-library:latestcontainer_name: 3mf-libraryuser: "1027:100" # ← from step 3ports:- "8085:8080"environment:TZ: Europe/Amsterdam # ← your time zoneTRUSTED_NETWORKS: 192.168.1.0/24 # ← your home networkKNOWN_PROXIES: ""volumes:- /volume1/3d-prints:/library:ro # ← your models folder- ./data:/datarestart: unless-stoppedmem_limit: 3gsecurity_opt:- no-new-privileges:truecap_drop:- ALLread_only: truetmpfs:- /tmpSkip the “Web portal” step, then Done. Container Manager downloads the image and starts the site.
- Project name:
-
Check that it runs. Container Manager → Container →
3mf-library→ Log should showScan finished … files in … folders. -
Open
http://<NAS address>:8085from your home network and create the first account.
HTTPS with DSM’s reverse proxy
Section titled “HTTPS with DSM’s reverse proxy”DSM has a reverse proxy built in, so you don’t need a separate one:
-
Get a certificate for your domain: Control Panel → Security → Certificate → Add → Let’s Encrypt.
-
Control Panel → Login Portal → Advanced → Reverse Proxy → Create:
- Source: HTTPS, hostname
models.example.com, port 443 - Destination: HTTP,
localhost, port8085
- Source: HTTPS, hostname
-
Pick the certificate for that hostname under Security → Certificate → Settings.
-
Tell the site where the proxy is. DSM’s proxy reaches the container through Docker’s network gateway; find it over SSH:
Terminal window sudo docker network inspect 3mf-library_default --format '{{(index .IPAM.Config 0).Gateway}}'Put that address (for example
172.20.0.1) inKNOWN_PROXIES: Container Manager → Project →3mf-library→ YAML Configurations, edit, save, and let it rebuild the project when it asks. -
Forward port 443 on your router to the NAS (not 8085). See Reverse proxy and HTTPS for how logins work through a proxy.
Updating
Section titled “Updating”The dependable way is over SSH:
cd /volume1/docker/3mf-library && sudo docker-compose pull && sudo docker-compose up -dRecent Container Manager versions also show an Update on the Image tab when a newer latest exists.