Skip to main content
Server settings apply to everything one Mirage server runs: its port, sign-in, rate limits, and the ceilings every workspace on it stays under. They are separate from workspace settings, which each workspace sets for itself. Each setting comes from the first of these that sets it:
  1. An option, for a Python or TypeScript server started in code, or the Cloudflare app.
  2. Its environment variable, such as MIRAGE_MAX_SESSIONS.
  3. Its key in the [daemon] section of ~/.mirage/config.toml.
A server started in code takes idle_grace_seconds only as an option (idleGraceSeconds in TypeScript); its default is 30. port, workers and worker_type are only for mirage daemon: in code, the host program serves the app. The Cloudflare app has no config.toml. It reads only the sign-in settings and the six ceilings, max_workspaces to max_env, from options or the Worker’s variables. Its max_sessions defaults to 4.

Set a value

mirage daemon config edits ~/.mirage/config.toml:
The file then holds:
~/.mirage/config.toml
Changes apply on the next start. mirage daemon config get|unset|list read and remove keys.

Settings

Each key’s environment variable is MIRAGE_ and the key in capitals: max_sessions is MIRAGE_MAX_SESSIONS.

CLI keys

config.toml also holds two keys the server ignores. The mirage CLI reads them to reach the server on this machine: To reach another server, run mirage login URL. See Log in.

Outside config.toml

Two settings are only environment variables: