How to Deploy Agent-Memo on Your Own Server with Docker
Step-by-step guide to running Agent-Memo privately on your infrastructure. One Docker command, includes PostgreSQL, embedding model, and admin dashboard. No external API calls.
TL;DR: Deploy Agent-Memo on your own server in under 10 minutes. One install script sets up Docker, PostgreSQL, the embedding model, and the admin dashboard. No external dependencies after initial setup.
Prerequisites
- A Linux server (Ubuntu 22.04 or 24.04 recommended)
- Minimum 4 CPU cores and 8GB RAM (the BGE-M3 embedding model needs ~2GB)
- Docker and Docker Compose installed
- A valid Agent-Memo self-hosted license key
Step 1: Download and install
Download the release tarball and run the install script:
tar -xzf agent-memo-private-v1.0.0.tar.gz cd agent-memo-private chmod +x install.sh ./install.sh
The install script generates secure random passwords for PostgreSQL and JWT, creates the Docker Compose configuration, and builds the container image.
Step 2: Start the services
docker compose up -d
This starts PostgreSQL and the Agent-Memo application. The first boot takes 1-2 minutes as the embedding model initializes. Subsequent starts are fast.
Step 3: Run the setup wizard
Open http://your-server:8080 in your browser. The setup wizard guides you through 4 steps:
- License — Paste your license key for validation
- Admin account — Create the first admin user
- Configuration — Set company name and preferences
- Done — Login and start using the dashboard
Step 4: Connect your agents
Create .mcp.json in your project root:
{
"mcpServers": {
"agent-memo": {
"command": "npx",
"args": ["-y", "@agent-memo/mcp-client"],
"env": {
"AGENTMEMO_TOKEN": "your-api-token",
"AGENTMEMO_API_URL": "http://your-server:8080"
}
}
}
}Get your API token from the dashboard (Settings → API tab). The token is a standard JWT — same format as the cloud version.
Architecture
The self-hosted deployment is a single Docker Compose stack:
- app container — Node.js backend + Next.js frontend + BGE-M3 embedding model (~1GB image)
- postgres container — PostgreSQL 16 with pgvector for semantic search
Data is persisted in Docker volumes. The embedding model is bundled in the image, so no internet access is needed after deployment.
Backup and restore
# Backup ./backup.sh # Creates timestamped SQL dump # Restore ./restore.sh backup-2026-04-10.sql
Upgrading
# Download new release, then: ./upgrade.sh
The upgrade script rebuilds the Docker image and restarts the container. Database migrations run automatically on startup.
SSL/HTTPS
For production use, put a reverse proxy (Nginx, Caddy, or Traefik) in front of the application with SSL termination. The app listens on port 8080 by default.
Troubleshooting
- Container won't start — Check
docker compose logs app. Most common: insufficient RAM for the embedding model - Slow first request — The embedding model loads on first API call (~10 seconds). Subsequent calls are fast
- Agent can't connect — Ensure the server is reachable from the developer's machine. Check firewall rules for port 8080