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).
Updating to the Latest Version
Section titled “Updating to the Latest Version”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.
-
Refresh
docker-compose.ymlTerminal window cd ~/bruhi-cloudcurl -fsSL https://raw.githubusercontent.com/bruhi-technologies/bruhi-deploy/main/docker-compose.yml -o docker-compose.yml -
Pull the Latest Image and Restart
Terminal window # Pull the updated container imagedocker compose pull# Recreate containers with zero-downtime transitiondocker compose up -d -
Verify Startup
Terminal window docker compose psdocker compose logs --tail=30 bruhi-cloudYou should see:
INFO: Application startup complete.INFO: Uvicorn running on http://0.0.0.0:8000
Checking Server Status & Health
Section titled “Checking Server Status & Health”Verify service health via Docker and the /healthz HTTP endpoint:
cd ~/bruhi-cloud
# Check container statusdocker compose ps
# Test health check endpointcurl -i http://localhost:8000/healthzExpected response:
HTTP/1.1 200 OKcontent-type: application/json
{"status": "ok"}Viewing Logs
Section titled “Viewing Logs”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 enginedocker compose logs -f bruhi-cloud
# Stream only Icecast logsdocker compose logs -f icecast
# View the last 100 log linesdocker compose logs --tail=100 bruhi-cloudUser & Admin Account Management
Section titled “User & Admin Account Management”Reset Password via Built-in CLI Script
Section titled “Reset Password via Built-in CLI Script”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:
docker compose exec bruhi-cloud python3 /app/server/reset_password.py [email protected] new_password_hereExpected output:
Success: Password for '[email protected]' reset successfully.Pre-seeding Admin Account on First Boot
Section titled “Pre-seeding Admin Account on First Boot”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_passwordStart the container normally (docker compose up -d). The account is created on initial boot. After logging in, remove these lines from .env.
Resetting All Users
Section titled “Resetting All Users”To clear all users and re-trigger the initial first-run setup wizard:
docker compose exec bruhi-cloud python3 -c "import sqlite3conn = sqlite3.connect('/app/data/bruhi.db')conn.execute('DELETE FROM users')conn.commit()print('All users deleted.')"docker compose restart bruhi-cloudIcecast Streaming Password Management
Section titled “Icecast Streaming Password Management”Changing Passwords
Section titled “Changing Passwords”- Edit your
.envfile:Terminal window cd ~/bruhi-cloudnano .env - Update the credentials:
ICECAST_SOURCE_PASSWORD=new_strong_source_passwordICECAST_ADMIN_PASSWORD=new_strong_admin_passwordICECAST_RELAY_PASSWORD=new_strong_relay_password
- Restart containers to apply:
Terminal window docker compose up -d
Clean Reset & Volume Maintenance
Section titled “Clean Reset & Volume Maintenance”Full Wipe / Clean Re-install
Section titled “Full Wipe / Clean Re-install”cd ~/bruhi-clouddocker compose down -vdocker compose up -dReset 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:
cd ~/bruhi-clouddocker compose downdocker volume rm bruhi-cloud_bruhi_dbdocker compose up -dUseful Commands Cheat Sheet
Section titled “Useful Commands Cheat Sheet”| Task | Command |
|---|---|
| Check container health | docker compose ps |
| Follow live application logs | docker compose logs -f bruhi-cloud |
| Restart brūhi service | docker compose restart bruhi-cloud |
| Inspect SQLite DB interactively | docker compose exec bruhi-cloud sqlite3 /app/data/bruhi.db |
| List registered users via Python | docker 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 shell | docker compose exec bruhi-cloud bash |
| Test Icecast status page | curl http://localhost:8010/status.xsl |