Chelabase

Self-hosted vs platform

Every rule that differs between self-hosted mode and platform mode, from one policy table in the code.

CHELABASE_MODE is self-hosted (the default: an instance you install and operate) or platform (the hosted cloud, not built yet). Every decision that depends on the mode lives in one place in the code, ModePolicy, so nothing else compares the mode. Platform mode fails closed: where a feature isn't designed for it yet, the answer is refused (403 not_available_in_platform_mode) rather than falling back to the self-hosted behaviour.

In practice

  • Sign-up. Self-hosted has no self-sign-up unless a tenant admin turns on open sign-up. People who sign up then wait as pending members for an admin to approve them. Platform mode refuses self-sign-up until it is designed. See Members and invites.
  • Instance settings (/v1/instance/settings, open sign-up) are for the active tenant admin when self-hosted; in platform mode they are for members of the operator tenant (CHELABASE_OPERATOR_TENANT_ID), and nobody passes while it is unset. The open sign-up switch exists only when self-hosted.
  • How members are made. Only explicitly, in both modes: by an accepted invite, an approved sign-up, or (self-hosted) the claim of a fresh install, whose first sign-up needs the setup code that init-secrets printed (see Install; claim before exposing Studio; the loser of a simultaneous race is admitted as pending). A signed-in account with no member row is refused.
  • Safety defaults (email verification, password strength, owner superuser, pre-hashed passwords, the CA file on reveal) are relaxed for local use in self-hosted mode and strict in platform mode. CHELABASE_REQUIRE_EMAIL_VERIFICATION overrides email verification in either mode. Secure cookies follow the public scheme in both modes (Secure with https), and platform mode requires https.

Correctness and safety checks are the same in both modes: the access rules in Access per route apply identically.

Every rule

This table is generated from ModePolicy and checked by a test (just check).

RuleWhat it decidesSelf-hostedPlatform
instance_adminWho may use instance-level routes.active tenant adminmember of the operator tenant
sign_upWhether a visitor may create their own account.gated by the tenantrefused
open_signup_switchableWhether the tenant may switch open sign-up on.truefalse
email_verification_defaultWhether sign-ups must verify their email by default.falsetrue
owner_superuser_allowedWhether a database's owner role may be a superuser.truefalse
password_strength_forcedWhether role passwords must pass the strength check.falsetrue
prehashed_passwords_allowedWhether role passwords may be supplied pre-hashed.truefalse
ca_file_on_revealWhether revealing connection details includes the dev CA path.truefalse
default_internal_token_allowedWhether the services may start with the development internal bearer (a platform instance refuses to start with it).truefalse

On this page