The essential points from this guide -- each one is explained in detail below.
Squid, 3proxy, and TinyProxy are the three most common tools people use to build a proxy server, each with a different setup difficulty.
A cheap cloud VPS is the simpler hosting path; a home server needs router port forwarding and a static IP or dynamic DNS.
Every proxy server needs a bound listening port, a firewall rule, and username/password authentication before it is safe to expose.
Test a finished proxy with a single curl command before pointing any real traffic or scraping job at it.
A self-hosted proxy gives you exactly one IP address; a managed proxy service gives you a rotating pool without any server maintenance.
Three tools cover almost every case when people ask how to build a proxy: Squid, 3proxy, and TinyProxy. Squid is the most established HTTP/HTTPS caching proxy, built for production traffic and packed with access-control options. 3proxy is a lightweight cross-platform tool that supports HTTP, SOCKS4, and SOCKS5 in one binary, which matters if your scripts or apps need SOCKS. TinyProxy is the simplest option, a minimal HTTP/HTTPS proxy meant for one or two users rather than heavy concurrent load.
Pick Squid if you want caching, detailed logs, and fine-grained access rules and don't mind a denser config file. Pick 3proxy if you need both HTTP and SOCKS5 support from a single lightweight install. Pick TinyProxy if you just want a working HTTP proxy in a few minutes with almost no configuration to read through.
| Software | Protocol Support | Setup Difficulty | Best For |
|---|---|---|---|
| Squid | HTTP, HTTPS, FTP | Moderate | Caching, detailed access control, production use |
| 3proxy | HTTP, SOCKS4, SOCKS5 | Moderate | Needing both HTTP and SOCKS5 from one install |
| TinyProxy | HTTP, HTTPS | Easy | A quick single-user proxy with minimal config |
Setting up a proxy server starts with picking where it lives: a cloud VPS or a spare machine on your home network. A VPS from any standard cloud host gives you a public IP address out of the box, no router configuration needed, and it stays online even when your home internet or power goes out. The smallest VPS tier (1 vCPU, 1GB RAM) is more than enough for a personal proxy handling light traffic.
A home server costs nothing extra if you already own the hardware, but it needs more setup. Your home ISP likely assigns a dynamic IP that changes periodically, so you will want a free dynamic DNS service to keep a stable address pointing at your connection. You also need to forward the proxy's port through your router to the machine running the software, and your proxy inherits your home connection's upload speed and any ISP restrictions.
For most people asking how to build a proxy server for actual daily use, a VPS is the more reliable and lower-maintenance path.
| Hosting Path | Public IP | Uptime | Ongoing Cost |
|---|---|---|---|
| Cloud VPS | Static, included | Independent of your home network | Monthly VPS fee |
| Home server | Dynamic (needs DDNS) | Tied to your home power and internet | Electricity only if hardware owned |
On a fresh Ubuntu VPS, installing Squid takes one command:
sudo apt update
sudo apt install squid -ySquid's main config lives at /etc/squid/squid.conf. The two settings that matter most when you make a proxy server are the listening port and which client IPs are allowed to connect:
http_port 3128
acl allowed_ips src 203.0.113.10/32
http_access allow allowed_ips
http_access deny allRestart the service to apply changes:
sudo systemctl restart squidIf you chose 3proxy instead, install it from source or a package, then edit 3proxy.cfg to bind a port and protocol:
auth strong
users admin:CL:yourpassword
allow admin
proxy -p3128
socks -p1080TinyProxy needs the least configuration. After sudo apt install tinyproxy, edit /etc/tinyproxy/tinyproxy.conf to set the port and confirm the Listen directive matches your server's network interface, then restart the tinyproxy service the same way.
A proxy is useless if the port it listens on can't reach the outside world. On a VPS running ufw, open the port you configured:
sudo ufw allow 3128/tcp
sudo ufw reloadMost cloud providers also run a separate network firewall in their dashboard, so check that panel too or the port stays blocked even with ufw allowing it locally. On a home server, log into your router and forward the same port to the internal IP of the machine running the proxy.
Authentication is what stops strangers from finding your open port and using your proxy for free. Squid supports basic auth through htpasswd:
sudo apt install apache2-utils
sudo htpasswd -c /etc/squid/passwords yourusernameThen reference that password file in squid.conf with an auth_param and acl block requiring authentication before allow. Never leave a proxy server open to any source IP with no username and password. An unauthenticated proxy on the open internet gets discovered and abused within hours.
Once the software is running, the firewall port is open, and authentication is set, confirm everything works with a single curl command from a different machine:
curl -x http://yourusername:yourpassword@your-server-ip:3128 https://ifconfig.meIf the command returns your server's IP address instead of your own, the proxy is forwarding traffic correctly. If it times out, recheck the firewall rule and confirm the service is actually listening on that port with sudo ss -tlnp.
You can also test it the way most people actually use a proxy day to day: point your browser's proxy setting at the server's IP and port, enter the username and password when prompted, then visit any IP checker page. The IP shown should match your proxy server, not your real connection.
Building your own proxy gives you one IP address and full control over the software, but it also makes you responsible for patching the server, renewing the VPS, and watching for abuse in the logs. If that single IP ever gets blocked or flagged by a target site, you are stuck with it until you spin up a replacement.
A managed proxy service solves the maintenance and single-IP problem by giving you a large pool of IPs with rotation built in, instead of one server you patch yourself. That trade-off matters most for anyone doing web scraping or automation at any real volume, where a single self-hosted IP gets rate-limited fast. For a one-off personal use case, such as testing how your own site looks from another region, a self-hosted proxy is still a fine, cheap option.
Compare the ongoing cost of a VPS plus your own maintenance time against KnoxProxy's published rates before deciding. Residential proxies start at $2.10/GB, datacenter proxies at $0.60/GB, and both cover exit points across 195+ countries, options a single self-hosted server cannot match no matter how it is configured. For the full breakdown of what a proxy server actually is and how it routes traffic, see what is a proxy server and how it differs in proxy vs VPN. For terminology, the proxy glossary entry covers the core definition in one paragraph.
Ready to put this into practice? Browse residential proxy plans
KnoxProxy Research Team · Technical Content
Network engineers and proxy infrastructure specialists with 10+ years in anti-bot systems, web scraping, and IP routing.
90.4M+ ethically sourced residential IPs across 195 countries. Instant activation, 14-day money-back guarantee.