xia1997x/xray-warp

By xia1997x

Updated 5 months ago

A deployable Docker container with Xray Core and WARP for bypassing censorship.

Image
Networking
Security
1

1.4K

xia1997x/xray-warp repository overview

xray-warp-ct docs

Prerequisites

  • Docker and Docker-compose
  • Non-root account
  • Domain name on cloudflare
  • Cloudflare auth token with the Zone.DNS EDIT and Zone.Zone READ permissions

Create docker-compose file and the needed folders

mkdir xray-warp-ct && \
cd xray-warp-ct && \
mkdir -p config/{certs,caddy_config,xray_config/xray_core} && \
touch docker-compose.yaml && \
touch .env

Docker-compose file example

services:
  xray-warp:
    image: xia1997x/xray-warp:latest
    container_name: xray-warp-ct
    restart: always
    env_file:
      - .env
    ports:
      - '$PORT:443'
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - ./config/certs:/xray_base/caddy_certs
      - ./config/xray_config:/xray_base/xray_config
      - ./config/xray_config/xray_core:/xray_base/xray_config/xray_core
      - ./config/caddy_config:/xray_base/caddy_config

Env file example

DOMAIN_NAME=
CLOUDFLARE_AUTH_TOKEN=
PORT=443
ENABLE_CADDY_LOG=False
ENABLE_WARP=True
XRAY_VERSION=latest
Environment variables:

DOMAIN_NAME

  • Domain name to use for the DNS record.
  • Must be a subdomain in the format of subdomain.domain.tld
  • Required

CLOUDFLARE_AUTH_TOKEN

  • Cloudflare API token required for DNS record and TLS certificate creation.
  • Required

PORT

  • Sets the port you want to use, if you change the port of the Docker container. Keep in mind that the port inside the Docker container cannot be changed.
  • This is also used to set the right port for the VLESS link.
  • Format: YOUR-CUSTOM-PORT:443
  • Default: 443
  • Required

XRAY_VERSION

  • Used to fetch the xray-core binary.
  • To set a custom Xray version, use e.g., XRAY_VERSION=25.3.6.
  • Default: latest
  • Required

ENABLE_CADDY_LOG

  • Can be set to True to enable the log output of Caddy.
  • Default: False

XRAY_UUID

  • Optional. If set, this value will be used as the Xray UUID.
  • If not set (commented out or empty), the script will automatically generate a valid UUID.
  • Not recommended for normal use; primarily added for testing purposes.

XRAY_PATH

  • Optional. If set, defines the custom path used by Xray.
  • Must be lowercase and may only contain letters, numbers, and -.
  • If not set, the script will automatically generate a random path.
  • Not recommended for normal use; primarily added for testing purposes.

File tree

📦xray-warp-ct
 ┣ 📂config
 ┃ ┣ 📂caddy_config
 ┃ ┣ 📂certs
 ┃ ┗ 📂xray_config
 ┃ ┃ ┗ 📂xray_core
 ┣ 📜.env
 ┗ 📜docker-compose.yaml

Spin up the container

sudo docker-compose up -d

Enjoying this project? Support me with a coffee! ☕️✨ Thanks for your support! 🙌 https://ko-fi.com/xia1997x⁠

Made with ❤️ in Sweden! By xia1997x

Tag summary

Content type

Image

Digest

sha256:e2e3eb37f

Size

96.3 MB

Last updated

5 months ago

docker pull xia1997x/xray-warp:2026-02-08