Skip to main content
Shux supports an admin-controlled policy file that can restrict what users can do in the app.
  • It is opt-in (no behavior changes unless enabled).
  • It is enforced server-side (users can’t bypass it via the UI, slash commands, or manual edits).
  • It is loaded at startup and refreshed every 15 minutes.

Enable the policy file

Set SHUX_POLICY_FILE to either:
  • an absolute path on the machine running Shux, or
  • a remote http:// / https:// URL that Shux can fetch.
If SHUX_POLICY_FILE is set but the file can’t be read/fetched/parsed/validated, Shux will block startup with an error.

File format

The policy file is strict JSON.
  • Unknown fields are rejected.
  • JSON must be valid (no comments, no trailing commas).
Example skeleton:

Provider and model access (provider_access)

If provider_access is omitted or an empty array, all providers are allowed. If provider_access is present, only providers listed there are allowed. Each entry supports:
  • id (required): provider ID (matches what you see in Settings → Providers)
  • base_url (optional): if set to a non-empty string, Shux forces that provider base URL
  • model_access (optional): list of allowed model IDs
model_access behavior:
  • If omitted, all models for that provider are allowed.
  • If present but an empty list, all models for that provider are allowed.
  • If non-empty, only the listed models are allowed.

Shux Gateway models

The Shux Gateway provider ID is mux-gateway. Gateway model IDs use the form:
  • anthropic/<modelId>
  • openai/<modelId>
  • google/<modelId>
  • xai/<modelId>
Example:

MCP restrictions (tools.allow_user_defined_mcp)

Control whether users can add/edit MCP servers themselves:
  • stdio applies to local stdio MCP servers.
  • remote applies to remote transports (http, sse, and auto).
If allow_user_defined_mcp is omitted, both are allowed.

Runtime restrictions (runtimes)

If runtimes is omitted or an empty array, all runtimes are allowed. If runtimes is present, only the listed runtime IDs are allowed:
  • local
  • worktree
  • ssh
  • ssh+coder
  • docker
  • devcontainer
Example: allow only worktrees and Coder-managed SSH:

Operational behavior

  • The policy is loaded at startup and refreshed every 15 minutes.
  • If a refresh fails, Shux keeps the last-known-good policy (it does not fall back to allow-all).
  • If the policy changes to disallow the currently selected provider/model/runtime, Shux will block the action (it will not auto-switch).

Troubleshooting

  • Shux won’t start and mentions policy: fix the policy file, or temporarily unset SHUX_POLICY_FILE.
  • Changes aren’t visible yet: policy reloads every 15 minutes (or restart Shux to reload immediately).
  • Need help finding provider IDs: see Providers and Models.