Immich Stack
Self-hosted photo and video management solution with facial recognition, object detection, and smart search - running natively on FreeBSD.

What is Immich?
Immich is a high-performance, self-hosted alternative to Google Photos. It provides automatic backup from mobile devices, facial recognition, object detection, location-based browsing, and a modern web interface. The Daemonless stack runs entirely on native FreeBSD - no Linux emulation required.
Architecture
The Immich stack consists of four containers:
| Service | Image | Description |
|---|---|---|
| Server | ghcr.io/daemonless/immich-server |
Main application server (Node.js) - Web UI and API |
| Machine Learning | ghcr.io/daemonless/immich-ml |
Python/ONNX service for facial recognition and smart search |
| PostgreSQL | ghcr.io/daemonless/immich-postgres |
Database with pgvector extension for ML embeddings |
| Redis | ghcr.io/daemonless/redis |
Cache and job queue |
PostgreSQL Version
immich-postgres:latest and :14 are both PostgreSQL 14 — the current default, matching upstream Immich.
New installs can use :18 (PostgreSQL 18). Upgrading an existing database requires a full dump/restore.
Upstream Immich is working on a migration path; we'll update these docs when that lands.
flowchart TD
Client[Mobile / Web Client]
Client -->|:2283| Server
subgraph stack [Immich Stack]
Server[immich-server<br/>Web UI + API]
Server -->|:3003| ML[immich-ml<br/>Python/ONNX]
Server -->|:5432| DB[immich-postgres<br/>pgvector]
Server -->|:6379| Redis[redis<br/>cache]
end
click Server "immich-server.md" "immich-server"
click ML "immich-ml.md" "immich-ml"
click DB "immich-postgres.md" "immich-postgres"
click Redis "redis.md" "redis"
Version Tags
These tags apply to the immich-server image (set via IMMICH_TAG):
| Tag | Description | Best For |
|---|---|---|
latest |
Current stable release, built from the latest upstream Immich release. | Most users. |
beta |
Beta release built from upstream v3.0.0-rc.0. | Testing upcoming releases early. |
Prerequisites
Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions.
Requirements:
- FreeBSD 15.0 with Podman and ocijail
podman-compose- At least 4GB RAM (ML service is memory-intensive)
- Storage for photos (plan for growth)
Deploy
FreeBSD Jail Parameters Required
Immich needs allow.mlock and allow.sysvipc jail parameters. Requires ocijail 0.5.0+.
1. Save as .env:
2. Save as compose.yaml:
3. Deploy:
1. Save as .env:
2. Save as appjail-director.yml:
3. Save as immich-postgres-template.conf:
4. Save as Makejail:
5. Create the volume directories and deploy:
Access Immich at: http://your-host:2283
Environment Variables
| Variable | Default | Description |
|---|---|---|
UPLOAD_LOCATION |
/containers/immich/library |
Path to store uploaded photos and videos |
DB_DATA_LOCATION |
/containers/immich/postgres |
Path to store PostgreSQL database files |
DB_PASSWORD |
postgres |
PostgreSQL password (change this!) |
DB_USERNAME |
postgres |
PostgreSQL username |
DB_DATABASE_NAME |
immich |
PostgreSQL database name |
TZ |
System default | Timezone (e.g., America/Los_Angeles) |
Ports
| Port | Service | Description |
|---|---|---|
2283 |
immich-server | Web UI and API |
3003 |
immich-ml | Machine Learning API (internal) |
5432 |
immich-postgres | PostgreSQL (internal) |
6379 |
redis | Redis cache (internal) |
Network Mode
The stack uses network_mode: host for simplicity on FreeBSD. All services communicate via localhost. Only port 2283 needs to be exposed externally.
FreeBSD-Specific Notes
PostgreSQL Shared Memory
PostgreSQL requires System V IPC for shared memory. The compose file includes:
This annotation is processed by ocijail to allow the jail access to shared memory.
Machine Learning Performance
The immich-ml container uses:
- Native FreeBSD onnxruntime - Custom-built wheel with FreeBSD support
- CPU inference - GPU acceleration not currently supported on FreeBSD
- HuggingFace models - Downloaded on first run (~1GB cache)
First startup may be slow as ML models are downloaded. Subsequent starts are fast.
Management
View Logs
Restart Stack
Stop Stack
Update Images
Component Documentation
For detailed configuration of individual services:
| Component | Documentation |
|---|---|
| Server | immich-server |
| Machine Learning | immich-ml |
| PostgreSQL | immich-postgres |
| Redis | redis |
Troubleshooting
ML service keeps restarting
Check memory - the ML service needs at least 2GB RAM:
Database connection errors
Ensure PostgreSQL has started and the sysvipc annotation is working:
Photos not uploading from mobile
Ensure port 2283 is accessible from your network. Check firewall rules:
Facial recognition not working
The ML service downloads models on first use. Check if models are cached:
Implementation Details
- Platform: Native FreeBSD 15.0 (no Linux emulation)
- Runtime: ocijail (FreeBSD jails as OCI containers)
- ML Backend: onnxruntime with custom FreeBSD wheel
- Database: PostgreSQL 14 with pgvector extension
- Process Manager: s6