Skip to content

Authentication

By default, people sign in to Ryot with an email address and password. You can also let them sign in with an existing account from an OpenID Connect (OIDC) provider such as Google, Authentik, Authelia or Keycloak, and you can turn off passwords entirely.

Anyone who can reach your server can create an account until you stop it. To make your server private, create the accounts you need, then set:

Terminal window
USERS_ALLOW_REGISTRATION=false

This blocks new accounts from both the sign-up page and OpenID Connect. Existing accounts keep working.

  1. In your OIDC provider, create one application (sometimes called a client) for Ryot.

  2. Register this redirect URL (also called a callback URL), replacing <FRONTEND_URL> with your server’s address:

    <FRONTEND_URL>/api/auth/callback/oidc

    Allow the openid, email and profile scopes.

  3. Set the provider’s details on Ryot:

    Terminal window
    FRONTEND_URL=https://ryot.example.com
    SERVER_OIDC_CLIENT_ID=********
    SERVER_OIDC_CLIENT_SECRET=********
    SERVER_OIDC_ISSUER_URL=https://accounts.google.com

    The issuer URL is the address Ryot adds /.well-known/openid-configuration to when it looks up your provider.

  4. Optional: change the sign-in button’s text, for example FRONTEND_OIDC_BUTTON_LABEL=Use Google.

  5. Restart Ryot.

Set all three SERVER_OIDC_* variables or none of them. If only some are set, Ryot refuses to start.

You only register the one web redirect URL. Do not add iOS or Android redirect URLs at your provider: the Ryot mobile apps sign in through your server.

To require everyone to sign in with OIDC, also set:

Terminal window
USERS_DISABLE_LOCAL_AUTH=true

Ryot refuses to start with this setting unless OIDC is fully configured. With passwords turned off, the sign-in page sends people straight to your OIDC provider, and nobody can sign up with a password.

FRONTEND_URL must be the exact address people open Ryot at, such as https://ryot.example.com or http://192.168.1.50:8000. Do not add a path, query or # part. Sign-in, the mobile apps and browser security checks all depend on it, and Ryot refuses to start if it is invalid.

Plain HTTP works in a browser, including at a local network address such as http://192.168.1.50:8000. A few things are different:

  • Signing out shows an extra confirmation page.
  • The iOS and Android apps cannot connect, because those systems block plain HTTP.
  • Ryot logs a warning at startup when FRONTEND_URL uses HTTP for anything other than localhost.

API keys let scripts, automations and other apps use an account without signing in. Each person creates and revokes their own keys under Settings → Access. When you create a key, you choose what it may do:

  • Read only
  • Ask before each change
  • Allow changes without asking

Apps send the key in the X-Api-Key header. Keys can expire, are rate limited, and stop working as soon as they are revoked. Running custom queries with an API key requires Ryot Pro.

To connect an AI app, see Connect an AI app with MCP.

The provider says the redirect URL does not match. Register exactly <FRONTEND_URL>/api/auth/callback/oidc, using the same https:// or http://, domain and port as FRONTEND_URL.

Ryot does not start after adding OIDC settings. Check that all three SERVER_OIDC_* variables are set, and that USERS_DISABLE_LOCAL_AUTH is only true when they are.

New people cannot sign in with OIDC. USERS_ALLOW_REGISTRATION=false also blocks new accounts created through OIDC. Allow registration while they sign in for the first time.

The mobile app cannot connect. Use an HTTPS address for FRONTEND_URL.