Appearance
Server Configuration
The SafeCall CLI can configure reverse proxy integration through:
nginxapachecaddy
Use:
bash
safecall integrations serverDetection and Selection Flow
When the command starts, it checks whether apache, nginx, or caddy is already installed.
- If exactly one server is installed, the CLI uses it automatically.
- If multiple servers are installed, the CLI asks which one to configure.
- If no supported server is installed, the CLI:
- recommends Caddy, and
- asks whether to install a server first or print sample configs and exit.
Guided Questions
The CLI asks the operator for:
- Domain or IP to expose publicly
- SafeCall upstream HTTP port (defaults to
server_http_portinconfig/main.config.json) - Whether SSL/TLS should be enabled (certificate generation/usage path depends on server)
Behavior by Server
Nginx
- Writes
/etc/nginx/sites-available/safecall - Creates
/etc/nginx/sites-enabled/safecallsymlink - Removes default site symlink (if present)
- Validates config and restarts nginx
- Can generate a self-signed certificate when SSL is enabled
Apache
- Writes
/etc/apache2/sites-available/safecall.conf - Enables required modules (
proxy,proxy_http,proxy_wstunnel,headers,rewrite, andsslwhen needed) - Enables site and disables default site (if present)
- Validates config and restarts apache service
- Can generate a self-signed certificate when SSL is enabled
Caddy
- Updates
/etc/caddy/Caddyfilewith a managed SafeCall block - Restarts caddy
- Uses automatic TLS for domain names
- If SSL is enabled for an IP target, generates and wires a self-signed certificate
Sample Config Output
If no server is installed and the user chooses to print sample configuration, the CLI prints sample config blocks for all three supported servers and exits without changing the machine.
Final Report
After configuration completes, the CLI prints a detailed report describing:
- Packages installed
- Files created or updated
- Symlinks created
- Services restarted/reloaded
- System commands executed
- Additional notes
This report is intended to make all machine-level changes transparent to the operator.