Docker Socket Proxy with Docker: Give Traefik and Dashboards a Limited Docker Socket (Linux, Windows, Mac)
Before you start
- 20 min read
Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#
docker-socket-proxy is a small, free HAProxy container that sits between your apps and the Docker socket and answers 403 Forbidden to every Docker request you did not allow, so Traefik, Homepage, Dozzle or Diun can list your containers without being able to create, change or delete anything.

Image: DIY Lab Hub title card. docker-socket-proxy has no official logo.
Why this matters. The file /var/run/docker.sock is the control line to the Docker daemon, and on a normal install that daemon runs as root. Docker's own security page says a container can be started with the host's / folder mounted inside it, and then "the container can alter your host filesystem without any restriction". So an app that holds the raw socket holds your server, and a bug in that app hands the same power to an attacker. The read-only flag :ro does not help: it protects the socket file, not the commands sent through it.
With the proxy, only the proxy touches the socket. Your apps talk plain HTTP to it on a private Docker network, and you decide per app which parts of the Docker API they may call.
| What | Value (official sources, read 3 December 2026) |
|---|---|
| Current release | v0.6.0, 17 November 2026 (GitHub shows its title as "v1.0.0"; the tag is v0.6.0) |
| Image to use | tecnativa/docker-socket-proxy:3.4. Since 16 November 2026 the project supports only the tags lts, latest and 3.4; numbered tags such as v0.5.0 and edge are deprecated |
| Time and size | About 30 minutes (our estimate). About 20 MB compressed (Docker Hub API) |
| Platforms | amd64, arm64, arm, 386, ppc64le, s390x (Docker Hub) |
| Port | 2375 inside the private network only. We never publish it |
| Licence | Apache-2.0 (LICENSE.txt in the repository) |
| Official docs | README on GitHub |
At a glance:
- What it is: one container, no web page, no login, no data.
- What it does: allows or blocks Docker API paths by switches such as
CONTAINERS=1, and blocks write methods unlessPOST=1. - What it is not: it does not check who asks, has no TLS and cannot hide parts of an answer (see "What the proxy does not protect").
- Who needs it: anything that mounts the socket only to read: Traefik, Homepage, Dozzle (without actions) and Diun.
How it fits together#
Your apps send plain HTTP to socket-proxy:2375 over a private Docker network. HAProxy checks the method and the path against your switches, forwards the allowed ones to the real socket and answers the rest with 403.
Drawn for this guide from the official README. Only the proxy container has the socket mounted.
The network is internal: true: no route to the internet, and port 2375 is never published to the host.
Before you start#
Note: every domain, e-mail and password on this page is a dummy example (
example.com,change-me). Replace it with your own and keep real secrets out of Git.
You need a Docker host that is always on, with Compose.
| System | What to have |
|---|---|
| Linux | Docker Engine and the Compose plugin |
| Windows | Windows 10 or later, Docker Desktop (WSL 2 backend), PowerShell |
| Mac | Docker Desktop, Intel or Apple Silicon |
docker --version docker compose version
Checklist:
- [ ] Both commands print a version
- [ ] You know which apps will use the proxy (the table in Step 5)
- [ ] Your current Compose files are backed up: you will remove their
docker.sockline - [ ] Only for the HTTPS section: a domain, DNS and ports 80 and 443
Tested by DIY Lab Hub: not yet. Every command comes from the official docs and sources read on 3 December 2026. We did not run them on a real machine, so outputs are labelled "expected".
Tip: Change one app at a time. The rollback is one line: put the old
docker.sockmount back.
Step 1: Create the folder and the network#
Everything lives under ~/docker_volumes/socket-proxy. The proxy stores no data, so the folder only holds the Compose file and backups. We also create the shared proxy network that Traefik uses to reach your apps.
Linux#
mkdir -p ~/docker_volumes/socket-proxy/{config,backups}
cd ~/docker_volumes/socket-proxy
docker network create proxy
Windows (PowerShell)#
$base = "$HOME\docker_volumes\socket-proxy"
foreach ($d in "config","backups") {
New-Item -ItemType Directory -Force "$base\$d" | Out-Null
}
Set-Location $base
docker network create proxy
Mac (Terminal)#
Same commands as Linux.
Check it worked. docker network ls lists proxy. If it says "already exists", another guide made it: that is fine.
Step 2: Write the Compose file for the proxy#
Save this as compose.yaml in the folder, with any text editor. It is the same on all three systems.
services:
socket-proxy:
image: tecnativa/docker-socket-proxy:3.4
container_name: socket-proxy
restart: unless-stopped
environment:
CONTAINERS: "1" # list and inspect containers
POST: "0" # GET and HEAD only: nothing can be changed
# EVENTS, PING and VERSION are already on by default
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-api
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:2375/_ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
# Intentionally no "ports:" - never publish 2375
networks:
docker-api:
internal: true
What the less obvious lines do:
| Line | Why |
|---|---|
:3.4 | The supported rolling tag for HAProxy 3.4. Rebuilt often: pin the digest for fixed bytes (see Updates) |
CONTAINERS: "1" | Needed by every app here. Default 0 |
POST: "0" | Default. Only GET and HEAD pass: the real read-only switch |
:ro on the socket | Harmless extra. It does not limit the API |
127.0.0.1 in the healthcheck | localhost failed where it resolved to IPv6 (see Common mistakes) |
No --privileged | The README example uses it for some SELinux or AppArmor setups. We leave it off unless the log shows a socket permission error |
Start it.
Linux#
cd ~/docker_volumes/socket-proxy docker compose up -d docker compose ps
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\socket-proxy" docker compose up -d docker compose ps
Mac (Terminal)#
Same commands as Linux.
Check it worked. docker compose ps shows socket-proxy running and, after a few seconds, healthy. The PORTS column shows 2375/tcp only, with no 0.0.0.0:2375-> arrow, which means the port is not published.
Step 3: Test what the proxy allows and blocks#
The proxy image is small, so we test from inside it with wget, which the maintainers also use in their issues.
Linux#
cd ~/docker_volumes/socket-proxy docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/version docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/volumes
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\socket-proxy" docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/version docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/volumes
Mac (Terminal)#
Same commands as Linux.
Check it worked. We did not run this. The first command should print a block of JSON about your Docker engine (/version is on by default). The second must fail, because VOLUMES is 0: the proxy answers with the text the README shows for blocked calls:
<html><body><h1>403 Forbidden</h1> Request forbidden by administrative rules. </body></html>
Expected output, taken from the project README. With wget -q you may only see an error line that mentions 403.
To see a blocked request in the log, run docker compose logs socket-proxy. HAProxy writes one line per request; a blocked one ends in 403 and the request, for example "GET /volumes HTTP/1.1" (shape taken from issue 104).
Step 4: Point Traefik at the proxy#
Remove the docker.sock mount from Traefik and give it one new setting: --providers.docker.endpoint=tcp://socket-proxy:2375. Traefik's own docs list this proxy as a way to reduce the risk of its Docker access. In the v3.8.0 source its Docker provider calls only the version, events and container list and inspect endpoints, so CONTAINERS=1 plus the default switches is enough. In Swarm mode it also lists services, tasks and networks (SERVICES, TASKS, NETWORKS).
Here is the whole stack as a local test, with no domain: the proxy, Traefik on 127.0.0.1:8080 and the small whoami test app. Replace the file from Step 2 with it. traefik:v3.8.0 is the release of 23 November 2026.
services:
socket-proxy:
image: tecnativa/docker-socket-proxy:3.4
container_name: socket-proxy
restart: unless-stopped
environment:
CONTAINERS: "1"
POST: "0"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-api
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:2375/_ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
traefik:
image: traefik:v3.8.0
container_name: traefik
restart: unless-stopped
depends_on:
socket-proxy:
condition: service_healthy
command:
- "--providers.docker=true"
- "--providers.docker.endpoint=tcp://socket-proxy:2375"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=proxy"
- "--entrypoints.http.address=:80"
ports:
- "127.0.0.1:8080:80"
networks:
- docker-api
- proxy
# No docker.sock mount here
whoami:
image: traefik/whoami:v1.12.0
container_name: whoami
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
- "traefik.http.routers.whoami.entrypoints=http"
- "traefik.http.services.whoami.loadbalancer.server.port=80"
networks:
- proxy
networks:
docker-api:
internal: true
proxy:
external: true
Why two networks: docker-api joins only Traefik and its proxy. proxy joins Traefik and the apps it routes to. Your apps never see the Docker API.
Linux#
cd ~/docker_volumes/socket-proxy docker compose up -d curl -H 'Host: whoami.localhost' http://127.0.0.1:8080 docker compose exec traefik ls /var/run/docker.sock
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\socket-proxy" docker compose up -d curl.exe -H "Host: whoami.localhost" http://127.0.0.1:8080 docker compose exec traefik ls /var/run/docker.sock
Mac (Terminal)#
Same commands as Linux.
Check it worked. The curl line prints the plain-text answer of whoami, starting with Hostname: (expected, we did not run it). The last command must fail with "No such file or directory": Traefik no longer has the socket. docker compose logs traefik --tail 20 shows no Cannot connect to the Docker daemon line.
Tip: If Traefik already runs, do not rebuild it: delete its
docker.sockvolume line, add theendpointoption and attach it to a private network shared with the proxy.
On Windows and Mac, Docker Desktop runs the engine in a Linux virtual machine, and its FAQ says Mac and WSL 2 users reach it through /var/run/docker.sock, so the same mount works for the proxy. We did not run it there. Docker Desktop for Windows (Hyper-V) also has a setting "Expose daemon on tcp://localhost:2375 without TLS"; Docker warns it can allow remote code execution. Leave it off: the proxy does not need it.
Step 5: Give each app only the flags it needs#
Apps need different Docker access. The safe pattern is one small proxy per policy: apps with different flags get their own proxy (the image is about 20 MB). Keep the defaults EVENTS=1, PING=1 and VERSION=1.
| App | Flags to set to "1" | Where it comes from |
|---|---|---|
| Traefik | CONTAINERS (Swarm: also SERVICES, TASKS, NETWORKS) | Traefik v3.8.0 source; Traefik docs name this proxy |
| Homepage | CONTAINERS (Swarm: also SERVICES, TASKS) | Homepage docs, "Using Docker Socket Proxy" |
| Dozzle | CONTAINERS, INFO | Dozzle docs, "Connecting with a Socket Proxy" |
| Diun | CONTAINERS, IMAGES | Diun v4.34.0 source: it lists containers and inspects images. Its docs give no flag list |
None needs POST=1. Dozzle's optional actions (start, stop, remove) need write access; we do not enable them.
Dozzle is a good full example. Save this in the Dozzle folder, next to its other files. amir20/dozzle:v11.6.0 is the release of 30 November 2026.
services:
socket-proxy-dozzle:
image: tecnativa/docker-socket-proxy:3.4
restart: unless-stopped
environment:
CONTAINERS: "1"
INFO: "1"
POST: "0"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-api
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:2375/_ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
dozzle:
image: amir20/dozzle:v11.6.0
restart: unless-stopped
depends_on:
socket-proxy-dozzle:
condition: service_healthy
environment:
DOZZLE_REMOTE_HOST: tcp://socket-proxy-dozzle:2375
ports:
- "127.0.0.1:8081:8080"
networks:
- docker-api
- default
networks:
docker-api:
internal: true
Dozzle has no login here: see our Dozzle guide before you expose it.
Diun and Homepage change only a few lines:
# Diun: environment lines (its proxy needs CONTAINERS and IMAGES)
- DIUN_PROVIDERS_DOCKER=true
- DIUN_PROVIDERS_DOCKER_ENDPOINT=tcp://socket-proxy-diun:2375
# Homepage: docker.yaml (its proxy needs CONTAINERS) my-docker: host: socket-proxy-homepage port: 2375
Diun must also reach registries and your notifier, so keep it on a normal network too, not on docker-api alone. Homepage's docs publish the proxy as 127.0.0.1:2375:2375; we do not, the shared network is enough.
Linux#
cd "<path-to-the-app>" docker compose up -d docker compose logs socket-proxy-dozzle --tail 20
Windows (PowerShell)#
Set-Location "<path-to-the-app>" docker compose up -d docker compose logs socket-proxy-dozzle --tail 20
Mac (Terminal)#
Same commands as Linux. Use your own proxy service name in the log command.
Check it worked. Afterwards, the app shows your containers as before. In the proxy log, the app's requests appear with status 200. A 403 line tells you which path the app needs: read it, then enable only that switch.
Tip: Never copy a flag list from a forum post. Start from the table, run the app, and read the proxy log for
403lines. Add one switch at a time.
Put it behind HTTPS (with or without Traefik)#
The proxy has no web page and no HTTPS: it must stay on the private network. What you put behind HTTPS is your apps. This is for a server with a domain; at home you can skip it.
With Traefik#
Change Traefik's options and the app's labels in the Step 4 stack. The names http, https and le are the same as in our Traefik guide, which explains the staging server and acme.json. example.com and the e-mail are dummies: replace them.
command:
- "--providers.docker=true"
- "--providers.docker.endpoint=tcp://socket-proxy:2375"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=proxy"
- "--entrypoints.http.address=:80"
- "--entrypoints.http.http.redirections.entrypoint.to=https"
- "--entrypoints.http.http.redirections.entrypoint.scheme=https"
- "--entrypoints.https.address=:443"
- "[email protected]"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=http"
ports:
- "80:80"
- "443:443"
volumes:
- ./config:/letsencrypt
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
- "traefik.http.routers.whoami.entrypoints=https"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=le"
- "traefik.http.services.whoami.loadbalancer.server.port=80"
Ports 80 and 443 belong to Traefik only. The proxy still has no ports:.
Check it worked. curl -I https://whoami.example.com answers over HTTPS (use your real name, staging server first).
Without Traefik: Caddy#
Plain Caddy with a Caddyfile never reads the Docker socket, so it needs no proxy. It gets certificates by itself: Let's Encrypt for a public domain, its own local certificate with tls internal at home. Run the official image caddy:2.11.9 (latest on 3 December 2026) on the proxy network with ports 80 and 443. Our Caddy guide shows the full run and how to trust Caddy's local root on Linux, Windows and Mac.
whoami.example.com {
reverse_proxy whoami:80
}
For a home name without a public domain:
whoami.home.example {
tls internal
reverse_proxy whoami:80
}
Check it worked. curl -I https://whoami.example.com returns an HTTP status line (with tls internal, trust Caddy's root first).
caddy-docker-proxy discovers containers by labels and does read the Docker socket. We did not test it with this proxy.
Security and testing#
| Control | How |
|---|---|
| Port 2375 | Never publish it, not even on the LAN. The README: never expose this container's port to a public network |
| Network | One internal: true network per proxy and its apps |
| Mounts | Only the proxy has the socket. :ro is a small extra and nothing more |
| Flags | Default POST=0. Add only what the proxy log shows an app needs |
| Tags | 3.4 moves with HAProxy builds. Pin the digest once tested |
| Secrets | Tokens of your other apps go in .env files with chmod 600. The proxy has none |
| Rootless Docker | The socket is $XDG_RUNTIME_DIR/docker.sock, often /run/user/1000/docker.sock. Mount it onto /var/run/docker.sock in the proxy. The risk is smaller, not gone |
Quick tests:
cd ~/docker_volumes/socket-proxy docker compose ps docker compose logs socket-proxy --tail 50 docker port socket-proxy
docker port socket-proxy must print nothing, which means no published port. On Windows run the same lines in PowerShell after Set-Location "$HOME\docker_volumes\socket-proxy".
What the proxy does not protect#
The proxy filters by path; it is not a lock per container. The limits:
CONTAINERS=1is wider than "list containers". It opens everything under/containers: inspect, logs,top,archive(file reads) andexport. These are GET requests, soPOST=0does not stop them (issue 182, open). A GET toattach/wscan open a WebSocket onto a container (issue 195, open).- Inspect shows environment variables (
Config.Env), where many stacks keep passwords. Any app that can inspect can read them (issue 189, open). Use Docker secrets or mounted files. POST=1is not "POST only". It lifts the GET and HEAD restriction, so DELETE and others pass on every enabled section. Exec sessions are created under/containers/{id}/exec, soEXEC=0does not stop them (issue 114).ALLOW_START,ALLOW_STOP,ALLOW_RESTARTS,ALLOW_PAUSE,ALLOW_UNPAUSEneedPOST=1too. The method check comes first; a pull request to change that is open (PR 194).- No TLS, no login. Anything that reaches port 2375 gets the same answers as your apps.
Three other projects offer stricter rules. We describe them only as their READMEs do and tested none:
| Project | What its README says |
|---|---|
| wollomatic/socket-proxy | Go, from-scratch image. A regex allowlist per HTTP method, plus access control by IP address. Inspired by this project. Latest image 1.14.0 |
| CetusGuard | No dependencies. Rules are a method plus a path pattern; optional TLS on both sides. Allows only /_ping, /info and /version by default |
| linuxserver/socket-proxy | A drop-in replacement based on this project, with extra switches such as ALLOW_LOGS and LIBPOD_* for Podman |
Common mistakes#
| Mistake | Why it happens | Do this instead |
|---|---|---|
An app shows an error with 403 Forbidden ... Request forbidden by administrative rules. (README, issue 114) | That is the filter working: the app called a section you did not enable | Read the path in docker compose logs socket-proxy and enable that one switch |
ports: - "2375:2375" in the proxy service | Examples copy it, even the Homepage docs publish 127.0.0.1:2375 | Delete ports:. Apps on the same private network reach socket-proxy:2375 without it |
Traefik log says failed to connect to the docker API at tcp://docker-socket-proxy:2375: lookup docker-socket-proxy on 127.0.0.11:53: no such host (Traefik issue 13549) | The proxy and Traefik are not on a shared network, or the name does not match the service name | Put both on the same network, use the service name in endpoint. If Traefik does not recover, restart it (that issue is open) |
Diun or another app starts first and logs Cannot connect to the Docker daemon at tcp://dockerproxy1:2375 (Diun issue 1225) | The app came up before the proxy | depends_on with condition: service_healthy, as in Step 4 |
Healthcheck with localhost fails: wget: can't connect to remote host: Connection refused (issue 121) | localhost resolved to IPv6 [::1], and the proxy was not listening there. The reporter traced it to that and the fix was the dual-stack bind, now the default | Use 127.0.0.1. If you set DISABLE_IPV6=1, localhost may fail again |
POST=1 to allow one action | The name suggests "POST only". It allows every method, including DELETE | Keep POST=0. Use ALLOW_* switches only if you know they need POST=1 too |
Podman: Error: unable to connect to Podman socket: ping response was 403 (issue 104) | Podman's own API uses /libpod/ paths that the path rules do not match | Use Podman's Docker-compatible endpoints, or a proxy that documents libpod support. The pull request is still open (PR 193) |
Copying edge or v0.5.0 from an older guide | Both tags are deprecated since 16 November 2026 (announcement) | Use 3.4, or lts, and pin the digest after testing |
AI assistants: ":ro, EXEC=0 and CONTAINERS=1 POST=1 make it safe" | It sounds tidy. :ro does not filter the API, and exec creation sits under /containers | Keep POST=0, and treat CONTAINERS=1 as broad read access |
AI assistants: invented switches such as ALLOW_EXEC, ALLOW_LOGS, CONTAINERS_READ | They come from other projects or from unmerged pull requests (PR 176 is still open) | Use only the variables in the project's Dockerfile and README |
Tip: A 403 is not "Docker is down". It means the proxy was reached and a rule said no. Connection refused or "no such host" means the proxy was not reached at all.
Tip: Check the proxy before you blame the app:
docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/_pingshould printOK.
Troubleshooting#
| Problem | Solution |
|---|---|
| Proxy restarts or is unhealthy | docker compose logs socket-proxy --tail 100. A permission error on the socket points to SELinux or AppArmor; diagnose that before you add --privileged |
| An app cannot connect | Same network? Right service name? docker compose ps shows both running |
| An app gets 403 | Find the blocked path in the proxy log, then set the matching switch to "1" and run docker compose up -d |
| Change ignored | Run docker compose up -d after every edit: Compose must recreate the container |
| Rootless Docker: socket not found | Mount /run/user/<uid>/docker.sock onto /var/run/docker.sock in the proxy |
| Need more detail | Set LOG_LEVEL: debug on the proxy and read the log again |
Exact error texts#
<html><body><h1>403 Forbidden</h1> Request forbidden by administrative rules. </body></html>: a rule blocked the request (README).lookup docker-socket-proxy on 127.0.0.11:53: no such host: wrong network or name (Traefik issue 13549, above).Cannot connect to the Docker daemon at tcp://dockerproxy1:2375. Is the docker daemon running?: the app started before its proxy (Diun issue 1225, above).Can't open server state file '/var/lib/haproxy/server-state': No such file or directory(issue 74): a HAProxy warning. A user in that issue says their containers worked anyway, and the current Dockerfile creates the file. Look for real failing requests instead.
Known bugs (open, 3 December 2026)#
- Issue 200: a followed log stream (
/containers/{id}/logs?follow=1) is closed after about 10 minutes of silence bytimeout server 10m. The reporter used Vector; other log followers could be cut too. We did not test Dozzle for this. - Issue 199:
latestandltschange on every build, including each merge tomaster, with no release notes. The maintainer says this is intended: another reason to pin the digest. - Issue 180: one user reported
/versioncalls breaking after the HAProxy bump in v0.5.0. The maintainer could not reproduce it.
We found nothing that stops a normal install.
Updates and backups#
Update the proxy. Because the tag moves, decide when to move with it. Pull, read the digest, test, and only then pin it.
cd ~/docker_volumes/socket-proxy
docker compose pull
docker image inspect tecnativa/docker-socket-proxy:3.4 --format '{{json .RepoDigests}}'
docker compose up -d
docker compose ps
On Windows run the same lines in PowerShell after Set-Location "$HOME\docker_volumes\socket-proxy". To keep exactly one build, write the digest into the file, for example image: tecnativa/docker-socket-proxy@sha256:<digest-from-the-command-above>, and change it only when you decide to. The maintainers say the same: pin by digest for reproducibility.
What to back up. Only compose.yaml. The proxy has no data. The same goes for the lines you added to Traefik, Dozzle or Diun: they are in those apps' Compose files, so keep those backed up too (our docker-volume-backup guide covers volumes).
Linux and Mac#
Save as ~/docker_volumes/socket-proxy/backup.sh:
#!/usr/bin/env bash set -euo pipefail base="$HOME/docker_volumes/socket-proxy" out="$base/backups/socket-proxy-$(date +%F).tar.gz" tar -czf "$out" -C "$base" compose.yaml chmod 600 "$out"
Run chmod 700 on it and add this line with crontab -e (on a Mac write /Users/<your-user>/...):
0 3 * * * /home/<your-user>/docker_volumes/socket-proxy/backup.sh
Windows (PowerShell)#
Save as $HOME\docker_volumes\socket-proxy\backup.ps1:
$base = "$HOME\docker_volumes\socket-proxy" $out = "$base\backups\socket-proxy-$(Get-Date -Format yyyy-MM-dd).tar.gz" tar.exe -czf $out -C $base compose.yaml
In Task Scheduler run powershell.exe -NoProfile -File <full-path-to-the-script> daily at 03:00.
Restore test#
Unpack the archive in a spare folder, then start it and test the filter again:
tar -xzf socket-proxy-<date>.tar.gz docker compose up -d docker compose exec socket-proxy wget -qO- http://127.0.0.1:2375/_ping
Expected: OK. Stop the test copy with docker compose down so it does not clash with your real proxy.
Performance and resources#
The project gives no RAM or CPU figures, and we measured none. Run docker stats socket-proxy on your host. The image is about 20 MB compressed. HAProxy's configuration in the repository sets maxconn 4000 and 10-minute client and server timeouts, with no timeout for the events stream. A proxy per app means a few more tiny containers, not more load.
FAQ#
Does the proxy make the Docker socket safe? Much narrower, not safe: no write methods by default and only the sections you enable, but no per-container access and no hiding of secrets in answers.
Do I need a proxy for every app? One per policy. Apps that need exactly the same flags can share one. Apps with different flags are safer apart.
Can I use latest? It is supported and equals lts. We use 3.4: it stays on HAProxy 3.4 when lts moves on. Pin the digest once it works.
Does it work with Docker Swarm? The README lists SERVICES, TASKS, NODES and SWARM. Dozzle's docs say a socket proxy cannot be used with its Swarm mode. We did not test Swarm.
What about Podman? The native /libpod/ paths are blocked (issue 104); a fix is still a pull request.
Sources#
- docker-socket-proxy README, Dockerfile and HAProxy template (master, read 3 December 2026); release v0.6.0 (17 November 2026); LICENSE.txt (Apache-2.0); news and announcements (16 November 2026)
- Image tags on Docker Hub (3.4, lts and latest checked 3 December 2026)
- Issues and pull requests read: 74, 104, 114, 121, 180, 182, 189, 195, 199, 200, PR 176, PR 193, PR 194; Traefik 13549; Diun 1225
- Docker: Docker Engine security, rootless mode, Docker Desktop FAQ and Desktop settings
- Consumers at the tags used here: Traefik Docker provider docs and provider source (v3.8.0, 23 November 2026); Homepage Docker docs (v2.9.1); Dozzle remote hosts, authentication and Swarm mode (v11.6.0); Diun Docker provider and source (v4.34.0)
- Alternatives: wollomatic/socket-proxy, CetusGuard, linuxserver/socket-proxy (READMEs read 3 December 2026)
Checked against the official docs on 2026-12-03. Nothing was run on a real machine by DIY Lab Hub; the commands come from the docs, the source files and the issues above.