Skip to content

Operations & Maintenance

import { Steps } from ‘@astrojs/starlight/components’;

This guide covers operational workflows for maintaining and troubleshooting self-hosted brūhi Cloud instances on production Linux servers (AWS EC2, Lightsail, DigitalOcean, Hetzner, Linode, or any Linux VPS).


Production instances initialized via install.sh do not use git pull because the deployment directory (~/bruhi-cloud) is not a Git repository. Use curl to refresh configuration files.

  1. Refresh docker-compose.yml

    Terminal window
    cd ~/bruhi-cloud
    curl -fsSL https://raw.githubusercontent.com/bruhi-technologies/bruhi-deploy/main/docker-compose.yml -o docker-compose.yml
  2. Pull the Latest Image and Restart

    Terminal window
    # Pull the updated container image
    docker compose pull
    # Recreate containers with zero-downtime transition
    docker compose up -d
  3. Verify Startup

    Terminal window
    docker compose ps
    docker compose logs --tail=30 bruhi-cloud

    You should see:

    INFO: Application startup complete.
    INFO: Uvicorn running on http://0.0.0.0:8000

Verify service health via Docker and the /healthz HTTP endpoint:

Terminal window
cd ~/bruhi-cloud
# Check container status
docker compose ps
# Test health check endpoint
curl -i http://localhost:8000/healthz

Expected response:

HTTP/1.1 200 OK
content-type: application/json
{"status": "ok"}

Terminal window
cd ~/bruhi-cloud
# Stream live logs from all services (FastAPI, Rust engine, Caddy, Icecast)
docker compose logs -f
# Stream only the brūhi Cloud API and audio engine
docker compose logs -f bruhi-cloud
# Stream only Icecast logs
docker compose logs -f icecast
# View the last 100 log lines
docker compose logs --tail=100 bruhi-cloud

brūhi Cloud includes a reset_password.py script inside the container. Use it to reset any user’s password without directly modifying the SQLite database:

Terminal window
docker compose exec bruhi-cloud python3 /app/server/reset_password.py [email protected] new_password_here

Expected output:

Success: Password for '[email protected]' reset successfully.

When deploying a brand new instance, you can pre-seed the initial owner account in your .env file before first launch:

BRUHI_ADMIN_EMAIL[email protected]
BRUHI_ADMIN_PASSWORD=your_secure_password

Start the container normally (docker compose up -d). The account is created on initial boot. After logging in, remove these lines from .env.

To clear all users and re-trigger the initial first-run setup wizard:

Terminal window
docker compose exec bruhi-cloud python3 -c "
import sqlite3
conn = sqlite3.connect('/app/data/bruhi.db')
conn.execute('DELETE FROM users')
conn.commit()
print('All users deleted.')
"
docker compose restart bruhi-cloud

  1. Edit your .env file:
    Terminal window
    cd ~/bruhi-cloud
    nano .env
  2. Update the credentials:
    ICECAST_SOURCE_PASSWORD=new_strong_source_password
    ICECAST_ADMIN_PASSWORD=new_strong_admin_password
    ICECAST_RELAY_PASSWORD=new_strong_relay_password
  3. Restart containers to apply:
    Terminal window
    docker compose up -d

Terminal window
cd ~/bruhi-cloud
docker compose down -v
docker compose up -d

Reset Database Only (Preserve Uploaded Audio)

Section titled “Reset Database Only (Preserve Uploaded Audio)”

To wipe stations, playlists, and accounts while keeping all uploaded MP3/WAV files:

Terminal window
cd ~/bruhi-cloud
docker compose down
docker volume rm bruhi-cloud_bruhi_db
docker compose up -d

TaskCommand
Check container healthdocker compose ps
Follow live application logsdocker compose logs -f bruhi-cloud
Restart brūhi servicedocker compose restart bruhi-cloud
Inspect SQLite DB interactivelydocker compose exec bruhi-cloud sqlite3 /app/data/bruhi.db
List registered users via Pythondocker compose exec bruhi-cloud python3 -c "import sqlite3; conn=sqlite3.connect('/app/data/bruhi.db'); [print(r) for r in conn.execute('SELECT id, email, role FROM users')]"
Enter container shelldocker compose exec bruhi-cloud bash
Test Icecast status pagecurl http://localhost:8010/status.xsl