invoke-ai/InvokeAI · warning · HTTPException

Multiuser mode is disabled. Admin setup is not required in s

Error message

Multiuser mode is disabled. Admin setup is not required in single-user mode.

What it means

The /auth/setup endpoint exists only to create the first admin in multiuser mode. When multiuser is off, admin setup is unnecessary (there's a single implicit user), so setup_admin raises 403 with this detail before doing anything.

Source

Thrown at invokeai/app/api/routers/auth.py:375

    This endpoint can only be called once, when no admin user exists. It creates
    the first admin user for the system.

    Args:
        request: Admin account details (email, display_name, password)

    Returns:
        SetupResponse containing the created admin user

    Raises:
        HTTPException: 400 if admin already exists or password is weak
        HTTPException: 403 if multiuser mode is disabled
    """
    config = ApiDependencies.invoker.services.configuration

    # Check if multiuser is enabled
    if not config.multiuser:
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="Multiuser mode is disabled. Admin setup is not required in single-user mode.",
        )

    user_service = ApiDependencies.invoker.services.users

    # Check if any admin exists
    if user_service.has_admin():
        raise HTTPException(
            status_code=status.HTTP_400_BAD_REQUEST,
            detail="Administrator account already configured",
        )

    # Create admin user - this will validate password strength
    try:
        user_data = UserCreateRequest(
            email=request.email,
            display_name=request.display_name,

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Enable multiuser (invokeai-web --multiuser) before running setup
  2. Skip the setup step in single-user mode — no admin account is needed
  3. Gate onboarding code on a multiuser flag/capability endpoint
  4. Update automation scripts to detect mode before calling /auth/setup

Example fix

// before
await api.post('/auth/setup', adminPayload); // 403 in single-user mode
// after
if (serverConfig.multiuser) { await api.post('/auth/setup', adminPayload); }
Defensive patterns

Strategy: fallback

Validate before calling

cfg = requests.get(f'{base}/app/config').json()
if not cfg.get('multiuser', False):
    print('Single-user mode: admin setup not needed, skipping /auth/setup')

Type guard

def needs_admin_setup(server_config: dict) -> bool:
    return bool(server_config.get('multiuser', False))

Try / catch

try:
    resp = requests.post(f'{base}/auth/setup', json=payload)
    resp.raise_for_status()
except requests.HTTPError as e:
    if e.response.status_code == 403 and 'single-user' in e.response.json().get('detail', ''):
        skip_setup_and_continue()

Prevention

When it happens

Trigger: POSTing to /auth/setup (setup_admin) on a server started without multiuser enabled.

Common situations: Setup wizard or bootstrap script unconditionally calling setup; running the same onboarding flow against a single-user install; environment where multiuser was turned off after the client was configured for multiuser onboarding.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/9986132e6256d81c. Report an issue: GitHub.