Skip to content

Deployment

Baldri edited this page Feb 11, 2026 · 1 revision

Deployment

Mingly can run as a desktop app (Standalone) or as a headless Node.js server for team and integration use cases.

Quick Start (Docker)

The fastest way to run the full stack:

git clone https://github.com/Baldri/mingly.git
cd mingly
docker compose up -d

This starts three services:

Service Port Description
Mingly Server 3939 REST + WebSocket API
Qdrant 6333 Vector database for RAG
RAG Server 8001 Document embedding (Python FastAPI)

Verify:

curl http://localhost:3939/health

Quick Start (Node.js)

git clone https://github.com/Baldri/mingly.git
cd mingly
npm install
npm run build:server
npm run start:server

The server starts on http://0.0.0.0:3939.

Configuration

Environment Variables

Variable Default Description
MINGLY_PORT 3939 Server port
MINGLY_HOST 0.0.0.0 Bind address
MINGLY_DATA_DIR ./data Database and file storage
MINGLY_REQUIRE_AUTH false Enable API key authentication
MINGLY_API_KEY API key (required if auth enabled)
MINGLY_LOG_LEVEL info Log level (debug, info, warn, error)
NODE_ENV Set to production for JSON logging

Config File

Alternatively, create mingly-server.config.json in the project root:

{
  "port": 3939,
  "host": "0.0.0.0",
  "dataDir": "./data",
  "requireAuth": true,
  "apiKey": "your-secret-key",
  "logLevel": "info"
}

Priority order: Environment variables > Config file > Defaults

Authentication

Enable authentication to secure the API:

  1. Set MINGLY_REQUIRE_AUTH=true
  2. Set MINGLY_API_KEY=your-secret-key
  3. All requests must include Authorization: Bearer your-secret-key

Docker Details

Dockerfile

The server uses a multi-stage build (Dockerfile.server):

  1. Builder stage: Node.js 20 Alpine, installs dependencies, compiles TypeScript
  2. Production stage: Node.js 20 Alpine, production dependencies only, built-in healthcheck

Docker Compose Services

Qdrant (Vector Database):

  • Image: qdrant/qdrant:v1.7.4
  • Ports: 6333 (REST), 6334 (gRPC)
  • Persistent volume: qdrant_data
  • Health check: HTTP on /healthz

RAG Server (Embeddings):

  • Built from rag-server/Dockerfile
  • Port: 8001
  • Volumes: rag_models (model cache), watched directories
  • Depends on: Qdrant (healthy)

Mingly Server:

  • Built from Dockerfile.server
  • Port: 3939
  • Volume: mingly_data (database)
  • Depends on: Qdrant (healthy)
  • Environment variables passed through

Custom Docker Compose

Override settings with docker-compose.override.yml:

services:
  mingly-server:
    environment:
      - MINGLY_REQUIRE_AUTH=true
      - MINGLY_API_KEY=my-secret-key
      - MINGLY_LOG_LEVEL=debug

Server Features

  • REST API — Full chat, conversation, and provider management
  • WebSocket — Real-time streaming chat
  • Session limits — Max 50 concurrent WebSocket connections (configurable)
  • CORS — Configurable allowed origins
  • Graceful shutdown — Handles SIGTERM/SIGINT, persists database

See API-Reference for endpoint documentation.

Logging

Environment Format Levels
Development Human-readable All (debug+)
Production (NODE_ENV=production) JSON info+

Monitoring

Health Check

curl http://localhost:3939/health

Returns provider status, uptime, and version. The Docker container includes a built-in healthcheck that polls this endpoint every 30 seconds.

Server Info

curl http://localhost:3939/info

Returns active sessions, available providers, and model list.

Client Connection

To connect a Mingly desktop client to the server:

  1. Open Settings > Network & AI Server
  2. Select Client mode
  3. Enter the server URL (e.g., http://192.168.1.100:3939)
  4. Enter the API key if authentication is enabled
  5. Click Connect

The client uses the server's API keys and shares conversations with other connected clients.


Back to: Home | Related: Architecture | API-Reference | Installation

Clone this wiki locally