-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Normally no extra configuration is required:
- The SPA calls
/graphqlon the same origin as the Unraid web UI. - The compose API is resolved as
./compose_api.phpnext toindex.htmlunder/plugins/undockerui/dist/.
If your GraphQL endpoint is not same-origin /graphql, rebuild with:
cd web
VITE_GRAPHQL_URL=https://your-host.example/graphql npm run buildThis bakes the override into the static JS. Most Unraid installs do not need this.
Unraid API keys, GraphQL sandbox, and Management Access: see the wiki guide Unraid API and keys (official Unraid docs linked there).
Environment variables are read from a .env file in the repository root (parent of web/), because web/vite.config.ts sets envDir: '..'.
Copy .env.example to .env in the repo root. Vite loads UNRAID_* keys in vite.config.ts only (not bundled into JS). VITE_GRAPHQL_URL is optional and only affects production builds.
| Variable | Role |
|---|---|
UNRAID_IP |
Fallback host when full URLs are omitted. |
UNRAID_GRAPHQL |
Full GraphQL URL; overrides IP + port when set. |
UNRAID_GRAPHQL_PORT |
Used when UNRAID_GRAPHQL is empty (default 8081). |
UNRAID_WEBGUI |
Web GUI origin for compose_api.php proxy (include port, e.g. :80). |
UNRAID_API_KEY |
Optional; dev proxy sends x-api-key on /graphql. |
UNRAID_KEY |
Legacy alias for UNRAID_API_KEY. |
In dev, the SPA always calls /graphql on the Vite host so those UNRAID_* values apply to the proxy only.
Dev server proxies (see vite.config.ts):
-
/graphql→ Unraid GraphQL (optionalx-api-key). -
/plugins/undockerui/dist/compose_api.php(and alternate path) →UNRAID_WEBGUIorigin.
Run:
npm run devfrom repo root (delegates to web/) or cd web && npm run dev.
- Docker must be enabled for the menu item to appear.
- User permissions follow Unraid’s roles: users without Docker rights will see GraphQL permission errors.
-
API / GraphQL for developers — Enabling sandbox, API keys, and
x-api-key: Unraid API and keys.