Skip to content

Services & Resource Optimization

Services List

ServiceSubdomainImageRAM LimitProfilePurpose
Proxytraefik.h5h.meTraefik v3256 MBcoreReverse proxy + auto TLS
SSOauth.h5h.meAuthentik800 MBcoreLogin, 2FA, Google sign-in, OIDC
SSO Worker(internal)Authentik512 MBcoreBackground tasks
SSO DB(internal)Postgres 16 Alpine256 MBcoreAuthentik database
SSO Cache(internal)Redis 7 Alpine64 MBcoreAuthentik Redis
Dashboardsh.h5h.meHomepage128 MBcoreService dashboard + widgets
Tunnelcloudflared128 MBcoreZero-trust tunnel
Photosphotos.h5h.meImmich512 MBphotosGoogle Photos replacement
Photos ML(internal)Immich ML1.5 GBphotosFace/object recognition
Photos DB(internal)Postgres 14 + pgvectors512 MBphotosImmich database
Photos Cache(internal)Valkey 8 Alpine128 MBphotosImmich Redis
Drivedrive.h5h.meNextcloud512 MBdriveGoogle Drive replacement
Drive DB(internal)Postgres 16 Alpine512 MBdriveNextcloud database
Drive Cache(internal)Redis 7 Alpine64 MBdriveNextcloud Redis
Notesnotes.h5h.meObsidian (Web UI + Git)1 GBdriveBrowser-based Obsidian
Mediaplex.h5h.mePlex512 MBplexMovies, TV, music
Torrentstorrent.h5h.meqBittorrent + VueTorrent256 MBplexSeedr-like torrent → Plex pipeline
Monitoringgrafana.h5h.meGrafana OSS192 MBmonitoringDashboards + security panel
Metricsprometheus.h5h.mePrometheus256 MBmonitoringTime-series DB (15d retention)
Host MetricsNode Exporter64 MBmonitoringOS-level metrics
VPNTailscale128 MBvpnMesh VPN + subnet router
IDSCrowdSec256 MBsecurityIntrusion detection
IDS BouncerCrowdSec Bouncer64 MBsecurityBlocks bad IPs at proxy
LogsLoki 3.4.3256 MBsecurityLog aggregation (30d)
Log ShipperPromtail 3.4.364 MBsecurityShips logs to Loki
Backupdocker-volume-backup256 MBbackupNightly data backups (7d)

26 services, ~8.0 GB total

8 GB RAM optimization

Every container has a mem_limit + critical services have memswap_limit (prevents swap thrashing). Default 26 containers total ~8.0 GB — you cannot run everything at once on 8 GB.

ProfileCommandRAM UsedWhat you get
Minimalmake core~2.1 GBDashboard + SSO + Proxy + Tunnel
+ Photosmake photos~4.3 GB+ Immich (server + ML + DB + Redis)
+ Drivemake drive~5.4 GB+ Nextcloud (app + DB + Redis) + Obsidian
+ Mediamake plex~5.9 GB+ Plex + qBittorrent
+ Monitoringmake monitoring~6.4 GB+ Grafana + Prometheus + Node Exporter
+ Securitymake security && make vpn~7.1 GB+ CrowdSec + Loki + Tailscale

Stay under ~6 GB to leave headroom for OrbStack VM (~500 MB) and macOS (~1.5 GB).

Key optimizations

OptimizationWhat it does
Postgres shared_buffers=128MBPrevents Postgres from hogging RAM
Immich ML MODEL_TTL=300Unloads ML models after 5 min idle
CrowdSec bouncer firstDrops malicious packets early (Latency savings)
Log rotation (10 MB × 3 files)Caps log disk usage
memswap_limit = mem_limitPrevents swap thrashing on Postgres instances
bash
brew install --cask orbstack

OrbStack uses ~50% less RAM than Docker Desktop and has faster VirtioFS I/O (faster Immich thumbnails, Nextcloud indexing).

Docker base OS

On MacBook Air M1, Docker Desktop runs a lightweight Alpine Linux VM (arm64) as the host. All container base images have native arm64 support — no Rosetta emulation needed.

External dependencies worth knowing

  • Obsidian (notes.h5h.me) — on first boot only, the container uses DOCKER_MODS=linuxserver/mods:universal-git + the obsidian/init.sh hook to clone https://github.com/callmehetch/notes-obsidian into /config. If the vault volume is wiped or this repo disappears, the first start will begin empty. See external_dependencies.md.
  • Immich machine-learning — the ML container downloads models on demand. MACHINE_LEARNING_MODEL_TTL=300 unloads them after 5 minutes idle; a cold search therefore re-pulls the model into immich-model-cache.

Image pinning

Most services run :latest. See upgrade_runbook.md for the policy (which images are hard-pinned, which are rolling, how to bump safely).

Single source of truth

This doc explains why the services look the way they do. The what (one row per service, subdomain, image, RAM, profile, SSO tier) is maintained in service_catalog.md and regenerated from docker-compose.yml + docker/scripts/setup_rbac.py by make gen-docs.

MIT License