Updating & maintenance
One command updates everything. Your data and settings survive.
Updating
As root on the PBX:
pbx-update
It downloads the latest code (the project folder must be a git clone), re-deploys the PBX, and — only if the edge files changed — copies kamailio/ to the edge box and runs update-edge.sh there. The first time the edge needs updating it asks for the edge's address and remembers it. pbx-update --edge updates the edge even when nothing in it changed.
When you log in to the PBX as root it checks GitHub (at most hourly) and tells you if an update is available. It never installs anything by itself — an update restarts the phone services and would drop calls in progress, so you choose when to run it.
Edge-only manual path: copy the new kamailio/ folder over and run ./update-edge.sh. It keeps your IPs and domain, and rolls back by itself if the new config doesn't start.
Fax support: once, on a PBX installed before faxing existed, run pbx-update --with-fax (rebuilds Asterisk with fax, about 10–20 minutes; it restarts Asterisk when no call is in progress).
Android app: install the newest APK from GitHub Releases over the old one (see Android app). After an app update, run pbx-update too: new app features often need the matching PBX side.
Backups
Back up these three:
/var/lib/pbx/— database (pbx.db), greetings/var/spool/pbx/— voicemail, recordings/etc/pbx/— config (including the ARI password)
Data retention
| Data | Kept for |
|---|---|
| Sign-in log | 24 hours |
| Security events in the Activity feed | 24 hours (the change log itself is kept, including recording-consent records) |
| Call history | 90 days (users can't delete it) |
| Voicemail, recordings, texts | until deleted |
Logs
journalctl -u pbx-brain -u pbx-api -u pbx-agi
asterisk -rvvv
# On the edge:
journalctl -u kamailio -u rtpengine -u fail2ban
Files and folders
In the repo
pbx-api/ web panel + REST API (FastAPI)
app.py admin pages, auth, sessions, dashboard, v1 API,
voip.ms SMS webhook + inbound poller, /sms-routes admin UI
voipms_sms.py voip.ms helper: sendSMS/sendMMS, getSMS/getMMS polling,
DID normalization, route lookups
ucp.py My Phone
app_api.py JSON API for the Android app: pairing / QR, notifications
long poll (/me/wait), phone login (/me/sip), hidden calls
ring_groups_ui.py, ivr_ui.py, billing.py, e911_ui.py, email_ui.py,
network_ui.py, safety_ui.py, security.py, ddns.py, entitlements.py, mailer.py
pbx-brain/ call engine (ARI) - app.py, e911.py, agi_server.py (texts,
incl. external SMS/MMS via voip.ms API), voipms_sms.py (shared helper)
shared/ phone.py: the one number normalizer pbx-api and pbx-brain share
config-gen/ renders Asterisk pjsip.conf from the database; static Asterisk configs
db/ schema.sql (applied on every deploy), prod-seed.sql (example)
scripts/ install.sh, deploy.sh, create-admin.py, security-check.sh,
systemd units, privileged helper scripts
kamailio/ edge server: install.sh, update-edge.sh, kamailio.cfg.template,
rtpengine.conf.template, fail2ban/, certificate + IP scripts,
verify-edge.sh, pbx-edge-notify
android/ My Phone app for Android (Kotlin, Jetpack Compose, Linphone);
built by GitHub Actions
dev/ developer and test tools (not needed to run own-pbx),
incl. test-app-*.py and test-brain-ring.py
docs/ API.md (REST API), SCREENSHOTS.md (all screenshots), screenshots/
(screenshots/android/ for the app), ANDROID_APP_PLAN.md,
VOIPMS_SMS_SETUP.md (voip.ms SMS/MMS setup and troubleshooting)
On the PBX
- Code:
/opt/pbx - Data:
/var/lib/pbx(databasepbx.db, greetings) - Voicemail and recordings:
/var/spool/pbx - ARI password:
/etc/pbx/ari.pass
On the edge
/etc/kamailio,/etc/rtpengine,/etc/fail2ban/jail.d,/etc/pbx-edge/notify.env