Skip to main content
The gateway is the engine of Spaceduck. It runs on your machine and manages everything: chat streaming, memory, tools, file uploads, and configuration.

Starting the gateway

The web UI is served directly by the gateway — open http://localhost:3000 in your browser.

Where data lives

All data stays on your machine. Nothing is sent anywhere except to the model provider you configure.

Ports and access

The gateway listens on port 3000 by default. Change it with the PORT environment variable in .env. Clients connect over HTTP (config API, file uploads) and WebSocket (chat streaming). Both use the same port.

Environment variables

These are deployment knobs only — product settings (provider, model, API keys) are managed in the Settings UI or via the CLI.

API routes

The gateway exposes HTTP and WebSocket endpoints. All routes except health and pairing require authentication.

Configuration system

Spaceduck uses a single config file (spaceduck.config.json5) validated by a Zod schema. You can modify it through three surfaces:

Hot-apply vs restart

Some settings take effect immediately, others require a gateway restart:
Changing embedding provider, model, or dimensions requires a restart and may invalidate existing vector memory.