Self-Host Guide
Deploy Elydora on your own infrastructure with a single command. Full control over your data with Docker Compose.
Prerequisites
Ensure the following tools are installed on your server or local machine:
- Docker 24+
- Docker Compose v2.20+
- OpenSSL
- curl
One-Command Install
Clone the repository and run the install script:
git clone https://github.com/Elydora-Infrastructure/Elydora-Open-Source.git
cd Elydora-Open-Source
./scripts/install.shThe install script:
- Checks all prerequisites (Docker, Docker Compose, OpenSSL, curl)
- Generates cryptographic secrets (Ed25519 signing key, session secret, database and object-store passwords)
- Starts all services via Docker Compose
- Waits for the API to become healthy
Services
Once running, the following services are available:
| Service | URL | Description |
|---|---|---|
| Console | http://localhost:3000 | Web management console |
| API | http://localhost:8787 | REST API server |
| MinIO Console | http://localhost:9001 | Object storage console |
Verify Installation
Check that the API is healthy:
curl http://localhost:8787/v1/healthExpected response:
{
"status": "healthy",
"version": "v1",
"protocol_version": "1.0",
"timestamp": 1772287200000
}Create Your First Account
Register an organization and admin user through POST /v1/auth/register or the console at http://localhost:3000/register, then issue an API token for SDK use:
# Register the organization and its first user
curl -X POST http://localhost:8787/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your-secure-password",
"display_name": "Admin",
"org_name": "Acme"
}'
# Issue an API token for SDK use with the session token from the response
curl -X POST http://localhost:8787/v1/auth/token \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-session-token>" \
-d '{"ttl_seconds": 7776000}'Connect SDKs to Your Local Instance
Point any Elydora SDK to your local server by setting the baseUrl parameter:
import { ElydoraClient } from '@elydora/sdk';
const client = new ElydoraClient({
orgId: 'your-org-id',
agentId: 'my-agent',
privateKey: process.env.AGENT_PRIVATE_KEY,
baseUrl: 'http://localhost:8787', // point to your local instance
});import os
from elydora import ElydoraClient
client = ElydoraClient(
org_id="your-org-id",
agent_id="my-agent",
private_key=os.environ["AGENT_PRIVATE_KEY"],
base_url="http://localhost:8787", # point to your local instance
)Install Agent Hooks
For AI coding agents like Claude Code, install the Elydora hook pointing to your local instance. Interactive installs collect secrets through echo-disabled prompts; automation reads them from owner-only files:
npx @elydora/sdk install \
--agent claudecode \
--org_id "your-org-id" \
--agent_id "your-agent-id" \
--kid "your-key-id" \
--base_url "http://localhost:8787"npx @elydora/sdk install \
--agent claudecode \
--org_id "your-org-id" \
--agent_id "your-agent-id" \
--kid "your-key-id" \
--base_url "http://localhost:8787" \
--private_key_file "/secure/path/private.key" \
--token_file "/secure/path/api.token"Environment Variables
The install script generates a .env file from .env.example with the following variables. All secrets are generated by the script; edit the file to change ports, origins, or TSA anchoring:
# PostgreSQL
POSTGRES_USER=elydora
POSTGRES_PASSWORD=<auto-generated>
POSTGRES_DB=elydora
DATABASE_URL=postgresql://elydora:<auto-generated>@postgres:5432/elydora
# Redis
REDIS_URL=redis://redis:6379
# MinIO (S3-compatible object storage)
MINIO_ROOT_USER=elydora
MINIO_ROOT_PASSWORD=<auto-generated>
MINIO_ENDPOINT=http://minio:9000
MINIO_ACCESS_KEY=elydora
MINIO_SECRET_KEY=<auto-generated>
MINIO_BUCKET=elydora-evidence
# Elydora API
PORT=8787
ENVIRONMENT=production
API_VERSION=v1
PROTOCOL_VERSION=1.0
BETTER_AUTH_SECRET=<auto-generated>
BETTER_AUTH_URL=http://localhost:8787
ELYDORA_SIGNING_KEY=<auto-generated Ed25519 key>
ALLOWED_ORIGINS=http://localhost:3000
# TSA (optional RFC 3161 timestamp authority)
TSA_URL=http://timestamp.sectigo.com
# Console
NEXT_PUBLIC_API_BASE_URL=http://localhost:8787Managing Your Deployment
Common commands for managing your self-hosted Elydora instance:
# Re-running is safe; secrets are kept when .env exists
./scripts/install.sh
# Or manually restart services
docker compose up -d
# View logs
docker compose logs -f api