selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
warp-docker logo

Self-host warp-docker

2023-07-18

Run Cloudflare WARP as a self-hosted proxy in Docker

ReleaseOpen SourceGPL-3.0
Updated3 years ago
LanguageShell
Setup difficultyModerate
Stars
1 053
Port
1080 (SOCKS5/HTTP proxy via GOST)
Docker
caomingjun/warp
Install with Docker

What is warp-docker?

warp-docker runs the official Cloudflare WARP VPN client inside a Docker container. It exposes a SOCKS5 and HTTP proxy on port 1080 via GOST so other containers or the host can send traffic through Cloudflare's network. It supports WARP+ license keys, Cloudflare Zero Trust enrollment, MASQUE protocol, and can also operate as a NAT gateway for layer-3 traffic routing. The image is published on Docker Hub as caomingjun/warp with versioned tags matching WARP and GOST releases, plus a slim Debian variant. Configuration is done via environment variables for sleep time, license key, GOST arguments, NAT mode, and host connectivity fixes. The project is licensed under GPL-3.0 and actively maintained.

Should you self-host warp-docker?

warp-docker scores 57/100 on selfhost.directory (how scoring works) and ranks #24 of 56 in VPN. It has 1 053 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is GPL-3.0-licensed and written mostly in Shell.

Its closest alternative on selfhost.directory is Tailscale (84/100, 38 203 stars). It scores higher overall, so compare the two before you pick. See warp-docker vs Tailscale side by side.

Features

  • Data Persistence
  • Health Checks
  • MASQUE Protocol
  • NAT Gateway Mode
  • Podman support
  • Slim VariantExperimental, use at own risk.
  • SOCKS5/HTTP Proxy
  • WARP ConnectorDocumentation notes this may be out of date due to Cloudflare changes.
  • WARP+ Support

warp-docker README

How to install warp-docker

Install warp-docker with Docker

Docker with NET_ADMIN capability, /dev/net/tun access
Environment variables
WARP_SLEEP, WARP_LICENSE_KEY, GOST_ARGS, REGISTER_WHEN_MDM_EXISTS, BETA_FIX_HOST_CONNECTIVITY, WARP_ENABLE_NAT

docker run -d
--name warp
--restart always
-p 1080:1080
-e WARP_SLEEP=2
--cap-add=NET_ADMIN
--device=/dev/net/tun
--sysctl net.ipv6.conf.all.disable_ipv6=0
--sysctl net.ipv4.conf.all.src_valid_mark=1
-v ./data:/var/lib/cloudflare-warp
docker.io/caomingjun/warp:latest

Example from Podman docs, works with Docker too.

How to configure warp-docker

  • BETA_FIX_HOST_CONNECTIVITYAdd host connectivity checks to healthchecks and auto-fix if needed (beta).

    Add host connectivity checks to healthchecks and auto-fix if needed (beta).

  • DEBUG_ENABLE_QLOGEnable QLog for MASQUE protocol debugging.

    Enable QLog for MASQUE protocol debugging.

  • GOST_ARGS-L :1080Arguments passed to GOST proxy. Default is '-L :1080' for HTTP and SOCKS5 on port 1080.

    Arguments passed to GOST proxy. Default is '-L :1080' for HTTP and SOCKS5 on port 1080.

  • REGISTER_WHEN_MDM_EXISTSRegister consumer account (WARP/WARP+) even when mdm.xml exists (used for Zero Trust).

    Register consumer account (WARP/WARP+) even when mdm.xml exists (used for Zero Trust).

  • WARP_ENABLE_NATEnable NAT mode to route L3 traffic through WARP.

    Enable NAT mode to route L3 traffic through WARP.

  • WARP_LICENSE_KEYLicense key for WARP+ subscription. Optional.

    License key for WARP+ subscription. Optional.

  • WARP_SLEEP2Time to wait for WARP daemon to start, in seconds. Default is 2 seconds.

    Time to wait for WARP daemon to start, in seconds. Default is 2 seconds.

More in Proxy

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…