goats

command
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 54 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package main — first-boot admin bootstrap.

This file implements the one-shot admin bootstrap that consumes the GOATFLOW_ADMIN_PASSWORD environment variable.

Background: migration 000002 seeds the system admin (root@localhost) with a random OTRS-compatible password and valid_id = 2 (disabled), so no credential exists that a new install can log in with. Deployments that set GOATFLOW_ADMIN_PASSWORD (e.g. the TrueNAS community app, where it comes from the "Admin Password" field in the install wizard) expect that value to become the initial admin password automatically.

Safety model — the bootstrap is strictly first-boot-only:

  • It only runs when the seeded admin row still exists AND is in its factory-disabled state (valid_id <> 1). The UPDATE itself carries the same condition, so even a race between the check and the write cannot clobber a live account.
  • After a successful application it records a marker (sysconfig_modified: admin.bootstrap.applied = "true"). If the environment variable is still set afterwards (or a stale wizard value lingers after the user changed the password via the UI), every future startup is a no-op.
  • The marker is written only AFTER the user update succeeded, so a failed or interrupted run retries on the next boot.

Failure semantics: any error here is logged and ignored — the server still starts, exactly like a migration warning. A failed bootstrap must never take the app down.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL