Sitemap

How to Turn Any VPS Into a SOCKS5 Proxy in Minutes (Using MicroSocks)

A clean, lightweight, developer-friendly setup

3 min readNov 18, 2025

For the past few days, I’ve been testing different ways to convert a VPS into a fast, minimal proxy server. In my previous guide, we built an HTTP proxy using TinyProxy.

But what if you need SOCKS5 instead?

SOCKS5 is far more flexible than a traditional HTTP proxy:
it can forward raw TCP traffic, works better with automation tools (Playwright, Selenium, curl), and is widely supported across apps and browsers.

datasets, and verifying outbound IP.

Not a Medium member? Click here to read the full story for FREE.

Press enter or click to view image in full size

And the simplest way to run SOCKS5 on a VPS?

MicroSocks.

It’s tiny, fast, stable, and takes less than two minutes to install.

Let’s build it.

Press enter or click to view image in full size
https://github.com/rofl0r/microsocks

Why MicroSocks?

Because it’s:

  1. SOCKS5-only — clean and focused
  2. Ultra lightweight (written in C)
  3. Single binary — almost no dependencies
  4. Supports username/password authentication
  5. Handles multiple clients concurrently
  6. Perfect for developers and automation workflows

You don’t need SSH tunnels, VPNs, or heavy software.
Just one small binary — and your VPS becomes a SOCKS5 relay.

Step 1: Install MicroSocks

Ubuntu / Debian

sudo apt update
sudo apt install microsocks -y

CentOS / Rocky / AlmaLinux

MicroSocks is available via EPEL:

sudo dnf install epel-release -y
sudo dnf install microsocks -y

That’s it.
No compiling, no dependencies.

Step 2: Start MicroSocks (Basic Mode)

The simplest launch (no password):

microsocks -p 1080

This starts the SOCKS5 server on port 1080.

If you prefer another port, such as 5000:

microsocks -p 5000

Step 3: Add Username & Password (Recommended)

If your proxy has no password, anyone who knows your IP can use it — which is extremely dangerous.

Get ven coding’s stories in your inbox

Join Medium for free to get updates from this writer.

Use BasicAuth:

microsocks -u myuser -P mypass -p 1080

Done.

Step 4: Run MicroSocks in the Background (systemd)

MicroSocks doesn’t include a built-in service, so you need to create one manually:

sudo nano /etc/systemd/system/microsocks.service

Paste:

[Unit]
Description=MicroSocks Proxy Server
After=network.target

[Service]
ExecStart=/usr/bin/microsocks -u myuser -P mypass -p 1080
Restart=always

[Install]
WantedBy=multi-user.target

Save, then enable the service:

sudo systemctl daemon-reload
sudo systemctl enable --now microsocks

Verify:

sudo systemctl status microsocks

You should see active (running).

Step 5: Allow the Firewall Port (If Needed)

Ubuntu UFW:

sudo ufw allow 1080/tcp

CentOS FirewallD:

sudo firewall-cmd --add-port=1080/tcp --permanent
sudo firewall-cmd --reload

Step 6: Test Your SOCKS5 Proxy (Very Important)

We need to confirm the proxy actually works.

Test A — Using curl

curl --socks5 myuser:mypassword@your-vps-ip:1080 https://ipinfo.io

Success example:

{
"ip": "YOUR_VPS_IP",
...
}

If it fails, you may see:

  • connection timeout
  • 407 authentication required
  • socks handshake failed

Check:

  • is the port open?
  • is the password correct?
  • is the service running?

Test B — Using Chrome / Edge with SwitchyOmega

  1. Install SwitchyOmega
  2. Create a new profile
  3. Select SOCKS5
  4. Enter:
  • VPS IP
  • Port 1080
  • Username/password

Then visit:

https://ipinfo.io

Press enter or click to view image in full size

If it shows your VPS IP → success.

Test C — Test with Playwright / Node.js

Example:

const { chromium } = require('playwright');

(async () => {
const browser = await chromium.launch({
proxy: {
server: 'socks5://myuser:mypassword@YOUR_IP:1080'
}
});

const page = await browser.newPage();
await page.goto('https://ipinfo.io');
console.log(await page.content());
})();

Final

If TinyProxy is the simplest HTTP proxy,
then MicroSocks is the simplest SOCKS5 proxy.

It’s fast, minimal, and perfect for developers who want a clean, no-nonsense SOCKS5 setup on any VPS.

If you liked the article, show your support with a clap 👏 and follow me! Feel free to highlight your favorite parts too. Your engagement keeps me inspired!

ven coding
ven coding

Written by ven coding

a cybersecurity engineer, chasing financial freedom. Join me as I build, grow, and share my raw indie hacker journey—wins, struggles & all. My product : okrasp

No responses yet

Write a response

Recommended from Medium

See more recommendations