Module Flags

Last updated

Feature-gate the panel’s major subsystems. When a module is off, the panel hides the corresponding pages and the require_module middleware short-circuits handler execution.

Flags

All on server_settings, boolean. dns, mail, security, quota and api default to true on upgrades so nothing disappears silently. The Docker, Python and PostgreSQL switches default to off:

FieldModule
dns_enabledDNS zones + records
mail_enabledMailboxes, forwarders, mail groups, deliverability, throttles
security_enabledCrowdSec, AppSec, AppArmor, Snuffleupagus surface
quota_enabledPackage quotas and enforcement
api_enabledPublic automation API
docker_marketplace_enabledDocker engine and the admin’s 1-click Docker apps (Server Settings → Apps)
docker_apps_for_users_enabledDocker apps for hosting users. Needs docker_marketplace_enabled (Server Settings → Apps)
python_apps_enabledPython apps. Turning it on installs the runtime (Server Settings → Apps)
postgres_enabledPostgreSQL databases. Turning it on installs the engine (Server Settings → Databases)

The first five are under Server Settings → Modules. The other four are under Server Settings → Apps and Databases.

Fresh installs seed the flags from the JABALI_MODULES environment variable at first boot — the migration only sets defaults for pre-existing rows. The installer turns on docker_marketplace_enabled, docker_apps_for_users_enabled and postgres_enabled only once that module has installed; if it fails, the switch stays off. python_apps_enabled follows the python_apps choice.

To pick modules at install time (profiles, JABALI_MODULES, --dry-run), see Choosing modules.

API

  • PATCH /api/v1/admin/settings — set individual flags.
  • GET /api/v1/admin/settings/modules/status — read current module state.
  • POST /api/v1/admin/settings/modules/install — trigger the install-on-enable hook when flipping a module back on.

Behavior

  • Panel navigation hides sections whose module is off.
  • Handlers behind require_module return 403 module_disabled when hit directly.
  • Enabling a module later runs its install-on-enable hook (e.g. bringing up services, seeding defaults).

Server settings — cache & registrar & DNS policy

Related admin knobs that ship alongside the module flags on the same settings page:

Nginx FastCGI cache:

  • nginx_cache_max_size_gb (default 4) — total shared cache size.
  • nginx_cache_keyzone_mb (default 64) — metadata zone size.
  • nginx_cache_inactive_min (default 60) — inactivity timeout.

Domain registrar expiry — domains.registrar_expires_at and domains.registrar_checked_at populated by the domain_expiry_ticker reconciler via WHOIS. Rendered in the DNS Zones list without hitting WHOIS per row. Failed lookups still stamp checked_at so the ticker doesn’t hammer-retry.

DNS user record policy — server_settings.dns_user_record_policy is a JSON matrix restricting which record types non-admin users can create / edit / delete on their own zones:

{
  "A":     {"create": true, "edit": true, "delete": true},
  "AAAA":  {"create": true, "edit": true, "delete": true},
  "CNAME": {"create": true, "edit": true, "delete": true},
  "MX":    {"create": true, "edit": true, "delete": true},
  "TXT":   {"create": true, "edit": true, "delete": true},
  "SRV":   {"create": true, "edit": true, "delete": true},
  "CAA":   {"create": true, "edit": true, "delete": true}
}

Default is fully permissive to preserve current behavior. Presets are exposed in the UI so admins don’t hand-edit JSON.

Tenant nginx options — server_settings.tenant_domain_options_enabled (default off) lets domain owners set domains.nginx_safe_options (max body size, HSTS, security headers, gzip). Rendered from a safe template — no raw nginx directives, no proxy_pass, no ip_access (SSRF-safe by construction).

CrowdSec login allowlist

Auto-allowlist source IPs of successful panel + SSH logins so a normal admin logging in from home doesn’t get banned mid-session.

  • crowdsec_login_allowlist_enabled (default on) — master switch.
  • crowdsec_login_allowlist_ttl_hours (default 168 = 7 days) — refreshed on every successful login.

Sync happens via security.crowdsec.login_allowlist.apply writing /etc/jabali-panel/login-allowlist.conf. See also CrowdSec Allowlists for manual entries.