Home › Blog › Install OpenSIPS on Ubuntu
How to install OpenSIPS on Ubuntu
OpenSIPS is a fast, flexible open-source SIP server for routing, load balancing and SBC roles at carrier scale. This guide installs OpenSIPS 3.4 from the official apt repository on Ubuntu 24.04, with the database backend and the opensips-cli management tool.
noble for 24.04). Check apt.opensips.org for the current stable release and adjust accordingly. Test on a non-production box first.Step 1 — Add the OpenSIPS repository
sudo apt update
sudo apt install -y gnupg wget
# Import the signing key
wget -qO- https://apt.opensips.org/opensips-org.gpg \
| sudo gpg --dearmor -o /usr/share/keyrings/opensips.gpg
# Add the repo (3.4 releases, Ubuntu 24.04 'noble' — adjust as needed)
echo "deb [signed-by=/usr/share/keyrings/opensips.gpg] https://apt.opensips.org noble 3.4-releases" \
| sudo tee /etc/apt/sources.list.d/opensips.list
# The opensips-cli tool lives in its own repo section
echo "deb [signed-by=/usr/share/keyrings/opensips.gpg] https://apt.opensips.org noble cli-releases" \
| sudo tee /etc/apt/sources.list.d/opensips-cli.list
sudo apt update
Step 2 — Install OpenSIPS and modules
sudo apt install -y opensips opensips-mysql-module \
opensips-http-modules opensips-tls-module opensips-cli \
mariadb-server
Step 3 — Set up the database
OpenSIPS uses opensips-cli to create its schema. Configure the connection in ~/.opensips-cli.cfg (or /etc/opensips/opensips-cli.cfg), then create the database:
# Example ~/.opensips-cli.cfg
[default]
database_url: mysql://root:yourpassword@localhost
database_name: opensips
# Create the schema and load the standard tables
opensips-cli -x database create
Edit /etc/opensips/opensips.cfg to enable the modules and logic you need (registrar/usrloc with DB, auth, dialog, etc.). OpenSIPS also ships a residential/generator config you can start from.
Step 4 — Start and verify
sudo systemctl enable opensips
sudo systemctl restart opensips
sudo systemctl status opensips
# Confirm it's listening on SIP and inspect at runtime via the MI console
sudo ss -lnup | grep 5060
sudo opensips-cli -x mi get_statistics all
Open the firewall for SIP with sudo ufw allow 5060/udp (and 5061/tcp for TLS).
Add media with RTPengine
Like Kamailio, OpenSIPS routes signalling only — it does not carry or record audio. Pair it with a media proxy for NAT traversal, recording or transcoding: see how to install RTPengine, and the Asterisk vs FreeSWITCH vs Kamailio vs OpenSIPS overview for where each piece fits.
Security best practices
- TLS for SIP, strong subscriber credentials, and anti-flood modules (
pike, rate limiting). - Restrict SIP to trusted peers where possible; run
fail2ban. - Keep OpenSIPS and the OS patched.
Prefer the finished product?
OpenSIPS is infrastructure, not an application. Qallixo delivers dialers, IVR, recording and WhatsApp on a managed stack — nothing to route or maintain. See managed vs self-hosted.