Skip to content
Trailer.devDocumentation

Search is only available in production builds. Try building and previewing the site to test it out locally.

Server Mode

The server web dashboard after login, showing connected hosts and workspaces.

The server coordinates the platform: it stores desired state, exposes the API, serves the web client, and answers agents. It is published as a container image:

Terminal window
docker pull ghcr.io/trailer-dev/server:latest

The ghcr.io/trailer-dev registry path is set at release time. Your deployment’s registry and organization may differ. Adjust the image reference to match where your images are published.

  • Authentication and authorization.
  • Storing hosts, images, and workspaces in the database.
  • Serving the REST API and the React web client.
  • Accepting agent registrations and heartbeats, and answering reconciliation polls.
  • Workspace access control, including forward-auth for workspace URLs.

The server reads configuration from a YAML file (default ~/.config/trailer.dev/config.yml), overridable by CLI flags. There is no environment-variable binding for these flags. The most relevant flags for the server are:

FlagDefaultPurpose
--server-url, -Shttp://localhost:8090Bind address. The host and port are parsed from this URL.
--data-directory, -dtrailer_dataDirectory for the server database.
--config-file, -C~/.config/trailer.dev/config.ymlConfiguration file location.

In the published server image the entrypoint defaults to -S http://0.0.0.0:8090, which binds on all interfaces.

Minimal config.yml:

server_url: http://0.0.0.0:8090
data_directory: trailer_data

A separate set of server-only settings (admin bootstrap, SMTP, backups, file storage) is read from TRAILER_* environment variables. See Environment variables for the full list, including which apply once on first start versus on every start.

Terminal window
docker run -d \
-p 8090:8090 \
ghcr.io/trailer-dev/server:latest

Agents connect to the server over HTTP and a realtime connection. When an agent connects it registers and receives its per-host settings. It then periodically reports liveness and metrics (host, GPU, and workspace), polls for the host’s desired state, and serves interactive sessions (logs, exec, attach, proxy) over the realtime connection.

The web client and any integrations talk to the server through its REST API.

The server handles storage, auth, API routing, and migrations. The database lives under the configured data directory (trailer_data by default).

The server serves the React and TypeScript web client. It provides the dashboard, host and workspace management, image building, user management, and real-time updates.

  • Expose the configured port and place TLS termination in front of the server for production.
  • Persist the data directory across restarts.
  • Configure the TRAILER_APP_* settings for the initial superuser and any SMTP, backup, or upload integrations.