# Installation & Setup: Environment & ports

> Variables, defaults and where data lives.

Glider documentation · Getting Started · Web page: https://cgglider.com/docs/installation/environment/

Sections of this page: [Requirements](https://cgglider.com/docs/installation.md) · [Run locally](https://cgglider.com/docs/installation/run-locally.md) · [Environment & ports](https://cgglider.com/docs/installation/environment.md) · [Hardware & extras](https://cgglider.com/docs/installation/hardware.md)

| Variable | Default | Effect |
| --- | --- | --- |
| PORT | 4004 | Port for the Next.js server. The dev script passes it through to next dev -p. |
| MONGODB_URI | mongodb://glider:glider@127.0.0.1:27018/glider?authSource=admin | Database connection. The database name is taken from the URI path, falling back to glider. The desktop app starts its own MongoDB and sets this itself, unless you set it. |
| GLIDER_STREAMDECK | off | Set to 1 to run the Stream Deck driver regardless of the setting, or 0 to keep it out of the process entirely. |
| GLIDER_LOCAL_AGENTS | on | Set to 0 to hide the Claude Code / Cursor Agent CLIs from the agent chat even when installed. |
| GLIDER_AGENTIC_TIMEOUT_MS | unset (no limit) | Optional cap on how long one agent chat run may take before it is stopped. |
| GLIDER_PUBLIC_ORIGIN | — | Public origin used when Glider has to build an absolute URL for itself. |
| GLIDER_UNIFIED_RUNTIME | — | Set to 1 to opt into the unified runtime profile. The NEXT_PUBLIC_ variant exposes the same flag to the client. |
| GLIDER_DATA_ROOT | project folder | Folder that holds data/ and public/<id>/. The desktop app points it at its app-data folder. |

## On disk

| Path | Contents |
| --- | --- |
| data/pages/<id>.json | The saved page. |
| data/pages/<id>.files.json | That page's file store. |
| data/pages/<id>.secrets.json | Its secrets. |
| data/pages/<id>.runtime.json | Its desired runtime state, restored on server boot. |
| data/streamdeck.json | The machine-level Stream Deck profile. |
| public/<id>/ | Files uploaded to the page, served at /<id>/… |

> **Desktop app:** The installed app keeps data/ and the uploads folder under its app-data folder instead, so updates never touch them: ~/Library/Application Support/Glider/workspace on macOS, %APPDATA%\Glider\workspace on Windows.

> **Do not hand-edit page JSON:** The running app owns these files. Editing data/pages/*.json while the dev server is up gets clobbered on the next write — go through the editor or the HTTP API.
