# Organizations, members and roles

> The organization a self-hosted Neurouter runs, the owner, admin and viewer roles, invite links, removing members, and how data is kept apart per organization.

> Pre-release: Neurouter v0.1 is in development; this page documents the v0.1 design.

Source: https://neurouter.com/docs/organizations · Last updated: 2026-11-26

Since 0.4.0, everything in Neurouter (servers, environments, API keys, evals, the audit log, settings) belongs to an **organization**, and people get access to it as **members** with a role. A self-hosted installation runs exactly one organization, `default`. Its MCP URLs stay `/mcp/{server}/{env}`, and the console shows no organization switcher.

## Upgrading into the default organization

An installation upgraded from 0.3.x becomes the `default` organization, and every existing user becomes a member with the role they had: admins stay admins, viewers stay viewers. The first admin (`BOOTSTRAP_ADMIN_EMAIL`, or `admin@localhost` for the local sign-in link) becomes its **owner**; where there is none, the oldest active admin is promoted to owner. See [Deploy](https://neurouter.com/docs/deployment#upgrading-to-0-4-0) for the upgrade steps.

On a new installation, the first admin is the owner. With OIDC, a person signing in for the first time joins the default organization with the role from their claims (`OIDC_ADMIN_GROUPS` → admin, everyone else `OIDC_DEFAULT_ROLE`); later sign-ins keep following the claims until an owner changes that person's role in the console. Owners always stay owners.

## Roles

| What | Viewer | Admin | Owner |
|---|:-:|:-:|:-:|
| See servers, tools, environments, tasks, inbox, evals, audit log, API keys and settings | ✓ | ✓ | ✓ |
| See the member list | ✓ | ✓ | ✓ |
| Import and edit servers, overlays and environments; enable writes | | ✓ | ✓ |
| Triage the inbox; run evals | | ✓ | ✓ |
| Create and revoke API keys | | ✓ | ✓ |
| Change settings | | ✓ | ✓ |
| Create, list and revoke invites (as admin or viewer) | | ✓ | ✓ |
| Change a member's role or status; remove a member | | | ✓ |

The server checks every endpoint against these roles; the console only hides what you can't use. Owners can't be invited: an owner promotes a member to owner.

## Invites

Settings → Members → **Invite** takes an email address and a role (admin or viewer) and returns a link. Neurouter sends no email: copy the link and pass it on yourself. The link is:

- **shown once:** only a hash of its token is stored;
- **single use:** the first acceptance uses it up;
- **valid for 7 days;**
- **bound to the email address:** the person must sign in with an account whose verified email is that address, or accepting is refused. An invited address gets past `OIDC_ALLOWED_EMAIL_DOMAINS`.

Inviting the same address again revokes the older pending link. Pending invites can be revoked from the same page. Accepting an invite never lowers a role someone already has.

## Changing and removing members

Only owners change roles and statuses (active or disabled) and remove members. The console asks for confirmation before you change your own role or status and before you demote an owner.

- **Last-owner guard:** the organization always keeps at least one active owner. Demoting, disabling or removing the last one is refused (`409`).
- **Removed members** keep their user account and can still sign in, but they see "You are not a member of any organization" until someone invites them again.
- **Disabled members** keep their membership and role but can't use the console until re-enabled.

## The organization's name

The console shows one name for the organization everywhere: the **Instance name** in Settings → General, or `instance.name` in [`neurouter.yaml`](https://neurouter.com/docs/configuration) (then read-only in the console). Without either, it is the `ORG_NAME` environment variable, `Neurouter` by default.

## Isolation

Each organization's data is kept apart below the API as well: stored secrets are encrypted with the organization's own data-encryption key (wrapped under your master keys, and refused if copied into another organization's rows), and the audit log keeps a separate hash chain per organization, so verifying one organization's log never depends on another's. Rows written before the upgrade stay verifiable as the original instance-wide chain. On multi-tenant deployments, each organization's MCP endpoints are `/mcp/{organization}/{server}/{env}`, and OAuth consent requires membership in the organization that owns the endpoint.
