Menu
User

DropVPS Team

Writer: Cooper Reagan

How to Setup V2Ray Server on Linux (Ubuntu 24.10)

How to Setup V2Ray Server on Linux (Ubuntu 24.10)

Publication Date

04/13/2025

Category

Articles

Reading Time

3 Min

Table of Contents

V2Ray is one of the most reliable tools out there for setting up a secure, flexible proxy server. Whether you’re trying to bypass network restrictions or just want more control over your privacy, V2Ray is a solid alternative to traditional VPNs. Ubuntu 24.10 is the latest release at the time of writing, and setting up V2Ray on it is smoother than ever. Let’s walk through how to get your V2Ray server up and running.

Step 1: Install V2Ray Using the Official Script

The V2Fly team maintains a convenient script that takes care of most of the heavy lifting:

bash <(curl -Ls https://github.com/v2fly/fhs-install-v2ray/raw/master/install-release.sh)

After the script runs, V2Ray will be installed in /usr/local/bin/v2ray and the config files will be located in /usr/local/etc/v2ray.

Step 2: Configure Your V2Ray Server

Open the config file for editing:

sudo nano /usr/local/etc/v2ray/config.json

A basic configuration with vmess might look like this:

{
  "inbounds": [{
    "port": 10086,
    "protocol": "vmess",
    "settings": {
      "clients": [{
        "id": "your-uuid-goes-here",
        "alterId": 0
      }]
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  }]
}

To generate a UUID, run:

uuidgen

Paste the output into the "id" field above.

Save and close the file (Ctrl + X, then Y, then Enter).

Step 3: Enable and Start the V2Ray Service

Once you’ve set your config, reload the system daemon and start the service:

sudo systemctl daemon-reexec
sudo systemctl enable v2ray
sudo systemctl start v2ray

You can check the status with:

sudo systemctl status v2ray

Step 4: Open the Firewall Port

If you’re using ufw, allow the port you set in your config (in this case, 10086):

sudo ufw allow 10086/tcp

Make sure your firewall settings align with your configuration.

Step 5: Verify It’s Running

You can test if the V2Ray process is listening on the correct port:

sudo lsof -i -P -n | grep v2ray

Or you can use netstat if you prefer:

sudo netstat -tulnp | grep 10086

Step 6: Set Up the Client

Once the server is up, configure your client (on Windows, macOS, or Android) using the same UUID, IP address of your server, and port. Tools like V2RayN (Windows) or v2rayNG (Android) work well for this. You can also generate a config QR code using third-party tools, but make sure you host those only in secure environments if you’re managing multiple clients.

Windows VPS
U
Loading...

Related Posts