Skip to content
TEBHOS API

Run your instance

Run these commands on the machine where you installed TEBHOS. The command reference lists every flag for each one.

Terminal window
rexctl upgrade

This upgrades rexctl and TEBHOS together. It backs up your instance before TEBHOS switches to the new version, and if the new version doesn’t start, it goes back to the version you had before.

To see whether there’s a new version without upgrading, run rexctl upgrade --check.

If you installed TEBHOS before rexctl existed, upgrade it with the current install script. It installs rexctl and hands your instance to it with your data and settings as they are.

Terminal window
curl -fsSL https://docs.tebhos.com/install.sh | sh -s -- --update --dir /path/to/your/instance
Terminal window
rexctl rollback

This goes back to the version you had before your last upgrade and keeps your database as it is. To also restore the backup rexctl made before the upgrade, add --restore-database.

Terminal window
rexctl backup

This saves your settings, database and uploads in one file in the backups folder of your instance. TEBHOS pauses while it copies uploads. Keep a copy of your backups on another machine.

rexctl keeps the newest 3 backups and deletes older ones after each backup, but it always keeps the one rexctl rollback needs. To keep more, run rexctl backup keep 10, or rexctl backup keep all to keep every backup. To save backups on another drive, run rexctl backup location /mnt/backups/tebhos.

To put your instance back the way it was when a backup was made, find the file with rexctl backup list and pass its path to rexctl restore.

Terminal window
rexctl restore /opt/tebhos/backups/tebhos-chat.example.com-20261105-120000.tar.zst

Back up your instance on the old machine and copy the backup file to the new one. On the new machine, install rexctl and restore the backup with one command, run from the folder you copied the backup to.

Terminal window
curl -fsSL https://docs.tebhos.com/install.sh | sh -s -- restore tebhos-chat.example.com-20261105-120000.tar.zst

Then change your domain’s A record to the new machine’s address.

You can run more than one instance on the same machine. Each one needs three things of its own: a project name with --project, an instance directory with --dir, and an edge binding that doesn’t clash with the others. Run the extra instances behind your own reverse proxy with --behind-proxy and a distinct --bind.

Terminal window
rexctl install --dir /path/to/second-instance --project blue --behind-proxy --bind 127.0.0.1:8081

rexctl chooses free voice and video ports for each instance and prints the ones it picked. rexctl doctor shows which instance uses which ports.

rexctl remembers where it installed each instance. Outside an instance folder, commands use the default instance, which is the first one you installed. Run rexctl use <folder> to pick another default, or pass --dir. Each account has its own default.

Create an invite link that 10 people can use within a week.

Terminal window
rexctl invites create --uses 10 --expires 7d

Choose who can create an account with open, approval, invite or closed.

Terminal window
rexctl registration set approval

When registration needs approval, rexctl registration pending lists the people waiting and rexctl registration approve <id> approves one of them.

Make someone an admin.

Terminal window
rexctl admins add alex

Ban an account and delete its messages.

Terminal window
rexctl users ban spammer42 --reason spam --delete-messages

When someone has lost their password and can’t reset it themselves, create a reset link for them.

Set up email for your instance, then send yourself a test email.

Terminal window
rexctl email set
rexctl email test [email protected]

Change your instance’s name, color, logo or icon.

Terminal window
rexctl branding set --name "Example Chat" --logo logo.png

You can also change email and branding in the admin panel, at your instance’s address followed by /admin.

Terminal window
rexctl config list

This lists every setting with its value and a line of help, and says which settings restart TEBHOS when you change them. To change one, pass its name and the new value to rexctl config set.

Terminal window
rexctl config set <key> <value>

The list includes the TEBHOS_* environment variables TEBHOS reads, and you set them the same way. If a variable has a shorter name, such as sso.allow_private_addresses for TEBHOS_SSO_ALLOW_PRIVATE_ADDRESSES, rexctl tells you to use that one. rexctl writes the change and restarts whatever needs it, so you never edit .env yourself.

Each time rexctl starts TEBHOS, it sizes memory limits, database connections and thread counts to the machine’s memory and CPUs, so a resized machine needs no changes. The memory.profile setting pins a fixed size instead.

On a machine with little memory, rexctl config set TEBHOS_API_EMBEDDED_WORKER true runs background jobs inside the api service instead of a separate worker service. rexctl then removes the worker and adds half of its memory limit to the api.

rexctl writes TEBHOS’s Compose files and Caddyfile to .rexctl/generated in your instance folder and writes them again each time it changes the instance. If you edit one of them, rexctl keeps a copy of your version in .rexctl/edited and puts its own version back.

To change the Compose setup, such as labels, images, ports or volumes, run rexctl config edit. It opens custom.compose.yml in your instance folder, checks it, tells you which services restart and applies it. rexctl adds this file after its own Compose files, and upgrades keep it.

Terminal window
rexctl config edit

To add your own Caddy directives, such as extra routes or headers, put them in a .caddy file in the caddy.d folder of your instance. TEBHOS’s Caddyfile loads every file there inside your site, and upgrades keep them. To use your own Caddyfile instead, mount it over /etc/caddy/Caddyfile on the edge service in custom.compose.yml.

Terminal window
rexctl doctor

This checks your instance and the machine, and tells you how to fix each problem it finds. rexctl doctor --fix fixes the problems rexctl can fix safely.

rexctl status shows whether each TEBHOS service is running, and rexctl logs shows their logs.

To run your instance yourself with docker compose, run rexctl eject. rexctl moves the Compose files and Caddyfile back into your instance folder and stops managing them. TEBHOS keeps running, and rexctl takeover hands it back to rexctl.

To upgrade TEBHOS while you manage it yourself, run rexctl takeover, rexctl upgrade and rexctl eject one after the other. You can also upgrade with the compose bundle of the new version, the same way as an instance that never used rexctl.