Create An Oracle Free VPS: The Ultimate Guide

by Admin 46 views
Create an Oracle Free VPS: The Ultimate Guide

So, you're looking to set up a Virtual Private Server (VPS) without breaking the bank? Awesome! Oracle Cloud offers a pretty generous free tier that lets you spin up a VPS. This guide will walk you through the whole process, step by step, making it super easy, even if you're not a tech whiz. Let's dive in!

Why Choose Oracle Cloud Free Tier?

Before we get started, let's quickly cover why Oracle's free tier is such a sweet deal. First off, it's genuinely free. No hidden charges, no surprises – as long as you stick to the free tier resources. You get access to compute instances, storage, and networking, which is enough to run a small server for personal projects, testing, or even hosting a lightweight website.

The Oracle Cloud Free Tier includes an Always Free set of resources that are available for an unlimited time. This means you can use them as long as you want, without ever having to pay a dime. This is a significant advantage over other cloud providers that offer free trials that expire after a certain period. Another advantage of using Oracle Cloud is the potential for scalability. If your project outgrows the free tier, you can easily upgrade to a paid plan without having to migrate your data or reconfigure your server. Oracle also provides a wide range of services and tools that can help you manage and monitor your VPS, ensuring optimal performance and security.

One of the best features is the ability to run two AMD-based Compute instances with 1 GB of memory each. This is more than enough for many basic tasks, such as running a web server, hosting a small database, or setting up a development environment. You also get 100 GB of block storage, which is plenty of space for your operating system, applications, and data. Oracle's global network of data centers ensures low latency and high availability for your VPS.

Compared to other cloud providers, Oracle's free tier stands out for its long-term availability and generous resources. While some providers may offer more powerful instances for a limited time, Oracle's Always Free resources provide a stable and reliable platform for your projects. This makes it an excellent choice for students, hobbyists, and small businesses that are looking for a cost-effective way to get started with cloud computing.

Step 1: Create an Oracle Cloud Account

First things first, you need to sign up for an Oracle Cloud account. Don't worry, it's a straightforward process.

  1. Head to the Oracle Cloud website. Just Google "Oracle Cloud Free Tier" and you'll find it.
  2. Click on "Start for free". This will take you to the sign-up page.
  3. Fill in your details. You'll need to provide your country, first name, last name, and email address. Make sure to use a valid email address because you'll need to verify it.
  4. Verify your email. Oracle will send you a verification email. Click the link in the email to verify your address.
  5. Set up your account. After verifying your email, you'll be prompted to set up your account. This involves providing your company name (you can just put "Personal" if you don't have a company), and choosing a region. Selecting the right region is crucial, so think about proximity to your location. Closer regions generally mean lower latency, which translates to faster response times for your server.
  6. Enter your address. Next, you'll need to enter your address. Make sure the information is accurate, as Oracle may use it for verification purposes.
  7. Verify your phone number. Oracle requires phone verification to prevent abuse of the free tier. You'll receive a verification code via SMS.
  8. Add a payment method. This is where some people get nervous, but don't worry! Oracle needs a credit card or PayPal account for verification purposes, but they won't charge you as long as you stick to the free tier resources. Think of it as a security measure to prevent people from creating multiple free accounts. Providing accurate and up-to-date information during the sign-up process will help ensure a smooth experience and prevent any potential issues down the line. Take your time to review each step carefully, and don't hesitate to reach out to Oracle support if you encounter any problems.

After completing these steps, your Oracle Cloud account will be created. You'll be able to access the Oracle Cloud Infrastructure (OCI) console, where you can manage your resources, including creating your free VPS. This is where the real fun begins!

Step 2: Create a Virtual Cloud Network (VCN)

Before you can launch your VPS, you need to set up a Virtual Cloud Network (VCN). Think of a VCN as your own private network in the cloud.

  1. Log in to the Oracle Cloud Infrastructure (OCI) console.
  2. Navigate to Networking > Virtual Cloud Networks. You can find this in the left-hand menu.
  3. Click on "Start VCN Wizard". This wizard will guide you through the process of creating a VCN.
  4. Choose "Create VCN with Internet Connectivity". This option will create a VCN with all the necessary components for your VPS to communicate with the internet.
  5. Give your VCN a name. Choose a descriptive name, like "my-free-vcn".
  6. Accept the defaults. The wizard will pre-populate most of the settings with reasonable defaults. You can leave them as they are for now. The default settings include a public subnet for your VPS, a private subnet for backend services, and an internet gateway for connecting to the internet. These settings are suitable for most basic use cases and can be customized later if needed.
  7. Click "Next" and then "Create". Oracle will create the VCN and all its associated resources. This process may take a few minutes.

Creating a VCN with internet connectivity is essential for your VPS to be accessible from the internet. The public subnet allows your VPS to receive incoming traffic, while the internet gateway enables it to send outgoing traffic. Without these components, your VPS would be isolated from the outside world.

Step 3: Launch Your Free VPS

Now for the exciting part: launching your free VPS instance!

  1. Navigate to Compute > Instances. You can find this in the left-hand menu.
  2. Click on "Create Instance". This will take you to the instance creation page.
  3. Give your instance a name. Choose a descriptive name, like "my-free-vps".
  4. Choose an Availability Domain. Oracle Cloud regions are divided into Availability Domains (ADs), which are isolated data centers within a region. Choose any of the available ADs. Selecting an Availability Domain close to your location can improve network latency and performance.
  5. Change the Image. Click the "Change Image" button. Select "Canonical Ubuntu". The specific version, such as "Ubuntu 22.04", should be a Long Term Support (LTS) version for stability. Selecting an LTS version ensures that you receive security updates and bug fixes for an extended period, making your VPS more secure and reliable.
  6. Choose the "VM.Standard.E2.1.Micro" shape. This is the free tier-eligible compute shape. Make sure it's selected to avoid being charged. The "VM.Standard.E2.1.Micro" shape provides 1 GB of memory and a portion of an AMD EPYC processor, which is sufficient for many basic tasks. If you need more resources, you can always upgrade to a paid plan later.
  7. Configure Networking. Select the VCN you created earlier (e.g., "my-free-vcn") and accept the default subnet. Ensure that you assign a public IP address to your instance so that you can connect to it from the internet. A public IP address allows you to access your VPS using SSH or other remote access tools.
  8. Add SSH Key. This is crucial for securely connecting to your VPS. Choose the option to "Generate SSH Key Pair". Click "Save Private Key" and "Save Public Key". Keep the private key safe! You'll need it to connect to your VPS. The public key will be automatically installed on your VPS during the instance creation process. Losing your private key means losing access to your VPS, so make sure to back it up securely.
  9. Click "Create". Oracle will launch your VPS instance. This process may take a few minutes.

Launching your free VPS instance is a straightforward process, but it's essential to follow the steps carefully to ensure that your VPS is configured correctly. Pay close attention to the networking settings and the SSH key configuration, as these are critical for accessing and securing your VPS.

Step 4: Connect to Your VPS

Once your VPS is up and running, you'll want to connect to it. Here's how:

  1. Find your VPS's public IP address. In the OCI console, navigate to Compute > Instances and select your VPS. You'll find the public IP address listed on the instance details page.
  2. Use an SSH client. On Windows, you can use PuTTY. On macOS or Linux, you can use the built-in ssh command in your terminal.
  3. Connect to your VPS.
    • Using PuTTY: Enter the public IP address in the "Host Name" field. Browse to your saved private key file in the "Connection > SSH > Auth" section.
    • Using the terminal: Open your terminal and type: ssh ubuntu@<your_public_ip_address> -i <path_to_your_private_key>. Replace <your_public_ip_address> with your VPS's public IP address and <path_to_your_private_key> with the path to your private key file.
  4. Accept the security warning. The first time you connect to your VPS, you may see a security warning. This is normal. Just accept it to continue.
  5. Log in as the ubuntu user. The default username for Ubuntu instances is ubuntu. You won't be prompted for a password because you're using your SSH key for authentication.

Connecting to your VPS using SSH is a secure way to manage your server remotely. SSH encrypts all communication between your computer and your VPS, protecting your data from eavesdropping. Using an SSH key for authentication eliminates the need to enter a password, making the login process more secure and convenient.

Step 5: Basic VPS Configuration

Now that you're connected to your VPS, it's time to do some basic configuration.

  1. Update the package list. Run the following command: sudo apt update. This will update the list of available packages.
  2. Upgrade the installed packages. Run the following command: sudo apt upgrade. This will upgrade the installed packages to the latest versions. It's a good idea to do this regularly to keep your system secure and up-to-date.
  3. Set up a firewall. Ubuntu comes with a firewall called ufw (Uncomplicated Firewall). Enable it by running the following command: sudo ufw enable. Then, allow SSH connections by running: sudo ufw allow ssh. You may also want to allow HTTP (port 80) and HTTPS (port 443) traffic if you're planning to host a website. For example: sudo ufw allow 80 and sudo ufw allow 443.
  4. Create a new user. It's a good idea to create a new user with sudo privileges for your everyday tasks. This will help protect the ubuntu user account from being compromised. To create a new user, run the following command: sudo adduser <your_username>. Replace <your_username> with your desired username. Then, add the user to the sudo group by running: sudo usermod -aG sudo <your_username>.
  5. Disable password authentication for SSH. To further enhance security, you can disable password authentication for SSH. This will prevent attackers from trying to guess your password. To do this, edit the SSH configuration file: sudo nano /etc/ssh/sshd_config. Find the line that says PasswordAuthentication yes and change it to PasswordAuthentication no. Then, restart the SSH service: sudo systemctl restart sshd.

Performing these basic configuration steps will help secure and optimize your VPS. Updating the package list and upgrading the installed packages ensures that your system has the latest security patches and bug fixes. Setting up a firewall protects your VPS from unauthorized access. Creating a new user with sudo privileges allows you to perform administrative tasks without compromising the ubuntu user account. Disabling password authentication for SSH prevents attackers from trying to guess your password.

Final Thoughts

And there you have it! You've successfully created an Oracle free tier VPS. This is a fantastic way to experiment with cloud computing, host small projects, or learn new technologies without spending any money. Remember to keep an eye on your resource usage to stay within the free tier limits. Have fun experimenting!

By following these steps, you can create a free VPS on Oracle Cloud and use it for a variety of purposes. Whether you're a student, a hobbyist, or a small business owner, Oracle's free tier provides a cost-effective way to get started with cloud computing. So go ahead and give it a try! You might be surprised at what you can accomplish with a free VPS.