Squid proxy: install, configure and run it

Updated November 2026

Squid is a free, open-source caching proxy for the web. You install one package, edit one file (squid.conf), and point clients at port 3128. The current stable release is Squid 7.8, published on October 30, 2026; distribution packages are usually a little older and work fine for most setups.

Which version you get

The Squid project only supports the latest stable release, so security fixes land there first. Distributions backport fixes into their own packages. As of November 2026:

Squid packages in common distributions (November 2026)
DistributionPackage version
Debian 13 (trixie)6.13
Debian testing (forky)7.7
Ubuntu 24.04 LTS6.14
Ubuntu 26.04 LTS (updates)7.7

Install the package

# Debian, Ubuntu
sudo apt install squid

# RHEL, Rocky Linux, AlmaLinux
sudo dnf install squid
sudo systemctl enable --now squid
sudo firewall-cmd --permanent --add-port=3128/tcp
sudo firewall-cmd --reload

Debian also ships squid-openssl, a build with full SSL-Bump support; you only need it for HTTPS interception. The configuration lives in /etc/squid/squid.conf. Copy it before you edit it.

A minimal squid.conf

http_port 3128

acl localnet src 192.168.1.0/24       # your LAN
acl SSL_ports port 443
acl Safe_ports port 80 443 1025-65535

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all

cache_mem 256 MB
cache_dir ufs /var/spool/squid 10000 16 256

Three rules matter most:

Reload, logs and testing

sudo squid -k parse          # check the syntax first
sudo squid -k reconfigure    # apply changes without a restart
sudo tail -f /var/log/squid/access.log

curl -sI -x http://192.168.1.10:3128 http://example.com/
curl -sI -x http://192.168.1.10:3128 https://example.com/

Each request adds a line to access.log. TCP_MISS/200 means Squid fetched the page; TCP_HIT or TCP_MEM_HIT means it came from the cache; TCP_TUNNEL is an HTTPS connection passed through unread; TCP_DENIED means an http_access rule refused it. Errors and startup messages go to cache.log. More answers are in the Squid FAQ.

Where Squid came from

Squid grew out of the Harvest cache daemon from the ARPA-funded Harvest research project of the early 1990s. In the mid-1990s the National Science Foundation funded web-caching research at UC San Diego (grant NCR-9796082, with Duane Wessels as a co-investigator), and the NLANR team ran a hierarchy of caches, known as IRCache, alongside Squid's development. When that funding ended, volunteers, donations and paid contracts kept the project going. Today the Squid Software Foundation oversees it. You can read more in our NLANR history page. This site is independent and has no link to the Squid project.

Guides in this section

Sources