Skip to main content

Overview

Loom server is the HTTP API server that handles thread persistence, LLM proxy, authentication, and weaver provisioning. It can be deployed using NixOS (recommended), Docker, or as a standalone binary.

Deployment Methods

NixOS

Production-ready with auto-updates

Docker

Containerized deployment

Binary

Manual installation

NixOS Deployment

The production Loom server runs on NixOS with automatic git-based deployments. Pushing to trunk triggers a rebuild within 10 seconds.

Installation

1

Import the Loom server module

Add to your NixOS configuration:
configuration.nix
2

Enable and configure the service

configuration.nix
3

Configure LLM providers

Enable at least one LLM provider:
configuration.nix
API keys are loaded from files, not inline values. Store keys in /run/secrets/ using agenix or sops-nix.
4

Deploy the configuration

5

Verify the service is running

Auto-Update Service

The production deployment uses nixos-auto-update.service for automatic deployments:
nixos-auto-update.nix
Monitoring deployments:

Docker Deployment

Loom provides a multi-stage Dockerfile that builds both the Rust server and Svelte web UI.

Building the Image

Running the Container

Docker Compose

docker-compose.yml

Standalone Binary

Building from Source

1

Install Rust toolchain

2

Clone the repository

3

Build loom-server

The binary will be at ./target/release/loom-server
4

Run the server

Using Nix

Build with Nix for reproducible binaries:

Health Checks

The server provides a /health endpoint for monitoring:
Response:

Troubleshooting

Check the logs:
Common issues:
  • Database file permissions
  • Port already in use (check with ss -tlnp | grep :8080)
  • Missing API keys
  • Invalid database path
Migrations run automatically on startup. If they fail:
  1. Check database file permissions
  2. Ensure the directory exists and is writable
  3. Check disk space
  4. Review migration logs for specific errors
Force migration retry:
If you see Address already in use errors:

Security Hardening

The NixOS module includes security hardening via systemd:

Next Steps

Configure Environment Variables

Complete configuration reference

Setup Kubernetes for Weavers

Deploy weaver execution environments

Database Migrations

Manage schema changes

Authentication

Configure OAuth and SSO