Repository navigation
twocans v0.1.2
A friendlier install, and one command to look after it afterwards.
Highlights
./twocans—status,logs,backup/backups/restore,export(your call log, voicemails and contacts as spreadsheets, plus recordings, in one zip),version,update,report(a support report with private details removed),reset-owner,checkanduninstall.- A guided installer — the twocans logo, a few questions with suggested answers, port checks that offer another web port when one's taken, firewall rules checked against what twocans needs, and checks that this machine's address won't change, Docker starts on boot and the clock is in sync.
- Locked out?
./twocans reset-ownerresets the Owner's password, email or passkeys, and can sign out every browser. ./install.sh --uninstall— keeps your data unless you typedelete.
Upgrading from 0.1.1
The installer used to write Asterisk's passwords into two tracked files; they now live outside git. So git pull may refuse at first — put those files back, then pull and run the installer, before Asterisk next restarts:
git checkout -- docker/asterisk/etc/ari.conf docker/asterisk/etc/manager.conf docker/asterisk/etc/voicemail.conf
git pull
./install.shThe installer writes the passwords to their new place, applies migration 046, and fetches Asterisk's spoken prompts into their new volume. From now on, updating is just ./twocans update.
Full changelog
Added
-
A guided installer.
./install.shchecks the software (Docker, Compose,
the tools it uses, memory and disk), asks a few questions with a suggested
answer for each, checks every port twocans publishes — offering another port
for the web interface or HTTPS when something else holds it, and explaining a
clash on the SIP ports or call audio range, which can't move — and reads the firewall's rules (ufw or
firewalld, with sudo, asking first) to check each port against them —
allowed, allowed only from some addresses, or missing — offering to add only
what's missing. It says when ufw is installed but switched off. On ARM (a Raspberry Pi) it builds the
images locally. It is also the updater —git pull && ./install.sh, or
make update— keeping.env, asking before cutting off a call in progress,
and restarting Asterisk only when its transports or passwords changed.
It also checks this machine: that its address won't change (warning when the
router hands it out, with the hardware address to reserve it for), that Docker
starts on boot, and that the clock is kept in time — offering to fix the last
two.--check,--yes,--reconfigure,--no-start,--write-secrets, and
--uninstall, which keeps your data unless you typedelete, and only ever
removes data — never the repo's own files. -
Reset the Owner account from the command line:
./install.sh --reset-owner(ormake reset-owner). It shows the Owner and offers a new
sign-in email, a new password (clearing any lockout), removing its passkeys,
and signing out every browser already signed in — confirming before it
changes anything. With no Owner it makes one, from an existing grown-up or
new. Signing out everywhere is new too: sessions begun before it are refused
(migration 046). Standard installs get it with the next image. -
./twocans, one command for looking after it, working the same on a
standard install and a development setup:status(containers, system
checks, phones, the phone line and credit, today, backups, disk),logs,
backup/backups/restore,export(the call log, voicemails and
contacts as spreadsheets plus the recordings, in one zip),versionand
update(comparing with GitHub's latest; stopping rather than overwriting
files changed by hand),report(a support report with passwords, names,
numbers, emails, the domain and public IPs removed), plusreset-owner,
checkanduninstall. The installer and it share one look
(scripts/ui.sh). -
The app knows its version:
backend/VERSION, baked into the image.
Changed
- Asterisk's control passwords are no longer kept in tracked files.
ari.confandmanager.confinclude them fromdocker/asterisk/etc/secrets/,
whichinstall.shwrites from.envand git ignores — so an update never
conflicts with them, and they can't be committed. Upgrading: ifgit pull
refuses because of local changes to those two files, run
git checkout -- docker/asterisk/etc/ari.conf docker/asterisk/etc/manager.conf
and pull again; then run./install.sh(or./install.sh --write-secrets)
before Asterisk next restarts.
Fixed
- Backups were readable by everyone on the machine; they hold the whole
database, so they're now readable only by their owner (as exports and
reports are). - Asterisk's spoken prompts were lost whenever the stack was taken down, and
group calls then admitted nobody: the image keeps them on an unnamed volume of
its own. They now have a named volume,asterisk-sounds. Run./install.sh
once after updating to fetch them into it. - The README's copy of the example compose file was missing the phone line's
SIP port.
Compare: v0.1.1...v0.1.2