What do we need?A Linux server (VPS)Domain-NameCloudflare accountAmazon Web Services accountV2ray Installation Script for Nginx
A Linux server (VPS)Get a Linux server with your preferred distro and I prefer Ubuntu from the Ubuntu 16 version. Make sure you have root access to your server and I mostly use DigitalOcean(free $100), Linode(free $100), and Vultr(free $100). For best results, I recommend using a VPS with at least 2GB of RAM and a data center(server location) nearest to your area of operation.
Domain NameAny domain name provider that allows you to change your name servers will be of great use for V2ray. I recommend Bluehost, Hostgator, Hostinger, Goviralhost, and NameCheap as low-cost and fast website hosting and domain name providers. If you already have a domain name, if you're still unsure where to get the best domain name for the best low price, try the DOMCOMP price comparison website.
Read Also: V2ray Panel XTLS TLS CDN Webscoket Installation Guide
Cloudflare AccountWe'll use Cloudflare to point our domain name to the Linux server (VPS) we set up, essentially creating a DNS record. Go to the official Cloudflare website and create an account using your real details and create a DNS record. If you are not familiar with Cloudflare, kindly Click here to find out how to do this.
cloudflare Home page
Learn: How To Create Non-proxied Cloudflare DNS Records For V2ray
The SSH Client
Any SSH client can work. However, for Android users, I recommend using Termius or Juice SHH, and for Windows, I recommend Putty or Mobaxterm.
Amazon Web Services Account
We shall use Amazon Webhosting Services' Cloudfront distribution to add more security layers to our V2ray traffic. This is the best method for AWS-hosted SNI. If you are not familiar with creating Cloudfront distributions for V2ray, click here.
|AWS CloudFront page|
V2ray Installation Script for Nginx
Update and upgrade packages
sudo apt update && pkg upgrade -y
V2ray Ngnix one lick installation script
bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh) | tee v2ray_ins.log
By the time of writing this article, V2ray, Ngnix is option 1, therefore you need type 1 and press enter. This script was designed by Chinese developer Wulabing, and all credits go to him.
The next step is to enter your domain name in the form (www.yourdomainname.com) and press enter. Make sure to enter the exact domain name used in creating the DNS record on Cloudflare as described earlier.
|enter domain name|
Enter the desired V2ray port and I recommend port 443,
Scan or copy printed VMESS from your server console and import it via clipboard on your preferred V2ray client with android, ios, or Windows.
|scan or copy vmess|
Congs. You have finally created a V2ray VMESS with Cloudflare, Cloudfront, and Ngnix, and all you need to do now is to connect and enjoy safe and secure surfing. What else have we missed? Kindly leave us comments below. We'll be glad to answer you as soon as possible.