BASTIONOSDocs
bastion-os.com
EN

Operate

The bastionos command

The installer puts one command on the host. It runs from the installation directory, /var/dck/bastionos by default, and every subcommand is safe to read before you run it.

Subcommands#

Command Does
bastionos status services, version, health, certificates about to expire
bastionos upgrade [VERSION] backs up, then takes the bundle and the images of that version, the latest stable one by default; says so when the bastion is already up to date. --no-backup skips the backup
bastionos upgrade --edition enterprise swaps the control plane for the Enterprise one of the same version, after a license is imported. --edition community goes back. --bundle DIR takes the archive from a folder
bastionos backup [DIR] PostgreSQL, OpenBao, recordings and the encrypted secrets
bastionos restore DIR into an empty installation
bastionos admin-password [USER] sets a password, re-enables and unlocks the account, ends its sessions (break-glass)
bastionos certificate CRT KEY replaces the console's HTTPS certificate
bastionos apply starts again after an edit of deploy/compose/.env
bastionos logs [SERVICE...] follows the logs, for example bastionos logs controlplane ssh-gateway
bastionos compose ... any docker compose command on the stack
bastionos stop stops the stack, keeping every volume
bastionos version the installed version
bastionos help the full help, with the environment variables

Run them with sudo when the installation belongs to root. Messages are in French when the shell's language is French, in English otherwise.

If the shell does not find bastionos, run the installation line again: on an installed host, it recreates the link and upgrades. The full path always works: /var/dck/bastionos/bastionos.

The configuration file#

deploy/compose/.env in the installation directory holds the settings the installer wrote: address, ports, OpenBao, TLS mode, options. Edit it, then run sudo bastionos apply. Common settings:

Variable Default Meaning
BASTION_PUBLIC_URL https://<address> the console's address, used by passkeys and single sign-on
BASTION_BIND_ADDR 0.0.0.0 the host address the published ports listen on
BASTION_SSH_PORT, BASTION_RDP_PORT 2222, 3389 SSH and native RDP
BASTION_PG_PORT, BASTION_MYSQL_PORT 15432, 13306 PostgreSQL and MySQL clients
BASTION_MONGODB_PORT, BASTION_REDIS_PORT 17017, 16379 MongoDB and Redis clients
BASTION_KUBERNETES_PORT 16443 kubectl
BASTION_SQLSERVER_PORT, BASTION_ORACLE_PORT 11433, 12484 SQL Server and Oracle clients (Enterprise)
BASTION_MFA_REQUIRE_USERS true second factor for every user
BASTION_MFA_REQUIRE_ADMIN_KEYS false security keys for administrators
BASTION_AUDIT_RETENTION 400d audit retention, or off

The files in deploy/compose/.secrets/ are generated passwords and keys. Never edit or share them: back them up with bastionos backup.

Commands inside the control plane#

Some break-glass commands run inside the control plane container:

$ sudo bastionos compose exec -T controlplane service admin reset-mfa --username alice
$ sudo bastionos compose exec -T controlplane service admin panic status

They need only the database, so they work when OpenBao or the console are down. Each is audited.

The API#

The console is a client of the REST API under /api/v1, described by an OpenAPI contract. Everything the console does, a script can do: create assets and accounts, write policies, read the audit. A script signs in with POST /api/v1/auth/login, keeps the session cookie, and sends the session's CSRF token in X-CSRF-Token on every change. Scoped, expiring API tokens for scripts are planned.

© 2026 BastionOS · Source-available, self-hosted privileged access Contact