π₯οΈ Part 7: Single-Server Installation (Quick & All-in-One) on Debian 13
Welcome to the seventh installment of our "Debian 13 Clustering & Distribution" series. In the previous parts, we explored setting up a custom APT repository, compiling and packaging FreeSWITCH, Kamailio, and RTPEngine, and designing high-availability database and storage clusters. Now, we shift our focus to deployment. In this guide, we will walk through the single-server installation process of the Ring2All platform on Debian 13 (Trixie). This all-in-one deployment is ideal for small businesses, demonstrations, and development environments where all services run on a single machine. We will cover the automatic one-command script installation using thesoftswitch-all orchestrator meta-package, a detailed step-by-step manual installation path, system verification, Nginx reverse proxy setup, firewall configuration, SSL bootstrapping, resource optimization tuning, and backup strategies.
ποΈ Architecture Overview
In a single-server deployment, all components of the Ring2All platform run on the same virtual or physical machine. Nginx acts as the front-facing reverse proxy, distributing requests to the various frontend static React apps, backend REST APIs, and ESL (Event Socket Library) monitoring services. PostgreSQL 17 handles the data store, while FreeSWITCH operates telephony services locally.
π₯οΈ Server Requirements
Before proceeding, ensure your server meets the following criteria for a standard single-server deployment:
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 4 vCPU | 8 vCPU |
| RAM | 8 GB | 16 GB |
| Storage | 100 GB SSD | 250 GB SSD |
| OS | Debian 13 (Trixie) | Debian 13 (Trixie) |
| Node.js | 22.x LTS | 22.x LTS |
| PostgreSQL | 17 | 17 |
| Concurrent Calls | ~50 | ~100β150 |
π¦ Package Suite (11 Packages)
The platform is distributed as a suite of 10 functional packages plus 1 meta-package orchestrator:
| Package | Role | Description |
|---|---|---|
softswitch-all | AIO Meta-package | Orchestrator package handling the installation order of the suite. |
softswitch-db | Database Schema | Database schemas, default migrations, and seed data. |
softswitch-api | REST API | REST API backend (Node.js, listening on Port 3001). |
softswitch-monitoring-api | Telemetry API | Real-time ESL telemetry & WebSocket server (Port 3500). |
softswitch-admin | Frontend Admin | Static React administration portal + authoritative Nginx configuration. |
softswitch-portal | Frontend Portal | Static React end-user self-service portal. |
softswitch-switchboard | Frontend Switchboard | Static React real-time operator console. |
softswitch-telephony | Telephony Config | FreeSWITCH configurations, dialplans, Lua scripts, and AI module. |
softswitch-music | Audio Assets | Default Music on Hold audio assets (WAV, multi-rate). |
softswitch-voiceguide-emma | Audio Prompts | English (US) system prompts for interactive voice response (IVR). |
softswitch-voiceguide-paloma | Audio Prompts | Spanish (US/LATAM) system prompts for IVR. |
β‘ Automatic Installation (Recommended)
The recommended path is the automated script. Running it as root bootstraps system configurations and installs the softswitch-all meta-package, which installs the remaining suite in the correct dependency order.
This installer executes the following steps automatically:
- Configures system prerequisites and DNS settings.
- Installs Node.js 22.x, PostgreSQL 17, and security packages (
fail2ban,nftables,openvpn). - Registers the Ring2All APT repository components (
base,core,devel,extras,audios). - Installs all 11 Softswitch packages in the correct dependency order.
- Generates secure, random database credentials in
/etc/softswitch/db-credentials. - Initializes all 8 databases, applies migrations, and seeds default records.
- Deploys Nginx virtual host configurations and starts all system services.
- URL:
http://(redirects to HTTPS)/admin - Email:
admin@main.local - Password: (leave blank to trigger the initial setup wizard)
π Verifying the Automatic Installation
Once the automatic installation script completes, perform the following validation checks to ensure all core services are active and properly configured.
1. Check System Services
Verify that all key components are active and running:
2. Verify Database Connection
Check that all 8 databases were created and successfully seeded:
Expected databases:ss_admin, ss_telephony, ss_cdr, ss_cc, ss_ccr, ss_logs, ss_switchboard, and freeswitch.
3. Check FreeSWITCH Core Status
Ensure that the FreeSWITCH instance is running and has bound to local databases via ODBC:
Expected: Theinternal and external SIP profiles must show as RUNNING.
To exit the CLI, type: /exit
4. API Endpoints Health Check
Validate the health check JSON responses from the backend services:
π Installing Optional Complements & Add-ons
While the automated installer configures the core softswitch backend and includes Nginx and recommended voice guide audio assets (softswitch-music, softswitch-voiceguide-emma, and softswitch-voiceguide-paloma) out of the box, you can customize and expand your deployment with additional frontend web portals.
1. User Self-Service Portal (softswitch-portal)
The User Portal allows end-users to manage their extensions, view personal call detail records (CDRs), configure call forwarding, and manage voicemails.
The post-installation script automatically deploys the static files under/var/www/softswitch/portal/, registers the path within Nginx /portal, and reloads the web service.
2. Operator Switchboard Console (softswitch-switchboard)
The Switchboard is a real-time console designed for operators to monitor extension states, park calls, drag-and-drop transfers, and view queue statistics.
The post-installation script automatically deploys the static files under/var/www/softswitch/switchboard/, registers the path within Nginx /switchboard, and reloads the web service.
π Nginx Web Server Configuration
The Nginx configuration is fully automated. The softswitch-admin package deploys and activates a production-ready virtual host configuration file at /etc/nginx/sites-available/softswitch during setup.
This automatic configuration handles:
- Redirecting port 80 traffic to secure HTTPS on port 443.
- Proxying REST API requests to the Node.js backend on port 3001 (
/apiand/ws/). - Proxying real-time ESL telemetry WebSockets to port 3500 (
/monitoring-api).
No manual configuration is necessary. Installing optional add-ons (softswitch-portal or softswitch-switchboard) will automatically update the Nginx configuration with the /portal and /switchboard virtual folders and trigger a clean reload.
π Firewall Configuration
The platform's firewall is configured and managed automatically during the initial script installation using nftables and fail2ban. The automated installer sets up all necessary rules to open HTTP/S web ports (80/443), SSH (22), SIP signaling (5060/5061), and media RTP stream port ranges (16384-32768) out of the box.
No manual firewall rule modifications or external tools (such as UFW) are required. Dynamic security rules (such as automatic SIP brute-force blocking) are handled automatically by fail2ban interacting directly with nftables rules via the pre-installed r2a-fail2ban CLI.
π SSL Configuration (Let's Encrypt)
To secure the HTTP interface and allow WebRTC connections (which strictly require secure contexts), configure Certbot:
βοΈ Credentials & Privileged Settings
1. Database Credentials File
This file is generated during the softswitch-db package configuration at /etc/softswitch/db-credentials:
/etc/odbc.ini and by the REST API via /etc/softswitch/api.env.
2. Sudoers Configuration
The API service requires elevated permissions to manage systemd, nftables, and fail2ban rules dynamically. A custom sudoers file is configured at /etc/sudoers.d/softswitch:
Ensure permissions are locked down:
3. Grant Database Permissions
Ensure the application database user has full access to the FreeSWITCH registry schema:
β‘ Resource Optimization (Single Server)
Because all platform components share a single operating system instance, tuning service parameters is essential to prevent resources from exhausting during peak call hours.
1. PostgreSQL 17 Optimization
Open /etc/postgresql/17/main/postgresql.conf and adjust memory boundaries based on total RAM:
Restart PostgreSQL to apply changes:
2. FreeSWITCH Capacity Limits
Open /etc/freeswitch/autoload_configs/switch.conf.xml and scale concurrent session counts to matching boundaries:
Reload configurations dynamically:
πΎ Backup Strategy
Set up a daily automated backup script at /opt/softswitch-backup.sh to prevent data loss:
Apply executable permissions and configure a root cron job:
π Troubleshooting
1. The API Service fails to start (exit code 226/NAMESPACE)
- Cause: Nginx is missing. The systemd unit file is configured to secure the directory
/etc/nginx. If this path does not exist, systemd will fail to mount the system namespaces. - Fix: Install Nginx, and reinstall the API package:
2. FreeSWITCH fails on start (ODBC / CORE DATABASE INITIALIZATION FAILURE)
- Cause: Database access credentials are misaligned in
/etc/odbc.inior/etc/softswitch/db-credentials. - Fix: Test database logging with
isql:
Ensure /etc/odbc.ini points to 127.0.0.1 and matches the generated credentials password.
In the next and final installment of our series, Part 8: Enterprise-Grade Distributed Deployment, we will scale this architecture by separating all components onto dedicated servers, configuring Patroni database replication, mounting a distributed GlusterFS file cluster, and setting up local HAProxy load balancing for seamless redundancy.