Start server
- Static key (default)
- With DB-backed auth
--port > ISOL8_PORT > PORT > 3000. If the selected port is already in use, startup prompts for a different port or can auto-select one.
Pass --auth-db to enable DB-backed API key management. Without a value, it defaults to a SQLite database at ~/.isol8/auth.db. You can also pass a connection string — the backend is auto-detected:
- No value or file path (e.g.
./isol8-auth.db) → SQLite postgres://orpostgresql://→ PostgreSQLmysql://→ MySQL
--key value becomes the master key with admin privileges, and additional keys can be managed via the /auth/* endpoints. See Server routes for full endpoint reference.
What the server provides
- authenticated execution APIs (
/execute,/execute/stream,/execute/ws) - WebSocket streaming with automatic SSE fallback in
RemoteIsol8 - optional persistent sessions via
sessionId - file upload/download for active sessions
- global concurrency control via semaphore (
maxConcurrent) - idle session cleanup (
cleanup.autoPrune+cleanup.maxContainerAgeMs) - graceful shutdown cleanup (sessions, containers, and images)
Authentication model
isol8 supports two authentication modes that can work together:Static key (default)
Pass a single API key via--key. This key acts as the master key with full access to all endpoints including key management.
GET /healthis public- all other routes require
Authorization: Bearer <api-key> - missing header ->
401 - invalid token ->
403
DB-backed keys (optional)
Enable with--auth-db <connection> to store API keys in a database. Supported backends: SQLite (file path), PostgreSQL (postgres://), and MySQL (mysql://). When enabled:
- The
--keyvalue becomes the master key with admin privileges - Additional keys are created via
POST /auth/keys(master key required) - DB keys authenticate execution, file, and session endpoints
- DB keys cannot access admin endpoints (
/auth/*) — only the master key can - Keys have configurable TTL, tenant scoping, and can be revoked individually
POST /auth/loginexchanges the master key for a short-lived token
- Check static master key — sets
authType = "master" - Check DB key (if enabled) — sets
authType = "apikey"andtenantId - Reject with
401(missing header) or403(invalid token)
Execution architecture
Request envelope
POST /execute, POST /execute/stream, and GET /execute/ws accept:
Behavior rules
- no
sessionId: ephemeral execution (fresh engine lifecycle) - with
sessionId: server creates/reuses persistent session - request
optionsmerge over server config defaults poolStrategyandpoolSizeare always taken from server config- audit settings are applied from server config
Pool defaults (isol8 serve)
Server-created engines use config-level pool defaults:
poolStrategy(default:fast)poolSize(default:{ "clean": 1, "dirty": 1 })
API requests cannot override pooling per call. Set pooling once in
isol8.config.json for consistent server behavior.Auto-pruning and idle session cleanup
Whencleanup.autoPrune is enabled:
- cleanup sweep runs every
60_000ms - sessions idle longer than
cleanup.maxContainerAgeMsare stopped and removed - active sessions are skipped while currently executing
lastAccessedAtis updated on execute and file upload/download calls
cleanup.autoPrune:truecleanup.maxContainerAgeMs:3_600_000(1 hour)
Related pages
Server routes
Full endpoint-by-endpoint request and response reference.
Remote server and client
Practical remote usage patterns with CLI, API, and library examples.
Configuration reference
Defaults and cleanup settings that affect server behavior.
Performance tuning
Pool strategy, pool size, and concurrency tuning guidance.
Troubleshooting
Diagnose auth, session, and remote execution issues.