Files
nexusAI/docs/deployment/homelab.md
2026-04-06 05:00:12 -07:00

2.0 KiB

Homelab Deployment

Overview

NexusAI is distributed across three nodes. Each node runs only the services appropriate for its hardware.

Mini PC 1 — 192.168.0.81

Runs: Qdrant, Memory Service, Embedding Service

ssh username@192.168.0.81
cd ~/nexusai
docker compose -f docker-compose.mini1.yml up -d  # Qdrant
npm run memory
npm run embedding

Mini PC 2 — 192.168.0.205

Runs: Gitea, Orchestration Service, Chat Client (via Caddy)

ssh username@192.168.0.205

cd ~/gitea
docker compose up -d        # Gitea

cd /opt/stacks/network
docker compose up -d        # Caddy, Authelia, and other network services

cd ~/nexusai
npm run orchestration

Main PC

Runs: Ollama, Inference Service

ollama serve
npm run inference

Chat Client Deployment

The chat client is a React + Vite app build to static files and served by Caddy on Mini PC 2 (Infrastructure node). It does not run as a Node process

# On dev machine or Mini PC 2 after git pull
cd ~/nexusAI/packages/chat-client
npm run build
# Output lands in packages/chat-client/dist/
# Caddy serves this directory directly via volume mount

Caddy config (/opt/docker/caddy/Caddyfile):

nexus.jellystorm.com {
    import authelia

    handle /chat* {
        reverse_proxy 192.168.0.205:4000
    }

    handle /sessions* {
        reverse_proxy 192.168.0.205:4000
    }

    handle {
        root * /srv/nexusai
        try_files {path} /index.html
        file_server
    }
}

The Caddy container mounts the dist directory via Docker volume:

- /home/storme/nexusAI/packages/chat-client/dist:/srv/nexusai

After adding or changing volume mounts, a full docker compose down caddy && docker compose up -d caddy is required. Caddyfile-only changes only need docker compose restart caddy.

Environment Files

Each node needs a .env file in the relevant service package directory. These are not committed to git. See each service's documentation for required variables.