# Configure HTTP Proxy for QNAP Container Station ## Metadata **Zettel**:: #zettel/literature **Created**:: [[2026-09-06]] **Parent**:: [[♯ QNAP]] **Related**:: [[Container Station for QNAP]] **Source**:: [Configure QNAP Docker Proxy](https://chatgpt.com/c/6a9cf896-dcb8-83ec-868c-c975573c63bf) ## Identify the Docker daemon Configure the Docker daemon's proxy to pull images through an HTTP proxy. Setting `HTTP_PROXY` inside a container or an SSH shell alone does not configure the daemon. Check the Docker version and the configuration paths used by the running daemons: ```sh docker version --format '{{.Server.Version}}' for pid in $(pidof dockerd); do tr '\0' ' ' < "/proc/$pid/cmdline" echo done ``` The NAS inspected in the source conversation ran **27.1.2-qnap8** with two daemons: | Socket | Configuration file under `/share/CACHEDEV1_DATA/.qpkg/container-station/etc/` | | --- | --- | | `/var/run/docker.sock` | `docker.json` — Container Station's container daemon | | `/var/run/system-docker.sock` | `system-docker.json` — separate system daemon | For this setup, edit `docker.json`. Leave `system-docker.json` unchanged. On another installation, use the path reported by `--config-file`; do not assume `/etc/docker/daemon.json`. ## Configure the proxy Docker Engine 23.0 and later support daemon proxy settings in JSON. Back up the existing configuration, then edit it with administrator privileges: ```sh CONFIG=/share/CACHEDEV1_DATA/.qpkg/container-station/etc/docker.json cp -p "$CONFIG" "$CONFIG.bak-$(date +%Y%m%d-%H%M%S)" vi "$CONFIG" ``` Merge this top-level property into the existing JSON, preserving other settings: ```json { "proxies": { "http-proxy": "http://10.31.0.6:7890", "https-proxy": "http://10.31.0.6:7890", "no-proxy": "localhost,127.0.0.1,::1" } } ``` Replace `10.31.0.6:7890` with the actual proxy address and HTTP port. Both entries use `http://` when the connection to the proxy uses HTTP, including for HTTPS registry requests. If the proxy runs on another computer, use its LAN IP and ensure the proxy's listening interface and firewall allow connections from the NAS. `127.0.0.1` refers to the NAS itself. Stop and start Container Station in QNAP App Center to apply the configuration. This interrupts running containers. ## Verify Explicitly target the Container Station daemon: ```sh docker -H unix:///var/run/docker.sock info docker -H unix:///var/run/docker.sock pull hello-world ``` The `info` output should show the HTTP and HTTPS proxy addresses. Test an image pull through Container Station as well. The source conversation records the configuration guidance, but does not report a successful test. Recheck custom settings after Container Station updates. For Docker versions older than 23.0, configure proxy environment variables in the daemon's startup environment; the exact QNAP startup configuration must be inspected first. ## What the proxy affects | Activity | Uses the daemon proxy? | | --- | --- | | `docker pull` and `docker push` | Yes | | Container Station image pulls through this daemon | Yes | | Application traffic inside running containers | No; configure the application or container separately | | Build commands such as `RUN apt-get` | Requires separate build proxy configuration | | QNAP services or the separate system Docker daemon | No | Applications inside containers commonly use `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. Docker's client configuration can supply proxy settings to containers and builds; this is separate from the daemon's `docker.json` configuration. ## References - [Docker daemon proxy configuration](https://docs.docker.com/engine/daemon/proxy/) - [Docker daemon configuration](https://docs.docker.com/engine/daemon/) - [dockerd configuration reference](https://docs.docker.com/reference/cli/dockerd/) - [Container and build proxy configuration](https://docs.docker.com/engine/cli/proxy/)