Set Up V2ray Environment On Oracle Free Tier

💡 This post is insightful for the following scenarios.

  • Learn to use oracle cloud platform
  • Set up a v2ray environment on linux

Step

1. Apply for an Oracle Free Tier

Go to the official website to apply for your free cloud server.

In order to successfully apply for the free cloud server, you should have your credit card, billing address and your real IP location with you.

2. Create your instance

Now you have already successfully applied for an free account and log in to the Oracle cloud interface.

2.1 Click the instance

2.2 Create Instance

After you create your instances, you can see them in this page.

2.3 Custom Initialization

You should customize four things in this page.

2.3.1 Image and shape

Set it as CentOS 7 image

2.3.2 Networking

It should be your first time to create a network. So just create a new network.

2.3.3 Add SSH keys

Save your private key, which you will use to login your machin by ssh.

You can check here to learn how to ssh a machine by private key.

2.3.4 Boot volume

After completing the four steps above, you can now create your machine.

3. Machine detail

When your machine is running, you should be able to get its public ip address and user name, which you will use to ssh your cloud server.

And then, you should click the subnet.

And now, you already create your ingress rules.

4. Build up your v2ray configuration on server

4.1 SSH your machine

If you meet some trouble in this step, you can check my previous posts about SSH.

4.2 Switch to root

1
sudo -i

4.3 Configure v2ray

1
bash <(curl -s -L https://git.io/v2ray.sh)

Chooes 1 at the first question, and then keep pressing “Enter”.

4.4 Stop firewall

1
2
systemctl stop firewalld.service
systemctl disable firewalld.service
1
2
3
4
5
# for url
v2ray url

# or for qr code
v2ray qr

Now, you have already finish your work on server.

5. Client

You should install different clients based on different systems and use the link from 4.5 you just obtained to use the v2ray service.