Install from TAR Package
Install SafeSquid on an existing Linux server without replacing the OS or using a full appliance image. Works on any distribution — Debian, Ubuntu, Red Hat, CentOS, SUSE, Rocky Linux, and others.
Use this method when:
- You already have a configured Linux server and want to add SafeSquid only
- You need custom OS hardening or disk layouts
- You want full control over dependencies and supporting services
Trade-off: You must manually configure Monit, BIND9, and other dependencies. For automated setup, use Appliance Builder instead.
Supported Distributions
| Distribution | Tested Versions | Package Manager |
|---|---|---|
| Debian | 10 (Buster), 11 (Bullseye), 12 (Bookworm) | apt |
| Ubuntu | 20.04 LTS, 22.04 LTS, 24.04 LTS | apt |
| Red Hat Enterprise Linux | 7, 8, 9 | yum / dnf |
| CentOS / Rocky Linux | 7, 8, 9 | yum / dnf |
| SUSE / openSUSE | SLES 15, Leap 15 | zypper |
Other distributions may work but are untested. Minimum kernel version: 3.10+
Prerequisites
- Linux server meeting hardware requirements (minimum 4 CPU cores, 8 GB RAM, 100 GB disk)
- Root or sudo access
- Internet connectivity for downloads
- Kernel version 3.10 or newer
Required dependencies:
SafeSquid requires the following libraries. Install before running the installer:
For Debian/Ubuntu:
sudo apt update
sudo apt install -y wget tar libssl-dev libpcre3 libpcre3-dev zlib1g-dev \
build-essential libc6 libgcc-s1 libstdc++6
For Red Hat/CentOS/Rocky:
sudo yum install -y wget tar openssl-devel pcre-devel zlib-devel \
gcc gcc-c++ make glibc libgcc libstdc++
For SUSE/openSUSE:
sudo zypper install -y wget tar libopenssl-devel pcre-devel zlib-devel \
gcc gcc-c++ make glibc libgcc_s1 libstdc++6
System Preparation
Before installing SafeSquid, prepare the target system:
-
Create dedicated disk partitions (recommended for production):
# Example: Create separate directories for logs and cache
sudo mkdir -p /var/log/safesquid
sudo mkdir -p /var/lib/safesquid
sudo mkdir -p /var/db/safesquid -
Configure firewall to allow proxy traffic:
# For firewalld (RHEL/CentOS):
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --permanent --add-port=8443/tcp
sudo firewall-cmd --reload
# For ufw (Ubuntu/Debian):
sudo ufw allow 8080/tcp
sudo ufw allow 8443/tcp
sudo ufw reload
# For iptables:
sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 8443 -j ACCEPT
sudo iptables-save -
Disable SELinux or configure permissive mode (RHEL/CentOS only):
sudo setenforce 0
sudo sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config -
Verify time synchronization (required for SSL certificate validation):
timedatectl status
# If NTP is not active, install and enable:
sudo systemctl enable --now systemd-timesyncd
Installation Steps
-
Verify prerequisites
Before installing, confirm you have:
- Root or sudo access (run
sudo -vto verify) - Internet connectivity (run
ping -c 3 google.comto test) - At least 10 GB free disk space (run
df -h /to check)
- Root or sudo access (run
-
Download and extract the SafeSquid package:
cd /usr/local/src
wget http://downloads.safesquid.net/appliance/binary/safesquid_latest.tar.gz
tar -zxvf safesquid_latest.tar.gzExpected output: Directory
_mkapplianceextracted with installation scripts. -
Run the installer:
From the directory where you extracted the TAR:
sudo _mkappliance/installation/setup.shWhat the installer does:
- Checks for required dependencies
- Creates
safesquidsystem user and group - Installs binaries to
/opt/safesquid/ - Creates init scripts and systemd service files
- Sets up default configuration in
/etc/safesquid/
If installation fails: Check the terminal output for missing dependencies. Common issues:
- Missing libraries → Install dependencies (see Prerequisites above)
- Permission denied → Ensure you're running with
sudoor as root - Disk full → Check available space with
df -h
-
Check for missing dependencies:
ldd /opt/safesquid/bin/safesquidIf any library shows
not found, install the missing package using your distribution's package manager (apt,yum,zypper, etc.). -
Start SafeSquid:
sudo systemctl start safesquid
# Or for init.d-based systems:
sudo /etc/init.d/safesquid start
Verify Installation
1. Check service status:
# For systemd-based systems:
sudo systemctl status safesquid
# For init.d-based systems:
sudo /etc/init.d/safesquid status
Expected output: Active (running)
2. Verify port 8080 is listening:
netstat -tulnp | grep 8080
Expected output: safesquid process listening on 0.0.0.0:8080
3. Check logs for errors:
tail -50 /var/log/safesquid/safesquid.log
Expected: No critical errors. Info and startup messages are normal.
4. Access admin interface:
- Direct access:
https://SERVER-IP:8443/ - Via proxy: Configure a browser to use
SERVER-IP:8080, then navigate tohttps://safesquid.cfg/(embedded Rest UI interface built into SafeSquid; NOT resolved by SafeSquid's DNS resolver)
If the interface loads, installation succeeded.
Post-Install Hardening
For production deployments:
-
Change default admin password:
- Log in to
https://SERVER-IP:8443/ - Navigate to System → User Management
- Change the
administratoraccount password
- Log in to
-
Restrict admin interface access:
- Configure firewall to allow port 8443 only from admin IPs
- Use SSH tunneling for remote admin access
-
Enable automatic updates:
# Add SafeSquid repository and configure auto-updates
# (See SafeSquid documentation for repository setup) -
Configure log rotation:
sudo nano /etc/logrotate.d/safesquidAdd:
/var/log/safesquid/*.log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
sharedscripts
postrotate
/etc/init.d/safesquid reload > /dev/null
endscript
} -
Set up Monit monitoring (see Configure Supporting Services)
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
ldd shows "not found" for a library | Missing system dependency | Install the required package (e.g., libssl, libpcre) using your distro's package manager (see Prerequisites) |
| SafeSquid fails to start | Permissions, port in use, or config error | Check /var/log/safesquid/safesquid.log; ensure port 8080 is free: netstat -lntp | grep 8080; run with sudo |
| Installer script fails | Insufficient disk, no root/sudo, or network | Ensure ≥10 GB free, run with sudo/root, verify outbound connectivity to downloads.safesquid.net |
| "Permission denied" errors in logs | SELinux blocking SafeSquid | Set SELinux to permissive mode: sudo setenforce 0 (RHEL/CentOS only) |
| Cannot access admin interface at :8443 | Firewall blocking port | Configure firewall to allow port 8443 (see System Preparation) |
| Service starts but stops immediately | Missing configuration or dependency | Run sudo journalctl -u safesquid -n 50 to check for errors; verify all dependencies: ldd /opt/safesquid/bin/safesquid |
Configure Supporting Services
SAB handles these automatically, but TAR installations require manual setup:
Monit (Process Monitoring)
Why it matters: Monit automatically restarts SafeSquid if it crashes, ensuring high availability.
Quick setup:
-
Install Monit:
# Debian/Ubuntu:
sudo apt install monit
# RHEL/CentOS:
sudo yum install monit -
Configure Monit for SafeSquid:
sudo nano /etc/monit/conf.d/safesquidAdd:
check process safesquid with pidfile /var/run/safesquid.pid
start program = "/etc/init.d/safesquid start"
stop program = "/etc/init.d/safesquid stop"
if failed port 8080 then restart
if 5 restarts within 5 cycles then timeout -
Enable and start Monit:
sudo systemctl enable --now monit
Full guide: Monit Configuration
BIND9 (Local DNS)
SafeSquid uses a local DNS resolver for performance and policy-aware resolution.
Quick setup:
-
Install BIND9:
# Debian/Ubuntu:
sudo apt install bind9
# RHEL/CentOS:
sudo yum install bind -
Configure SafeSquid to use local BIND9 (done via SafeSquid admin interface after activation)
Full guide: BIND9 Configuration
Configure both Monit and BIND9 before moving to production. Without Monit, a crashed SafeSquid process will not restart automatically.
Next Steps
- Configure Supporting Services — Set up Monit and BIND9 before production
- Activate Your License — Upload your activation key to make SafeSquid fully operational
- Connect Your Client — Configure a browser to use the proxy
- Verify Your Setup — Confirm traffic flows through SafeSquid
- Enable SSL Inspection — Decrypt and inspect HTTPS traffic