Download & Deploy Nomido-Photo-Backend
Get an instant, customized deployment script tuned to your host’s memory and CPU resources in three quick steps.
Select Deployment Media
Choose whether to deploy on a Docker server/NAS or on your personal desktop computer.
Select Your Configuration
Tunes CPU worker threads, RAM footprint, and InsightFace detection models (`low`, `medium`, `high`).
Server (Docker) Setup & Download
Configuration: Medium (4 GB RAM) • Mode: MODE=medium • Model: buffalo_m • Threads: 2
curl -sL https://photo.nomidocloud.com/install.sh | MODE=medium bashOpen your terminal and paste the curl command above. The installer will verify Docker and docker-compose availability.
Pre-built multi-arch images will be pulled from GitHub Container Registry (GHCR) and started automatically.
Open http://localhost:8080 (or your server's IP) to set up your admin account and start uploading photos.
Nomido for iOS & Android
Stream your photos, view face clusters, and auto-backup memories directly to your personal NAS with zero cloud intermediaries.
Nomido for iOS
Requires iOS 16.0+- Background background photo sync & Live Photos playback
- End-to-end encrypted WebRTC remote connection
- Local offline album caching & facial cluster browser
Nomido for Android
Android 10.0+ (ARM64 / x86_64)- Fast camera roll auto-sync with Wi-Fi only option
- Direct P2P streaming without open router ports
- Full map view with offline reverse geocoded cities
Post-Installation Verification
Follow these 3 quick steps after your containers are healthy.
Recommended. No open ports, no domain: the Hub links your server automatically.
1. Sign In to the Hub
Open the Nomido-Photo app on your phone (App Store or Google Play) and sign in or create your free Hub account with email, Google or Apple.
2. Pick Your Server
The app scans your Wi-Fi and finds your server (or type its IP address). Select it and create your administrator account. Your Hub API key is generated and linked automatically: nothing to copy or paste.
3. You're Connected
Photos sync from anywhere over an encrypted peer-to-peer link (STUN / WebRTC). No open ports, no domain, no certificates. Your web gallery is available at photo.nomidocloud.com/<your-username>.
Advanced Configuration & .env Reference
Line-by-Line Configuration Documentation
Step-by-step expandable parameter reference and complete environment variable manual for Docker Compose, homelab administrators, custom reverse proxies, and isolated air-gapped deployments.
No Cloud Account Required (Local-Only Architecture)
Nomido-Photo never phones home by default. If you prefer to expose your instance using your own domain, reverse proxy (Nginx, Traefik, Caddy), or a private VPN (WireGuard, Tailscale), simply omit HUB_API_KEY. The companion mobile app features a dedicated "Skip website configuration (Direct Register)" option to connect straight to your local IP or reverse proxy domain without creating a commercial account.
- L3dbService RootPostgreSQL Vector Database Service
db:Primary relational and vector database storing user accounts, EXIF metadata, albums, and 512-dimensional CLIP/InsightFace embeddings.
- L4imageContainer ImagePostgreSQL 15 + pgvector Image
image: ankane/pgvector:v0.5.1-pg15Pre-compiled PostgreSQL 15 image bundled with the pgvector extension for sub-millisecond cosine similarity search on faces and semantic queries.
- L5restartLifecycleAutomatic Database Recovery
restart: unless-stoppedEnsures the database container automatically restarts after host reboots or unexpected process termination unless explicitly stopped.
- L6environmentEnvironmentDatabase Environment Block
environment:Configures initial superuser credentials and default database creation on first container boot.
- L7POSTGRES_USEREnvironmentDatabase Role Username
POSTGRES_USER: photo_userDedicated PostgreSQL role used by the Rust backend to execute parameterized SQLx queries.
- L8POSTGRES_PASSWORDSecurity SecretDatabase Role Password
POSTGRES_PASSWORD: secure_password_hereSecret password for photo_user. Replace with a strong 16+ byte random string in production.
- L9POSTGRES_DBEnvironmentDatabase Schema Name
POSTGRES_DB: photo_dbName of the database automatically provisioned and migrated on startup.
- L10volumesVolume MountDatabase Volume Mounts
volumes:Maps host storage into the container so database tables and vector indexes persist across container upgrades.
- L11./data/postgresVolume MountPersistent PGData Directory
- ./data/postgres:/var/lib/postgresql/dataStores PostgreSQL data files in ./data/postgres on your host filesystem so state survives container destruction.
- L12healthcheckHealthcheckReadiness Health Probe
healthcheck:Allows Docker to verify that PostgreSQL is accepting connections before starting dependent containers.
- L13healthcheck.testHealthcheckpg_isready Probe Command
test: ["CMD-SHELL", "pg_isready -U photo_user -d photo_db"]Executes pg_isready inside the container to confirm the photo_db catalog is online and accepting connections.
- L14healthcheck.intervalHealthcheckProbe Interval
interval: 5sRuns the database readiness check every 5 seconds.
- L15healthcheck.timeoutHealthcheckProbe Timeout
timeout: 5sMarks a single health probe attempt as failed if it takes longer than 5 seconds.
- L16healthcheck.retriesHealthcheckMaximum Consecutive Retries
retries: 5Allows up to 5 consecutive startup retries before marking the container unhealthy.
- L17backendService RootRust Actix-Web API & Media Server
backend:Core photo engine handling authentication, media streaming, WebRTC P2P tunneling, EXIF parsing, and background AI job orchestration.
- L18imageContainer ImageMulti-Arch Rust Backend Image
image: ghcr.io/nomidocloud/nomido-photo-backend:latestOfficial pre-built linux/amd64 and linux/arm64 image pulled from GitHub Container Registry.
- L19restartLifecycleBackend Restart Policy
restart: unless-stoppedAutomatically restarts the API server on host reboot or crash.
- L20depends_onLifecycleStartup Dependency Graph
depends_on:Prevents the backend from booting before its required database dependency is ready.
- L21depends_on.dbLifecycleDatabase Dependency Target
db:Links startup order to the db service defined above.
- L22conditionLifecycleWait for Healthy Database
condition: service_healthyWaits until pg_isready succeeds so SQLx database migrations run without connection race conditions.
- L23environmentEnvironmentBackend Runtime Environment
environment:Injects database connection strings, cryptographic secrets, and hardware thread allocations.
- L24DATABASE_URLSecurity SecretSQLx Connection URI
DATABASE_URL: postgres://photo_user:secure_password_here@db:5432/photo_dbConnects the Rust backend to the db container over the internal Docker bridge network on port 5432 with pgvector extension enabled.
- L25JWT_SECRETSecurity SecretCryptographic Session Signing Key
JWT_SECRET: your_random_32_char_secret_key_here256-bit secret key used to sign and verify user JWT access and refresh tokens. Generate with: openssl rand -hex 32.
- L26AI_SERVICE_URLNetwork PortInternal AI Sidecar Endpoint
AI_SERVICE_URL: http://ai-service:8000Routes internal face detection, CLIP embedding, OCR, and geocoding requests to the ai-service container.
- L27WORKER_THREADSHardware TunedHardware Thread Allocation (Medium Profile)
WORKER_THREADS: 2Tuned to 2 worker threads (4 GB RAM) for TOTAL_THREAD_NUMBER pool allocation matching your selected Medium hardware tier.
- L28STORAGE_PATHEnvironmentInternal Media Vault Path
STORAGE_PATH: /app/storageRoot directory path inside the container where original media, thumbnails, and cache are saved.
- L29SERVER_PORTNetwork PortHTTP API Listener Port
SERVER_PORT: 8080HTTP port where the Rust Actix-Web backend listens for client API and WebSocket signaling connections.
- L30APP_URLNetwork PortPublic Backend Base URL
APP_URL: http://localhost:8080Public URL of the backend instance, used for CORS headers and public sharing links.
- L31HUB_API_KEYOptional RelayEncrypted P2P Relay Key
HUB_API_KEY: optional_p2p_relay_keyEncrypted P2P relay connection key. Omit entirely for 100% offline or air-gapped local-only operation without any cloud dependencies.
- L32LOG_LEVELEnvironmentLogging Verbosity Level
LOG_LEVEL: infoControls backend log verbosity: trace, debug, info, warn, or error.
- L33volumesVolume MountMedia Storage Volume Mapping
volumes:Mounts your physical host drive or NAS RAID array into the backend container.
- L34./data/storageVolume MountHost Photo Library Mount
- ./data/storage:/app/storagePersists all uploaded photos and generated thumbnails in ./data/storage on the host.
- L35portsNetwork PortHost Network Port Binding
ports:Exposes the HTTP API and embedded web gallery to your local network or reverse proxy.
- L368080:8080Network PortPort 8080 Mapping
- "8080:8080"Maps host port 8080 to container port 8080 (accessible at http://localhost:8080).
- L37ai-serviceService RootOn-Device AI Vision Sidecar
ai-service:Isolated Python FastAPI microservice running InsightFace facial recognition, CLIP semantic search, RapidOCR, and offline reverse geocoding.
- L38imageContainer ImagePre-Built AI Sidecar Image
image: ghcr.io/nomidocloud/nomido-photo-ai-service:latestContains ONNX Runtime and pre-configured vision pipelines with zero cloud API calls.
- L39restartLifecycleAI Service Restart Policy
restart: unless-stoppedKeeps the local machine learning inference server running across reboots.
- L40environmentEnvironmentAI Model & Runtime Environment
environment:Controls which InsightFace ONNX model tier is loaded into memory.
- L41FACE_MODELHardware TunedInsightFace Detection Model (buffalo_m)
FACE_MODEL: buffalo_mConfigured for Medium mode (4 GB RAM): uses buffalo_m (buffalo_s for Low, buffalo_m for Medium, buffalo_l for High) for optimal balance between RAM and facial clustering precision.
- L42PYTHONUNBUFFEREDEnvironmentReal-Time Container Logging
PYTHONUNBUFFERED: 1Flushes Python stdout/stderr immediately so model loading and inference logs appear live in docker compose logs.
- L1versionGlobal SpecCompose Specification Version
version: "3.8"Declares Docker Compose file format 3.8, supporting service healthchecks, dependency conditions, and bridge networking.
- L2servicesRoot TopologyContainer Services Root
services:Defines the isolated multi-container stack: PostgreSQL vector database, Rust API backend, and Python AI sidecar.
Complete Sample .env File
# ============================================================== # Nomido-Photo-Backend Configuration (.env) # ============================================================== # Database (PostgreSQL with pgvector) DATABASE_URL=postgres://photo_user:secure_password_here@db:5432/photo_db # Security & Authentication (Generate with: openssl rand -hex 32) JWT_SECRET=please_generate_a_random_secret_at_least_32_chars_long # Storage & Paths STORAGE_PATH=./data/storage LOG_PATH=./data/logs LOG_LEVEL=info # Network & Server Port SERVER_PORT=8080 APP_URL=https://photos.yourdomain.com # AI Microservice (Sidecar) AI_SERVICE_URL=http://ai-service:8000 FACE_MODEL=buffalo_m TOTAL_THREAD_NUMBER=4 # -------------------------------------------------------------- # Local-Only / Air-Gapped Mode: # Leave HUB_API_KEY empty to disable all external cloud relay. # -------------------------------------------------------------- # HUB_API_KEY=
Custom Reverse Proxy Setup (Nginx Example)
server {
listen 443 ssl http2;
server_name photos.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/photos.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/photos.yourdomain.com/privkey.pem;
client_max_body_size 500M; # Support large camera video uploads
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}