How to Install and Set Up V2Ray or ShadowsocksR (SSR) on Your VPS

V2Ray and ShadowsocksR (SSR) are popular tools for bypassing internet restrictions and enhancing online privacy. With Hosteons’ VPS, you can easily set up your own private proxy server using V2Ray or SSR. This tutorial will guide you through the installation and configuration process step by step.

Prerequisites

Before you begin, ensure you have:

  1. A VPS: Hosteons provides reliable VPS solutions with root access.
  2. Linux OS: Ubuntu 20.04 or Debian 11 are recommended.
  3. Root Access: Administrative privileges on your VPS.

Step 1: Update Your VPS

Start by updating your system to ensure all packages are up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install V2Ray

  1. Download the official V2Ray installation script:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  1. Start and enable V2Ray:
sudo systemctl start v2ray
sudo systemctl enable v2ray
  1. Confirm that V2Ray is running:
sudo systemctl status v2ray

Step 3: Configure V2Ray

  1. Open the V2Ray configuration file:
sudo nano /usr/local/etc/v2ray/config.json
  1. Add the following basic configuration:
{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "YOUR_UUID",
            "alterId": 64
          }
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}
  • Replace YOUR_UUID with a unique UUID. Generate one using:
uuidgen
  1. Save and exit the file.
  2. Restart V2Ray to apply the changes:
sudo systemctl restart v2ray

Step 4: Install ShadowsocksR (SSR)

If you prefer SSR over V2Ray, follow these steps:

  1. Clone the SSR repository:
git clone https://github.com/shadowsocksrr/shadowsocksr.git
  1. Navigate to the SSR directory:
cd shadowsocksr
  1. Run the setup script:
bash setup_cymysql.sh
  1. Configure SSR by editing the configuration file:
nano user-config.json

Add the following settings:

{
  "server": "0.0.0.0",
  "server_port": 8388,
  "password": "YOUR_PASSWORD",
  "method": "aes-256-cfb",
  "protocol": "auth_sha1_v4",
  "obfs": "tls1.2_ticket_auth",
  "timeout": 300
}
  • Replace YOUR_PASSWORD with a strong password.
  1. Start the SSR server:
bash run.sh

Step 5: Open Firewall Ports

Allow traffic on the necessary ports for your proxy server:

sudo ufw allow 1080/tcp
sudo ufw allow 8388/tcp
sudo ufw enable

Step 6: Test Your Proxy Server

  1. Download and install a V2Ray or SSR client on your device.
  2. Configure the client with the server details, including IP address, port, and UUID or password.
  3. Connect to the proxy server and verify your connection.

Conclusion

Setting up V2Ray or ShadowsocksR on a VPS from Hosteons enhances your online privacy and allows you to bypass internet restrictions. With this guide, you can deploy your own secure and private proxy server in minutes. If you encounter any issues, Hosteons’ support team is available to assist you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.