Build in silence. Deploy with purpose.
A calm, focused, self-hosted sanctuary for AI-assisted coding. Monastery is a fully self-hosted, browser-based AI coding environment where you prompt local or frontier LLMs to generate, edit, run, debug, and deploy full applications. The harness runs as a standalone service (Docker-first) and connects to LLM backends over the network.
This is an in progress project.
- Decoupled Architecture: Harness runs independently of LLM servers. Auto-discovery or manual config for local endpoints.
- 100% Self-Hosted: Everything containerized, network-aware, and privacy-focused.
- Lightweight: Harness container <1GB RAM idle; works on low-power nodes.
- Homelab Native: Deep integrations with Proxmox, Coolify, PocketBase, MQTT, etc.
- OpenAI-Compatible: Works with Ollama, vLLM, llama.cpp, OpenAI, Groq, and more.
- Docker and Docker Compose
- An LLM endpoint (e.g., Ollama, vLLM, or OpenAI API key)
git clone https://github.com/jherforth/Monastery.git
cd Monastery
cp .env.example .envEdit .env to configure your LLM endpoint:
# For Ollama on same host (Linux/Mac):
LLM_BASE_URL=http://host.docker.internal:11434
# For Ollama in separate container:
LLM_BASE_URL=http://ollama:11434
# For OpenAI:
LLM_BASE_URL=https://api.openai.com/v1
OPENAI_API_KEY=sk-...docker compose up -dThe harness will be available at http://localhost:3000.
- Open the web UI at
http://localhost:3000 - Navigate to Settings → LLM Endpoints
- Add your LLM endpoint or use auto-discovery to find Ollama on your LAN
- Test the connection and start prompting!
┌─────────────┐ HTTP ┌──────────────┐
│ Browser │ ◄──────────► │ Harness │
│ (Web UI) │ WebSocket │ (Rust) │
└─────────────┘ └──────┬───────┘
│
┌──────────┼──────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌────────┐ ┌─────────┐
│ Ollama │ │ vLLM │ │ OpenAI │
│ (local) │ │(local) │ │(cloud) │
└──────────┘ └────────┘ └─────────┘
- Backend: Rust (Axum) - lightweight, safe, performant
- Frontend: React + TypeScript with Vite - modern, responsive UI with Monaco editor
- Database: SQLite - embedded, easy backup
- Sandbox: Docker-based isolated execution
- LLM Client: OpenAI-compatible protocol
- Styling: Tailwind CSS with custom Monastery theme
| Environment Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3000 |
DATA_DIR |
Data directory path | ./data |
LOG_LEVEL |
Logging level | info |
LLM_BASE_URL |
Default LLM endpoint | - |
DISABLE_DISCOVERY |
Disable mDNS discovery | false |
GET /api/health- Health checkGET /api/models- List available modelsPOST /api/models/:id/chat- Stream chat completionGET /api/endpoints- List configured endpointsPOST /api/endpoints- Add new endpointDELETE /api/endpoints/:id- Remove endpointPOST /api/endpoints/:id/test- Test connectivityGET /api/discovery- Discover local services
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build
cargo build --release
# Run
cargo runcargo testThe built-in wizard helps you:
- Generate
docker-compose.ymlfor your generated apps - Configure network connections between services
- Set up reverse proxies (Traefik, Nginx)
- Deploy to Coolify, Proxmox, or Kubernetes
- Minimal outbound connectivity by default
- Sandboxed code execution
- No unnecessary permissions
- Encrypted credential storage (optional)
MIT License - see LICENSE for details.
Contributions welcome! Please read our contributing guidelines before submitting PRs.
Built with calm intention for the homelab community
"Build in silence. Deploy with purpose."