gitroomhq/postiz-app · error · Error

Registration is disabled

Error message

Registration is disabled

What it means

Registration gate checked during CreateOrgUserDto signup. canRegister(provider) returns false when the deployment's configuration disables new signups (e.g. registration disabled flag/env), so creating a new org+user is rejected.

Source

Thrown at apps/backend/src/services/auth/auth.service.ts:56

    ip: string,
    userAgent: string,
    addToOrg?: boolean | { orgId: string; role: 'USER' | 'ADMIN'; id: string }
  ) {
    if (provider === Provider.LOCAL) {
      if (process.env.DISALLOW_PLUS && body.email.includes('+')) {
        throw new Error('Email with plus sign is not allowed');
      }
      if (body instanceof CreateOrgUserDto) {
        body.email = body.email.toLowerCase();
      }
      const user = await this._userService.getUserByEmail(body.email);
      if (body instanceof CreateOrgUserDto) {
        if (user) {
          throw new Error('Email already exists');
        }

        if (!(await this.canRegister(provider))) {
          throw new Error('Registration is disabled');
        }

        const create = await this._organizationService.createOrgAndUser(
          body,
          ip,
          userAgent
        );

        const addedOrg =
          addToOrg && typeof addToOrg !== 'boolean'
            ? await this._organizationService.addUserToOrg(
                create.users[0].user.id,
                addToOrg.id,
                addToOrg.orgId,
                addToOrg.role
              )
            : false;

View on GitHub (pinned to 0f1647f749)

Solutions

  1. Enable registration in the instance configuration (env/setting consumed by canRegister)
  2. Use an invite/organization-add flow instead of public signup
  3. If you are the admin, check the canRegister implementation for which flag controls it
Defensive patterns

Strategy: fallback

Validate before calling

const canRegister = await api.getRegistrationStatus();
if (!canRegister) { throw new Error('Registration is closed on this server'); }

Try / catch

try {
  await signup(dto);
} catch (err) {
  if (err.message === 'Registration is disabled') { window.location.href = '/login'; }
  throw err;
}

Prevention

When it happens

Trigger: POST signup with a brand-new email while the registration-enabled setting is false; existing-user login is unaffected.

Common situations: Self-hosted instances or closed beta deployments where admin disabled registration via env/config and users still hit the public signup endpoint.

Related errors


AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27). Data as JSON: /api/errors/3f301ae94abc2f02. Report an issue: GitHub.