Portainer
In Portainer the site is a stack: a Docker Compose file you paste into Portainer.
-
On the host, create the data folder for the user the site runs as:
Terminal window sudo mkdir -p /opt/3mf-library/data && sudo chown 1000:1000 /opt/3mf-library/data -
Portainer → Stacks → Add stack. Name:
3mf-library. Build method: Web editor. Paste:services:3mf-library:image: ghcr.io/jurjen74/3mf-library:${IMAGE_TAG:-latest}container_name: 3mf-libraryuser: "${PUID:-1000}:${PGID:-1000}"ports:- "${PORT:-8085}:8080"environment:TZ: ${TZ:-UTC}TRUSTED_NETWORKS: ${TRUSTED_NETWORKS:-}KNOWN_PROXIES: ${KNOWN_PROXIES:-}volumes:- ${LIBRARY_DIR}:/library:ro- /opt/3mf-library/data:/datarestart: unless-stoppedmem_limit: ${MEMORY_LIMIT:-3g}security_opt:- no-new-privileges:truecap_drop:- ALLread_only: truetmpfs:- /tmp -
Environment variables (below the editor, Add an environment variable):
Name Value LIBRARY_DIR/srv/3d-prints(your models folder on the host)TRUSTED_NETWORKS192.168.1.0/24TZEurope/AmsterdamPUID/PGIDonly if the models belong to another user than 1000 -
Deploy the stack. The container’s logs show
Scan finished … files in … folderswhen it’s ready. -
Open
http://<host>:8085and create the first account.
Models on an NFS share
Section titled “Models on an NFS share”Add the NFS volume to the stack instead of LIBRARY_DIR:
services: 3mf-library: volumes: - library:/library:ro - /opt/3mf-library/data:/data
volumes: library: driver: local driver_opts: type: nfs o: "addr=192.168.1.10,nfsvers=4.1,ro,soft,timeo=100" device: ":/volume1/3d-models"Updating
Section titled “Updating”Stacks → 3mf-library → Update the stack with Re-pull image and redeploy switched on.