Skip to content

Integration Commands

Integration commands connect SafeCall with external host services.

safecall integrations server

Configures reverse proxy integration with Apache, Nginx, or Caddy.

Usage

bash
sudo ./util.sh integrations server
sudo ./util.sh integrations server --server caddy --host safecall.example.com --port 8088 --ssl
sudo ./util.sh integrations server --print-samples
sudo ./util.sh integrations server --non-interactive

Options

OptionMeaning
--server <server>Force server type (apache, nginx, caddy)
--host <host>Public host/domain/IP
--port <port>SafeCall upstream HTTP port
--sslEnable TLS mode
--print-samplesPrint sample configs and exit without changes
--non-interactiveApply defaults and skip prompts

Behavior highlights

  • Auto-detects installed servers.
  • If none are installed, recommends Caddy and can install server packages.
  • Creates/updates server config and restarts related service.
  • Emits an integration report listing packages installed, files changed, services restarted, and commands executed.
  • For IP targets with TLS, can generate self-signed certificates.

When to use

  • Initial production exposure of SafeCall over HTTP/HTTPS.
  • Repointing to different hostnames/ports.
  • Rebuilding broken reverse-proxy configs.

safecall integrations ssl renew

Checks SafeCall-managed self-signed certificates and renews any that expire within 30 days. It preserves each certificate's existing DNS name or IP address, writes a new 365-day certificate and private key to the same paths, and restarts the matching reverse proxy.

Usage

bash
sudo ./util.sh integrations ssl renew
sudo ./util.sh integrations ssl renew --force

Use --force to renew certificates regardless of their remaining validity. The command exits successfully without changes when no managed certificate is found or all certificates are valid for more than 30 days. Caddy-managed ACME certificates for domain names are not handled by this command.

safecall integrations monit

Installs/configures Monit and health-notification checks.

Usage

bash
sudo ./util.sh integrations monit

Behavior highlights

  • Installs monit if missing.
  • Creates a service check script in install directory.
  • Creates /etc/monit/conf.d/<service_name>.conf.
  • Uses transition-aware notifications (notify on down and recovery).

Hidden behavior

For automation/VM testing, prompts can be bypassed with environment variables:

  • SAFECALL_MONIT_RECIPIENT
  • SAFECALL_MONIT_SENDER
  • SAFECALL_MONIT_PASSWORD

safecall integrations cron

Sets up automatic backups, updates, self-signed certificate renewal checks, and bug-tracker sync.

Usage

bash
sudo ./util.sh integrations cron

Behavior highlights

  • Adds daily 0 0 * * * <install_dir>/util.sh app backup.
  • Adds daily 5 0 * * * <install_dir>/util.sh system update (five minutes after backup).
  • Adds daily 10 0 * * * <install_dir>/util.sh integrations ssl renew (five minutes after update).
  • Adds daily 0 16 * * * <install_dir>/util.sh app bugs sync (bug reports to central collector at 16:00).
  • Wraps SafeCall cron entries in # safecall cron begin / # safecall cron end markers.
  • Replaces legacy midnight update entries with the staggered schedule.
  • Removes legacy updater.sh cron entries if found.
  • Bug sync no-ops when the bug tracker is disabled or collector URL/secret is unset.

When to use

  • After migrating from 4.x, to install/repair the modern daily update cron job.
  • When legacy updater.sh cron entries exist and should be replaced automatically.
  • When daily backups should run automatically at midnight.
  • See Migrating from 4.x for full migration flow.

safecall integrations zabbix

SafeCall-to-Zabbix integration commands:

  • safecall integrations zabbix setup
  • safecall integrations zabbix doctor
  • safecall integrations zabbix verify

For full details, see the dedicated Zabbix page.

Legacy command migration

Direct commands were removed (safecall nginx, safecall monit, safecall cron).