Easy Docker deployment for V2ray + WS +TLS with Nginx, free SSL and Traefik
.env
file. You don't need to change the docker-compose.yml
file.myapp
. Your camouflaged website url will then be https://myapp.example.com
.myapp.example.com
to the IP address of your VPS.- mkdir /app
- cd /app
- git clone https://github.com/alphacodinghub/v2ray-nginx-docker.git
- cd v2ray-nginx-docker
To edit .env
file and set necessary parameters. These three parameters must be set to your own values: APP_NAME (as chosen in Step 1), APP_DOMAIN, ACME_EMAIL (your email address for Let's Encrypt to apply for and renew ssl certificates). All other parameters can use the default values as provided. The final .env
file should look like this (you should set your own values):
APP_NAME=myapp
APP_DOMAIN=example.com
[email protected]
LISTENING_PORT=3033
CLIENT_ID=2e5762cc-20d2-42b1-b0ad-cbe55dc5fa35
CLIENT_ALTERID=64
CLIENT_WSPATH=/allproducts
In the above settings, CLIENT_WSPATH
is the so-called camouflaged path which should be set to the same value at the VPS server and user clients.
By default, the caouflaged website will be redirected to baidu.com. You can copy your real website content to ./conf/html
folder to replace original files.
After above settings, you can run the following command in folder /app/v2ray-nginx-docker
to start the V2Ray server: docker-compose up -d
. The -d
option is to tell the programme to run in the background.
Run this command to check the running containers: docker ps
.
To access to Traefik Dashboard:https://traefik.example.com To visit the camouflaged website:https://myapp.example.com
Download the Windows client V2RayN, run it and click the menu: server - add [VMess] server. Please set the values according to the below figure:
References