SnapOtter (Self-Hosted AI & Image Toolkit) on UGREEN NAS via Docker Compose

Hello :waving_hand:

What is SnapOtter?
SnapOtter is a self-hosted, 100% private image manipulation toolkit featuring 243 image+pdf+video+audio+file processing tools (crop, convert, compress, watermark) alongside powerful local AI tools (background removal, photo upscaling, object erase, and OCR).

This setup includes iGPU hardware acceleration (/dev/dri) so the AI models process images rapidly on Intel integrated graphics.

:framed_picture: Step 1: Create the Host Directory

Before running the container, create a dedicated data folder on your NAS storage pool.

  1. Open Files in UGOS Pro.

  2. Navigate to your Docker root folder (e.g., /volume1/docker/).

  3. Create a new directory named snapotter.

/volume1/docker/snapotter

:gear: Step 2: Prepare the Docker Compose Configuration

Copy the following docker-compose.yml code into UGOS Docker App (Project/Stack editor), Portainer, or run it via SSH:

YAML

services:
 # --- SnapOtter Auto Perms Fixer (Runs once before SnapOtter) ---
  snapotter-init:
    image: alpine:latest
    container_name: snapotter-init
    user: "0:0"
    volumes:
      - ./snapotter:/data
    command: sh -c "chown -R 1000:10 /data && chmod -R 777 /data && rm -rf /data/postgres.bootstrapping"
    restart: "no"

  # --- SnapOtter ---
  snapotter:
    image: snapotter/snapotter:latest
    container_name: snapotter
    restart: always
    init: false
    privileged: true
    depends_on:
      snapotter-init:
        condition: service_completed_successfully
    devices:
      - /dev/dri:/dev/dri
    ports:
      - "1349:1349"
    cpu_shares: 512
    cpuset: "1-5"
    volumes:
      - ./snapotter:/data:rw
      - /volume1:/volume1:rw
    environment:
      - PUID=1000
      - PGID=10
      - TZ=Asia/Riyadh
      - AUTH_ENABLED=true
      - DEFAULT_USERNAME=KBJ911
      - DEFAULT_PASSWORD=REPLACE_ME
      - STORAGE_MODE=local

:warning: Important Configuration Notes:

  • DEFAULT_PASSWORD: Change REPLACE_ME to your desired secure password before running the stack.

  • /dev/dri:/dev/dri: Enables Intel QuickSync / iGPU passthrough to speed up local AI model processing.

  • cpuset: "1-5": Dedicates CPU cores 1 through 5 for image processing workloads while leaving Core 0 free for general system stability.

:rocket: Step 3: Deploy the Container

  1. Click Create & Start (or run docker compose up -d in terminal).

  2. Wait a minute while Docker downloads the image and initializes the local AI models.

:globe_with_meridians: Step 4: Access the Web Interface

  1. Open your web browser and navigate to:

    Plaintext

    http://<YOUR-NAS-IP>:1349
    
    
  2. Sign in using your credentials:

    • Username: KBJ911 (or your customized username)

    • Password: Your configured password

:hammer_and_wrench: Troubleshooting & Tips

  • AI Speed: The first time you use background removal or upscaling, it may take a few seconds as the container loads the model into memory. Subsequence passes will be significantly faster due to /dev/dri acceleration.

  • Storage Access: The volume mapping - /volume1:/volume1:rw allows SnapOtter to read and export images directly from your primary NAS storage volume.