Skip to main content
Goose server (goosed) provides a REST API for all Goose functionality, enabling web applications, remote clients, and multi-user deployments. This guide covers deployment strategies, configuration, and best practices.

Overview

The goose-server crate provides:
  • REST API: HTTP endpoints for session management, message streaming, and configuration
  • Multi-user support: Isolated sessions per user
  • Extension management: Dynamic MCP server configuration
  • Streaming responses: Server-Sent Events (SSE) for real-time AI responses

Architecture

Quick Start

Running Locally

The server starts on http://127.0.0.1:3000 by default.

Using Docker

Goose provides a multi-stage Dockerfile for minimal production images:
Build and run:

Docker Compose

Configuration

Environment Variables

The server uses the same configuration system as the CLI. See crates/goose-server/src/configuration.rs for implementation details.

Configuration File

Place config.yaml in ~/.config/goose/ (or use GOOSE_CONFIG_DIR):

API Reference

OpenAPI Specification

The server provides an OpenAPI spec at ui/desktop/openapi.json. Generate it after server changes:

Key Endpoints

Session Management

Create Session
Response:
Get Session
List Sessions

Message Streaming

Send Message (Server-Sent Events)
Response (SSE stream):

Extension Management

List Extensions
Enable Extension
Disable Extension

Production Deployment

Security Considerations

The server does not include built-in authentication. Deploy behind a reverse proxy with authentication for production use.
Recommended setup:

Extension Allowlist

Restrict which MCP servers can be loaded using an allowlist:
Allowlist format:
The allowlist prevents command injection by rejecting additional arguments. See crates/goose-server/ALLOWLIST.md for details.

Resource Limits

Memory: Goose sessions store conversation history in memory. Plan for ~10-50MB per active session. CPU: Primarily bound by AI provider latency. Goose itself is lightweight. Storage: Sessions are persisted to disk:
  • Location: ~/.local/share/goose/sessions/
  • Size: ~1-5KB per message

Monitoring

Goose uses structured logging via tracing. Configure log levels:
Log to file:
For production monitoring, integrate with OpenTelemetry (see Telemetry).

Kubernetes Deployment

Scaling Considerations

Stateful Sessions

Sessions are currently stored per-instance. For multi-instance deployments:
  1. Sticky sessions: Route users to the same instance
  2. Shared storage: Mount a shared filesystem for session data
  3. Session migration: Export/import sessions between instances (future feature)

Database Integration

For persistent session storage, consider implementing a custom session manager:
See crates/goose/src/session/session_manager.rs for the session storage interface.

Troubleshooting

Server won’t start

Connection timeouts

Increase timeout for slow AI providers:

SSE not working

Ensure your reverse proxy doesn’t buffer responses:

Resources

  • Server implementation: crates/goose-server/src/
  • Route handlers: crates/goose-server/src/routes/
  • OpenAPI spec: ui/desktop/openapi.json
  • Configuration: crates/goose-server/src/configuration.rs