Complete reference for the bedrud command-line interface.
Synopsis
# Subcommand style
bedrud <command> [flags]
# Legacy flag style (systemd units)
bedrud --livekit --config <path>
bedrud --run --config <path>Global Flags
| Flag | Env | Description |
|---|---|---|
--config <path> | BEDRUD_CONFIG, CONFIG_PATH | Path to Bedrud YAML config |
--json | — | Machine-readable JSON output for management commands |
--version | — | Print version (also bedrud version) |
Default config path for run is config.yaml. Management commands (user, room, config, …) default to /etc/bedrud/config.yaml when installed.
Commands
run / server
Start the Bedrud meeting server with API, embedded web frontend, and embedded LiveKit (if configured).
bedrud run [--config <path>] [--skip-migrate]
bedrud server [--config <path>] [--skip-migrate]| Flag | Default | Description |
|---|---|---|
--config | BEDRUD_CONFIG / CONFIG_PATH / config.yaml | Path to Bedrud YAML config |
--skip-migrate | false | Skip database migrations on startup |
Behavior:
- Loads config from specified path or defaults
- Starts embedded LiveKit if not
livekit.external - Initializes SQLite/PostgreSQL and runs migrations (unless skipped)
- Fiber HTTP server with API routes + embedded React frontend
- ACME, self-signed TLS, manual TLS, or plain HTTP
- Graceful shutdown on SIGTERM/SIGINT
Implementation: server/internal/server/server.go, server/internal/cli/run.go
--livekit
Start the embedded LiveKit media server only. Extracts binary from Go embed to a temporary directory.
bedrud --livekit --config <path>| Flag | Default | Description |
|---|---|---|
--config | (required) | Path to LiveKit YAML config file |
Used by: init livekit service created by bedrud install
Implementation: server/internal/livekit/server.go
--run
Alias for bedrud run with same --config flag behavior. Used by init bedrud service.
bedrud --run --config <path>install
Install Bedrud on a Debian/Linux system. Creates init services (systemd, OpenRC, or SysV init — auto-detected), config files, directories, and TLS certificates.
bedrud install [flags]| Flag | Default | Description |
|---|---|---|
--tls | false | Enable HTTPS (same as --self-signed) |
--self-signed | false | Generate self-signed TLS certificate |
--no-tls | false | Disable TLS entirely (plain HTTP). Overrides --tls and --self-signed |
--ip | auto-detected | Override auto-detected server IP address |
--domain | "" | Domain name for Let’s Encrypt or self-signed cert |
--email | "" | Email for Let’s Encrypt registration |
--port | "443" (TLS) / "8090" (HTTP) | Override listening port |
--cert | "" | Path to existing PEM certificate file |
--key | "" | Path to existing PEM private key file |
--lk-port | "7880" | Override LiveKit API/WebSocket port |
--lk-tcp-port | "7881" | Override LiveKit RTC TCP port |
--lk-udp-port | "7882" | Override LiveKit RTC UDP port |
--fresh | false | Remove existing installation before installing |
--behind-proxy | false | Server is behind CDN/reverse-proxy (Cloudflare, nginx) |
--external-livekit | "" | URL of fully external LiveKit server (different machine) |
--livekit-domain | "" | Separate domain for local LiveKit server (bypasses CDN) |
--lk-ip | "" | Explicit LiveKit NodeIP when server is behind CDN |
What it does:
- Stops and removes prior installation if
--fresh - Prompts for IP, domain, email, TLS mode (if non-interactive and flags not provided)
- Creates directories:
/etc/bedrud,/var/lib/bedrud,/var/lib/bedrud/certs,/var/log/bedrud - Copies binary to
/usr/local/bin/bedrud - Generates Bedrud server config at
/etc/bedrud/config.yaml - Generates LiveKit media server config at
/etc/bedrud/livekit.yaml - Generates self-signed certs at
/etc/bedrud/cert.pem+/etc/bedrud/key.pem(if TLS enabled and no custom certs) - Creates LiveKit init service (unless using external LiveKit)
- Creates Bedrud init service
- Enables and starts services via detected init system
- Prints access URLs
TLS options:
--domain+--email→ ACME (Let’s Encrypt)--self-signedor--tls→ self-signed certificate--cert+--key→ custom certificates--no-tls→ plain HTTP only
LiveKit topology:
- Default (embedded): LiveKit runs locally, proxied through Bedrud at
/livekit --livekit-domain: LiveKit runs locally but clients connect directly via its own domain--external-livekit: No local LiveKit; connects to remote server
Implementation: server/internal/install/linux.go
Related docs: Installation Guide • Deployment Guide • Backend Deployment Logic
update / upgrade
Upgrade an existing Bedrud installation in place. update and upgrade are identical.
Preserves configuration, secrets, certificates, and the database. Replaces the installed binary with the currently running executable, runs versioned install migrations and database schema migrations, refreshes init service units, and restarts services.
bedrud update [flags]
bedrud upgrade [flags]| Flag | Default | Description |
|---|---|---|
--config | /etc/bedrud/config.yaml | Path to existing install config |
--skip-binary | false | Do not replace the installed binary (migrations + restart only) |
--skip-migrate | false | Skip database migrations |
--skip-restart | false | Do not stop/start init services |
--json | false | Machine-readable JSON output |
What it does:
- Verifies an existing install (
/etc/bedrud/config.yamlor--config) - Stops
bedrudandlivekitservices - Replaces the installed binary with this executable (skips overwrite for package-managed
/usr/bin/bedrudwhen the running binary is already that path; otherwise installs to/usr/local/bin) - Runs versioned install-state migrations when upgrading across releases that need them
- Runs database AutoMigrate (same as
bedrud db migrate/ server startup) - Rewrites init unit files so
ExecStartmatches the binary path and LiveKit topology - Enables and restarts services
- Records the new version in
/var/lib/bedrud/version
Typical workflows:
# Download latest binary, then upgrade in place
curl -fsSL https://bedrud.org/install.sh | bash -s -- --no-setup
sudo bedrud update
# Run the new release binary directly
sudo ./bedrud update
# Package manager already replaced the binary — only migrate + restart
sudo bedrud update --skip-binaryDoes not: rewrite config secrets, regenerate TLS certs, or remove data. For a clean reinstall use bedrud install --fresh.
Implementation: server/internal/install/update.go, version.go, services.go
Related docs: Installation Guide - Updating • Appliance Mode
uninstall
Remove Bedrud from the system.
bedrud uninstallRemoves:
- Stops and disables services across all init systems:
bedrud,livekit - Removes service files for systemd, OpenRC, and SysV init
- Removes binary:
/usr/local/bin/bedrud,/tmp/bedrud,/tmp/bedrud-livekit-server - Removes directories:
/etc/bedrud,/var/lib/bedrud,/var/log/bedrud - Removes system user:
bedrud
Implementation: server/internal/install/ (linux.go, init.go, sysv.go, openrc.go)
Related docs: Installation Guide - Uninstalling
user
Manage users in the Bedrud database.
bedrud user [--config <path>] <subcommand> [flags]| Global Flag | Default | Description |
|---|---|---|
--config | /etc/bedrud/config.yaml | Path to Bedrud config file (to locate database) |
create
Create a new user with local authentication (bcrypt hashed password).
bedrud user [--config <path>] create --email <email> --password <password> --name <name> [--admin]Required flags:
--email: User email address--password: User password, hashed with bcrypt before storage--name: User display name
Optional flags:
--admin: Create user as superadmin
Access level: user by default. Use --admin to create a superadmin in one command.
delete
Delete a user by email address.
bedrud user [--config <path>] delete --email <email>promote
Set a user’s role by replacing their access array. Defaults to superadmin.
bedrud user [--config <path>] promote --email <email> [--role <role>]| Flag | Default | Description |
|---|---|---|
--role | superadmin | Target role: superadmin, admin, moderator, user, guest |
Examples:
# Grant superadmin (default)
bedrud user promote --email admin@example.com
# Grant admin
bedrud user promote --email admin@example.com --role admin
# Grant moderator
bedrud user promote --email mod@example.com --role moderatorEach role maps to a specific access array:
superadmin→['superadmin', 'user']admin→['admin', 'user']moderator→['moderator', 'user']user→['user']guest→['guest']
demote
Remove a specific role from a user. Defaults to removing superadmin.
bedrud user [--config <path>] demote --email <email> [--role <role>]| Flag | Default | Description |
|---|---|---|
--role | superadmin | Role to remove: superadmin, admin, moderator |
If the user has no remaining roles after removal, user access is added automatically.
Implementation: server/internal/usercli/usercli.go
certificate (alias: cert)
Manage self-signed TLS certificates. Relevant when using self-signed certs from bedrud install --self-signed / --tls (not ACME/Let’s Encrypt by default).
bedrud certificate [--config <path>] <subcommand>
bedrud cert [--config <path>] <subcommand> # short alias| Global Flag | Default | Description |
|---|---|---|
--config | /etc/bedrud/config.yaml | Path to Bedrud config file |
regenerate
Regenerate (or create) the self-signed certificate and key from the current config. Rebuilds SANs so enabling WebXDC later does not require a full reinstall.
bedrud certificate regenerate [--config <path>] [--algo <algo>] [--force]| Flag | Default | Description |
|---|---|---|
--algo | config / existing / ed25519 | Key algorithm: ed25519, ecdsa256, rsa2048, rsa4096 |
--force | false | Allow self-signed overwrite when server.useACME is true (does not call Let’s Encrypt) |
SAN hosts always include:
server.domain(if set)server.host(non-loopback IP or hostname)- outbound public IP when discoverable
localhost,127.0.0.1,::1
When WebXDC is enabled (webxdc.enabled + valid webxdc.baseDomain, and not path-mode):
webxdc.baseDomain(e.g.wx.example.com)*.{webxdc.baseDomain}— required for instance hostswebxdc-<id>.{baseDomain}
Valid for ~1825 days (~5 years). Creates the cert pair if missing; otherwise atomic replace.
# After enabling WebXDC in config.yaml
sudo bedrud certificate regenerate
sudo systemctl restart livekit bedrudImplementation: server/internal/cli/cert.go, server/internal/utils/tls.go
renew
Same SAN rebuild as regenerate (including WebXDC wildcard). Prefer regenerate in new scripts.
bedrud certificate renew [--config <path>] [--algo <algo>]
bedrud cert renew [--config <path>] [--algo <algo>]The server also auto-renews self-signed certs daily when within 30 days of expiry.
info
Print TLS certificate metadata and compare against expected SANs from config (reports missing WebXDC wildcards, etc.).
bedrud certificate info [--config <path>]
bedrud cert info [--config <path>]Output fields: subject, issuer, notBefore, notAfter, daysRemaining, status (valid/expiring), SANs, expectedSans, missingSans, webxdcWildcard.
Implementation: server/internal/utils/tls.go (ValidateTLSCertPair)
config
Inspect and edit the Bedrud config file on disk.
bedrud config [--config <path>] <subcommand>| Subcommand | Description |
|---|---|
path | Print resolved config file path |
show | Print loaded config as YAML (secrets redacted; includes env overrides) |
get <key> | Read dotted key (e.g. server.port) |
set <key> <value> | Write dotted key and save file |
validate | Parse YAML and check required fields (jwtSecret, sessionSecret, DB, port) |
Implementation: server/internal/cli/config.go
settings
Inspect/modify runtime SystemSettings stored in the database (admin panel overrides).
bedrud settings [--config <path>] <subcommand>| Subcommand | Description |
|---|---|
show | Print settings as JSON (--effective merges config defaults) |
set <jsonField> <value> | Set one JSON field by name |
reset --yes | Reset settings to zero values (requires confirm) |
Implementation: server/internal/cli/settings.go
invite-token (invite)
Manage registration invite tokens.
bedrud invite-token [--config <path>] <subcommand>
# alias: bedrud invite ...| Subcommand | Flags | Description |
|---|---|---|
list | --page, --page-size | List tokens |
create | --email, --created-by, --ttl-hours (default 168) | Create token |
delete <id> | Delete by ID |
Implementation: server/internal/cli/invite.go
db
Database utilities.
bedrud db [--config <path>] <subcommand>| Subcommand | Description |
|---|---|
migrate | Run pending database migrations |
status | Check database connectivity |
Implementation: server/internal/cli/db.go
room
Manage meetings/rooms from the CLI.
bedrud room [--config <path>] <subcommand>| Subcommand | Flags | Description |
|---|---|---|
list | --page, --page-size, --active | List rooms |
info <id-or-name> | Show room details | |
close <id-or-name> | --yes (required) | Cascade delete (LiveKit, uploads, DB) |
suspend <id-or-name> | Disconnect participants; keep DB row | |
reactivate <id-or-name> | Reactivate suspended room | |
kick <id-or-name> | --identity (required) | Kick participant |
Implementation: server/internal/cli/room.go, server/internal/roomcli/
version
bedrud versionPrints bedrud <version> (version injected at build time).
help
bedrud help
bedrud <command> --helpExamples
Basic dev server start
# Run with default config.yaml in current directory
bedrud run
# Run with custom config
bedrud run --config /path/to/config.yaml
# Via env var (fallback)
export CONFIG_PATH=/etc/bedrud/config.yaml
bedrud runInteractive installation (prompts for inputs)
bedrud installNon-interactive installation with Let’s Encrypt
bedrud install --domain example.com --email admin@example.comSelf-signed TLS with custom ports
bedrud install --self-signed --port 8443 --lk-port 7880 --lk-tcp-port 7881 --lk-udp-port 7882Behind CDN with separate LiveKit domain
bedrud install --domain bedrud.example.com --email admin@example.com --livekit-domain lk.example.com --behind-proxyFresh reinstall
bedrud install --fresh --domain example.com --email admin@example.comUser management
# Create first admin user (single command)
bedrud user [--config <path>] create --email admin@example.com --password secret123 --name "Admin User" --admin
# Or create a regular user, then promote
bedrud user [--config <path>] create --email admin@example.com --password secret123 --name "Admin User"
bedrud user [--config <path>] promote --email admin@example.com
# Grant admin access (not superadmin)
bedrud user [--config <path>] promote --email admin@example.com --role admin
# Grant moderator access
bedrud user [--config <path>] promote --email mod@example.com --role moderator
# Create regular user
bedrud user [--config <path>] create --email user@example.com --password pass456 --name "Regular User"
# Remove a user
bedrud user [--config <path>] delete --email user@example.com
# Remove admin access
bedrud user [--config <path>] demote --email admin@example.com
# Remove moderator access, reverts to user
bedrud user [--config <path>] demote --email mod@example.com --role moderatorCertificate management
# Check certificate status
bedrud cert info --config /etc/bedrud/config.yaml
# Force-renew self-signed certificate
bedrud cert renew --config /etc/bedrud/config.yamlConfig and settings
bedrud config path
bedrud config show --json
bedrud config get server.port
bedrud config set logger.level info
bedrud config validate
bedrud settings show --effective
bedrud settings set InstanceName "My Meet"Rooms and invite tokens
bedrud room list --active
bedrud room info my-meeting
bedrud room kick my-meeting --identity user-id-here
bedrud room close my-meeting --yes
bedrud invite-token create --email newuser@example.com --ttl-hours 72
bedrud invite-token listRelated Documentation
- Installation Guide - Detailed
bedrud installwalkthrough, TLS topologies, post-install steps - Configuration Reference - Server and LiveKit config file structure
- Backend Deployment Logic - How
installanduninstallwork internally - Deployment Guide - Full deployment options including init system services