Admin CLI

Note

If you followed the docker compose based deployment, you can use the bbblb.sh wrapper to run bbblb inside the container.

bbblb

Usage: bbblb [OPTIONS] COMMAND [ARGS]...

Options

Option

Help

-C, --config-file FILE

Load config from file

-c, --config KEY=VALUE

Set or unset a BBBLB config parameter

-v, --verbose

Increase verbosity. Can be repeated. [default: 0]

Sub-Commands

Sub-Command

Help

db

Manage the database schema

maketoken

Generate admin- and other and API tokens.

recording

Recording management.

server

Manage BBB servers.

state

Tools to import or export cluster state as JSON files.

tenant

Manage tenants.

db

Usage: bbblb db [OPTIONS] COMMAND [ARGS]...

Manage the database schema

Sub-Commands

Sub-Command

Help

migrate

Migrate the configured database to the current schema version.

db migrate

Usage: bbblb db migrate [OPTIONS]

Migrate the configured database to the current schema version.

WARNING: Make backups!

Options

Option

Help

--create

Create database if needed (only postgres).

maketoken

Usage: bbblb maketoken [OPTIONS] SUBJECT [SCOPE]...

Generate admin- and other and API tokens.

The SUBJECT should be a short name or id that identifies the token or token owner. It will be logged when the token is used.

SCOPEs limit the capabilities and permissions for this token. If no scope is defined, the token will have admin privileges.

Tenant or Server tokens do not have scopes, their permissions are hard coded because tenants or servers can create their own tokens.

Options

Option

Help

-t, --tenant TEXT

Create a Tenant-Token instead of an Admin-Token.

-s, --server TEXT

Create a Server-Token instead of an Admin-Token.

-e, --expire SECONDS

Number of seconds after which this token should expire. [default: -1]

-v, --verbose

Print the clear-text token to stdout.

SUBJECT

Required argument

SCOPE

Optional argument

recording

Usage: bbblb recording [OPTIONS] COMMAND [ARGS]...

Recording management.

Sub-Commands

Sub-Command

Help

list

List all recordings and their formats

delete

Delete recordings (all formats)

publish

Publish recordings

unpublish

Unpublish recordings

import

Import one or more recordings from a tar archive

check-database

(experimental) Report and optionally fix issues with the recording database.

recording list

Usage: bbblb recording list [OPTIONS]

List all recordings and their formats

Options

Option

Help

--tenant TEXT

Filter by tenant

--format TEXT

Filter by format

recording delete

Usage: bbblb recording delete [OPTIONS] [RECORD_ID]...

Delete recordings (all formats)

Options

Option

Help

RECORD_ID

Optional argument

recording publish

Usage: bbblb recording publish [OPTIONS] [RECORD_ID]...

Publish recordings

Options

Option

Help

RECORD_ID

Optional argument

recording unpublish

Usage: bbblb recording unpublish [OPTIONS] [RECORD_ID]...

Unpublish recordings

Options

Option

Help

RECORD_ID

Optional argument

recording import

Usage: bbblb recording import [OPTIONS] [FILE]

Import one or more recordings from a tar archive

Options

Option

Help

--tenant TEXT

Override the tenant found in the recording

--publish / --unpublish

Publish or unpublish recording after import

FILE

Optional argument

recording check-database

Usage: bbblb recording check-database [OPTIONS]

(experimental) Report and optionally fix issues with the recording database.

This command scans the actual recording data found on disk and checks for missing or inconsistent database entries. It can be used to repair or rebuild the recordings database after a crash or when your database backup is missing a few recordings.

Warning, this command may run for a while and consume a lot of memory if you have many recordings. It is also NOT safe to run this command while BBBLB is running and processing new recordings. Stop all BBBLB API and worker processes before starting a scan, especially with fixes enabled. Make backups!

Options

Option

Help

--prefix TEXT

Only scan recording with IDs starting with this prefix. [default: ""]

--fix-orphans

Remove recordings or formats that do not exist on disk.

--fix-missing

Import missing recordings or formats found on disk.

--fix-state

Fix the published/unpublished state of recordings to match the on-disk state.

--fix-tenant

Fix the recording owner to match their on-disk storage path, which contains the tenant name.

--fix-metadata

(NOT IMPLEMENTED) Fix the recording metadata from the most recend on-disk backup.

--fix-all

Fix everything that can be fixed automatically.

server

Usage: bbblb server [OPTIONS] COMMAND [ARGS]...

Manage BBB servers.

Sub-Commands

Sub-Command

Help

create

Create a new server or update a server secret.

enable

Enable servers and make them available for new meetings.

disable

Disable servers and optionally wait for meetings to end.

delete

Remove an empty server from the cluster.

list

List all servers with their secrets.

stats

Show server statistics (state, health, load).

server create

Usage: bbblb server create [OPTIONS] DOMAIN

Create a new server or update a server secret.

Options

Option

Help

-U, --update

Update the server with the same domain, if present.

--secret TEXT

Set the server secret. Required for new servers

DOMAIN

Required argument

server enable

Usage: bbblb server enable [OPTIONS] [DOMAINS]...

Enable servers and make them available for new meetings.

Options

Option

Help

DOMAINS

Optional argument

--now

Skip health checks and make the server available for new meetings immediately.

server disable

Usage: bbblb server disable [OPTIONS] [DOMAINS]...

Disable servers and optionally wait for meetings to end.

Disabling a server by default does not interrupt running meetings, it just prevents new meetings from being assigned to that server.

You can --wait for meetings to end on their own, or --nuke them.

If there are still running meetings after --wait seconds, the process will end with status code 3.

Options

Option

Help

DOMAINS

Optional argument

--nuke

End all meetings immediately.

--wait INTEGER

Seconds to wait for meetings to end. A value of -1 waits forever. [default: 0]

server delete

Usage: bbblb server delete [OPTIONS] DOMAIN

Remove an empty server from the cluster.

The command will fail if the server still has running meetings.

Options

Option

Help

DOMAIN

Required argument

server list

Usage: bbblb server list [OPTIONS]

List all servers with their secrets.

Options

Option

Help

--table-format [simple|plain|raw|json]

Change the result table format. [default: simple]

server stats

Usage: bbblb server stats [OPTIONS]

Show server statistics (state, health, load).

Options

Option

Help

--table-format [simple|plain|raw|json]

Change the result table format. [default: simple]

state

Usage: bbblb state [OPTIONS] COMMAND [ARGS]...

Tools to import or export cluster state as JSON files.

Sub-Commands

Sub-Command

Help

export

Export current cluster state as JSON.

import

Load and apply server and tenant configuration from JSON.

state export

Usage: bbblb state export [OPTIONS] [FILE]

Export current cluster state as JSON.

Options

Option

Help

-i, --include LIST

Comma separated list of resource types to include in the export. [default: servers,tenants]

FILE

Optional argument

state import

Usage: bbblb state import [OPTIONS] [FILE]

Load and apply server and tenant configuration from JSON.

WARNING: This will modify or remove tenants and servers without asking. Try with --dry-run first if you are unsure.

Obsolete servers and tenants are disabled by default. Use --clean to fully remove them.

Servers and tenants with meetings cannot be removed. Use --nuke to forcefully end all meetings on obsolete servers or meetings.

Options

Option

Help

--nuke

End all meetings related to obsolete servers or tenants

--delete

Remove obsolete server and tenants instead of just disabling them.Combine with --nuke to force removal.

-n, --dry-run

Simulate changes without changing anything.

-i, --include LIST

Comma separated list of resource types to include in the export. [default: servers,tenants]

FILE

Optional argument

tenant

Usage: bbblb tenant [OPTIONS] COMMAND [ARGS]...

Manage tenants.

Sub-Commands

Sub-Command

Help

create

Create a new tenant.

enable

Enable a tenant.

disable

Disable (lock out) a tenant.

list

List all tenants and their configuration.

override

Manage tenant overrides.

tenant create

Usage: bbblb tenant create [OPTIONS] NAME

Create a new tenant.

Options

Option

Help

-U, --update

Update the tenant with the same name, if any.

--realm TEXT

Set tenant realm. Defaults to '{name}.{DOMAIN}' for new tenants.

--secret TEXT

Set the tenant secret. Defaults to a randomly generated string for new tenants.

NAME

Required argument

tenant enable

Usage: bbblb tenant enable [OPTIONS] NAME

Enable a tenant.

Options

Option

Help

NAME

Required argument

tenant disable

Usage: bbblb tenant disable [OPTIONS] NAME

Disable (lock out) a tenant.

Options

Option

Help

NAME

Required argument

--nuke

End all meetings owned by this tenant.

tenant list

Usage: bbblb tenant list [OPTIONS]

List all tenants and their configuration.

Options

Option

Help

--table-format [simple|plain|raw|json]

Change the result table format. [default: simple]

--with-overrides

Include overrides in listing.

--with-secret

Include secret in listing.

tenant override

Usage: bbblb tenant override [OPTIONS] TENANT

Manage tenant overrides.

Tenant overrides affect the parameters of create or join API calls coming from a tenant.

You can --set any number of overrides per tenant as PARAM=VALUE pairs. PARAM should match a BBB API parameter supported by the given type (create or join) and VALUE will be enforced on all future API calls issued by this tenant. If VALUE is empty, then the parameter will be removed from API calls.

Instead of the = operator you can also use PARAM?VALUE to define a fallback for missing parameters, PARAM<VALUE to define a maximum value for numeric parameters (e.g. 'duration' or 'maxParticipants'), or PARAM+VALUE to add items to a list-type parameter (e.g. 'disabledFeatures').

Example: --set record=false --set duration<40

Options

Option

Help

TENANT

Required argument

--type [create|join]

Change the API call this override should apply to [default: create]

--set PARAM=VALUE

Set or replace an override for a specific API parameter. Can be repeated for additional parameters.

--unset PARAM

Remove an override for a specific API parameter. Can be repeated for additional parameters.

--clear

Remove all overrides before adding new ones.