Skip to main content

[Oracle VPS] Introducing Oracle's Cloud offering

·15 mins· 0 · 0 ·
Intro VPS Oracle Always Free
JustinType
Author
JustinType
Cybersecurity Engineer and CTF Player
Table of Contents
VPS Oracle - This article is part of a series.
Part 0: This Article

Introduction to the series #

This article is the first in a series dedicated to hosting free lifetime services on a private server. The aim is to introduce as many people as possible to the world of computing, while sharing useful knowledge. I’m firmly convinced that it’s easier to understand a subject when you find it interesting and are willing to invest a little time. That’s why I’m going to show you how to set up your own game server, VPN server, cloud server, etc., with only one expense: a little time.

As these articles are aimed at a wide audience, I’ll try to keep the technical details as simple as possible, and I’ll assume that readers have an up-to-date Windows 10 or 11 computer.

  • Linux users: you’re smart enough to adapt these articles to your operating system.

  • MacOS users: you’re rich enough to buy a paid service giving the same result, or another computer with Windows.

Don’t forget that some tools or software may change over time, so the most important thing is to understand the methodology, if you understand the methodology you’ll can adapt it to your needs.

I hope you find these articles useful and learn something!

ready

Oracle Cloud Infrastructure (OCI) #

Presentation #

Oracle is an American company specializing in the sale of IT services, including the Oracle database management system, the Oracle Weblogic application server, the Oracle E-Business software package and the Oracle Cloud Infrastructure (OCI) cloud computing offering.

It’s the latter we’re interested in, as OCI offers “Always Free” services. By going to this page you can consult all the services eligible for this offer. There are many, and the ones we’re actually interested in correspond to the “compute” and “storage” categories.

These categories correspond to the computing power and storage space offered by Oracle. Generally, we speak of “Virtual Private Server” (VPS).

What’s important to understand is that Oracle doesn’t give us a physical server, as this type of machine is very expensive (expect to pay 5,000 dollars for a first-rate professional server). What Oracle provides us with are virtual machines (often shortened to “VM”).

A VM is simply a computer simulated by another more powerful computer!

It may sound strange, but in reality it’s very practical, because a computer can simulate several VMs, each with a different role and different characteristics. We can allocate a certain amount of computing power and storage space to a VM and modify it at any time.

This means we can be very flexible and easily manage all our services from a single machine.

“Always Free” offer #

With OCI’s “Always Free” offer, here’s what we get:

Always Free Oracle
See Oracle documentation

To sum up:

  • It is possible to create 4 VMs of Ampere A1 type or 2 VMs of Standard.E2.1.Micro type.
  • We have 4 OCPUs (you can compare this to a processor core, it’s the computing power)
  • We have 24 GB of RAM.
  • We have 200 GB of storage.
  • Each VM will be allocated at least 47 GB of storage for its proper operation.

We can do whatever we like with these resources: we can create 4 or 2 VMs and distribute the resources equally, or we can just create 1 VM with all available resources.

Obviously, the fewer resources a VM has, the less powerful it will be, so we need to choose which resources to allocate according to our needs.

All these resources are more than enough to create a game server, a cloud server and even a VPN server!

Why such an offer? #

If you take the time to look at Oracle’s competitors with similar services, you’ll realize that none of them offer such a generous “Always Free” package, so why?

Well, it’s simple: Oracle is one of the giants of the Net, but the company has fallen far behind its competitors in the Cloud market:

Cloud big entterprises

In such a competitive environment, with players who offer very low prices (as Amazon does with AWS) or offer a unique ecosystem that is widely used (as Microsoft does with Azure or Google with its Cloud), the only way to remain competitive is to attract people.

Oracle’s strategy is to offer its services “Always Free” to attract as many people as possible. Their aim is to get you used to their platform, their technologies and their services, until you take the plunge. And thus turn as many “Always Free” users as possible into future customers.

It’s not a problem in itself, it’s the strategy of many companies to provide you with super-efficient but limited free services, you just have to be aware of it.

In our case, it suits us just fine!

Disadvantages of the offer #

Although the offer is really very clean, it’s not perfect either. There are some disadvantages to keep in mind:

  • To create an account, you’ll need to fill in your personal and banking details, virtual cards are not accepted, so you’ll need to put in your real credit card (more information is given later).
  • You have access to all features, but if you accidentally use paid services, you will be automatically debited.
  • If you have any problems with your “Always Free” services, don’t rely on Oracle support to help you. Since you don’t make any money for the company, you are clearly not a priority or even taken into account.
  • Oracle may one day withdraw the offer and ask you to pay to continue using services that were previously “Always Free”.
Obviously this won’t happen overnight, you’ll be notified in advance if it does. The offer has been around for years, and there’s no sign of any change yet.

Creating an Oracle account #

Now that you know all about the offer, let’s look at how to create our Oracle account, then create our first VM (instance) and finally how to administer it.

First of all, go to the OCI home page and click on “Get started for free” :

OCI account creation 1

Fill in your information and validate the captcha. Here’s the first thing that’s a bit odd: you have to fill in your first and last name in capital letters (there’s a reason for this, which I’ll explain later):

OCI account creation 2

In this example, I am deliberately providing false information.

Check your e-mail address:

OCI account creation 3

You should arrive on this page:

OCI account creation 4

Create a strong password, confirm it, then select the “Individual” field (for personal use).

Create a username for your account (this is the name you’ll be asked to enter) and select your region.

OCI account creation 5

Choose the region closest to you for the best performance!

OCI account creation 6

You must now fill in your address and telephone number, as well as your first and last name, using capital letters :

OCI account creation 7

You will now have to fill in your banking information, as specified by Oracle you will not be charged, however you will have to deal with the verification system Cybersource which is … how to say … quite stupid.

OCI account creation 8

In fact, this system will check the accuracy of the information entered from the outset (surname, first name, address, telephone number, etc.) against the information on your credit card.

All the information you enter must match the information on your credit card. If you have changed your address or surname in the meantime, please enter the old informations that are written on your credit card.

Moreover, this system is case-sensitive, and the information transmitted by European banks is generally in capital letters, hence my recommendation from the start.

I tore my hair out for several days before finding the solution, and here’s some additional information I was able to find:

  • Do not create your account with an active VPN, Cybersource may detect this and consider this action fraudulent.
  • Do not use virtual or pre-paid cards, Cybersource will not be able to verify the card.

Before proceeding, please check your information:

OCI account creation 9

And add your credit card:

OCI account creation 10

You may be asked to validate a transaction for an amount of around one euro. This amount is not charged; it is simply used to check that a transaction is possible with your credit card and that it’s not empty.

If after all that you get this error, don’t count on Oracle customer service, they don’t know how Cybersource works, you’ll have to make several attempts by yourself, good luck!

OCI error

If all goes well, you’ll receive an e-mail telling you that your Oracle account has been created!

When you log in for the first time, Oracle will ask you to set up two-factor authentication. It’s very simple: just install an OTP (One Time Password) application such as FreeOTP or Google Authenticator on your smartphone and scan the QR Code provided by Oracle.

You’ll get a 6-digit code that changes every 60 seconds, which you’ll need to enter when you log in to your Oracle account.

Creating an instance #

Here, we’ll describe how to create an instance using a game server (Minecraft) as an example: Once you’re on your Oracle Cloud Dashboard, go to the tab Compute > Instances :

Instance creation 1

Then create a new instance:

Instance creation 2

Rename your instance and choose your compartment (a compartment is just a way of grouping things together, you can leave the root compartment as default). Let Oracle choose the domain and don’t touch the security setting, but open the choice of images:

Instance creation 3

Make sure you choose an image that says “Always-Free-eligible”.

For my part, I’ve chosen a Oracle Linux 8 image:

Instance creation 4

For the instance type I choose a VM Ampere A1 :

Instance creation 5

Then choose the resources to allocate to your Minecraft server. Usually one OCPU is enough, but RAM depends on your server:

VanillaPluginsMods
Minimal: 2 GBMinimal: 3 GBMinimal: 4 GB
Recommended: 4 GoRecommended: 6 GoRecommended: 8-10 Go

For this example, I’m going to set up the server with 1 OCPU and 10 GB RAM :.

Instance creation 6

Normally you already have a virtual network, select it and leave the default settings:

Instance creation 7

You can create another virtual network, if you create several instances in the same virtual network, these instances will be able to communicate with each other. If you want to partition your instances, you’ll need to place them in different virtual networks (note that you can only create two virtual networks). You can leave the default settings:

Instance creation 8

If you’re familiar with SSH, you can deposit your public key. In our case, we’ll generate a key pair, then upload the private key to our personal machine.

Don’t lose this key, as it allows you to connect to your instance.

Instance creation 9

This is what the file looks like:

Instance creation 10

Leave the default settings for the Boot Volume (to put it simply, Oracle manages the encryption of your instance’s boot volume, which is an additional layer of security):

Instance creation 11

Then attach a storage space to your instance. You’ll need to create a new one, give it a name, associate it with a compartment and define its size.

If you leave the default choice, your instance will have 47 GB of space, which is more than enough; if you choose “Custom”, you can add more space.

Don’t forget that you have a maximum of 200 GB for all your instances.

Instance creation 12

You can leave the other settings as default and attach your storage space:

Instance creation 13

And that’s it! All the parameters of your instance are configured, and you’re ready to create it.

If you see a price for Boot Volume, don’t pay any attention, it’s just Oracle’s automatic calculation tool, which doesn’t take the “Always Free” offer into account, you won’t be charged.

Instance creation 14

If you see this message in red when you try to create your instance, it means that Oracle currently has no space left to create VMs in your region. There’s no other solution than to wait and try again… until you succeed.

Instance creation 15

Usually you just have to wait a few minutes or a few hours, sometimes a few days, but don’t despair there will be space left for your instance. In my case, I waited ~30 minutes.

Once the instance has been created, you’ll be redirected to its page (here the instance is being provisioned):

Instance creation 16

After a few minutes, the instance is ready for use:

Instance creation 17

You can find all your VMs in the “Instances” tab:

Instance creation 18
The IP adress has been modified

Accessing your instance #

Now that our VM has been created, it’s time to connect to it remotely!

If you’ve never administered a server before, you should know that a server rarely has a “Graphical User Interface” (GUI), which saves storage space and performance.

This means that there are no buttons or windows, the only thing displayed is text, known as a CLI (“Command Line Interface”).

Here’s what a CLI looks like:

CLI example

To indicate an action to your server, instead of pressing a button we’ll send it commands. Here’s a list of 5 basic commands to remember:

# Allows you to change directories, as if you were browsing the folders on your machine
cd [directory]

# Lists folders and files in the current directory
ls

# Allows you to edit or create a file
nano [file]

# Delete a file
rm [file]

# Creates a directory
mkdir [directory]

There are a huge number of possible commands, and the aim is not to remember them all. These will suffice to create our Minecraft server. For the curious, here’s a list of commands used to administer a Linux server: Hostinger

Okay, great, but how do we get access to our server’s CLI?

That’s where the SSH protocol comes in.

The SSH protocol #

SSH stands for “Secure Shell”. A shell, commonly known as a “terminal”, is the most common way of managing Linux servers.

A terminal will enable you to execute commands on the remote machine from your own machine. Today, remote administration is vital when you’re managing servers. As you can imagine, you’re not going to physically travel to carry out an operation, especially if you have to administer thousands of servers, sometimes in several countries.

SSH offers a wide range of features, but it’s mainly used for its numerous security mechanisms.

Some links to learn more about SSH :

Via cmd / powershell #

The SSH protocol is installed by default on the latest versions of Windows 10 and 11. To use it, open a cmd or powershell shell in the folder containing your SSH key.

You can do this by pressing the Windows key and typing the name “cmd” or “powershell”.

You’ll need to place yourself in the correct directory with the cd command.

→ Example: cd C:\Users\[your_username]\Desktop\Server_Minecraft

You can also right-click while holding down the Shift key:

SSH 1

The command to connect to your server is:

ssh opc@[ip] -i [cle_ssh]

For example:

ssh opc@69.69.69.69 -i ssh-key-2024-06-05.key

Accept the “fingerprint” by typing “yes” if prompted. If you get a “bad permissions” error, your SSH key has too many permissions. To solve this problem, go to your SSH key’s properties, then to the Security tab, select the Users group and delete inheritance.

SSH 2

No one else can use the key, so now you have to add:

SSH 3

And give you all the rights:

SSH 4

You can now connect to your Minecraft server via SSH. The red box indicates that you are connected as user opc on virtual network virtual-network-1, in the /home/opc directory, which corresponds to the symbol ~ :

SSH 5

Via PuTTY #

The above procedure is a little complicated, but practical because you don’t need to install anything on your machine. There are, however, tools available to simplify SSH connections, the best known is PuTTY..

Go to the PuTTY installation page and download the installer:

PuTTY 1

Once PuTTY has been installed, launch the “PuTTYgen” application and press “Load”:

PuTTY 2

Load your private SSH key:

PuTTY 3

Then save this private key in a .ppk format (usable by PuTTY):

PuTTY 4

You will get this kind of file:

PuTTY 5

Now open the “PuTTY” application and go to the Connection > SSH> Auth tab, import the previously created .ppk file:

PuTTY 6

Then, in the “Session” tab, enter the SSH parameters and save the session:

PuTTY 7

You won’t need to retype all your SSH settings from now on, just “Load” the session you’ve just saved.

When you connect to the server, accept the fingerprint:

PuTTY 8

And that’s it! You’re now connected to the server via SSH!

PuTTY 9

Transferring files #

Now you know how to access your instance and you’ve learned a few commands to administer your server, but how do you transfer files from your local machine to your server or vice versa?

That’s where the FTP protocol comes in!

The FTP protocol #

As its name suggests, the File Transfer Protocol (FTP) is a file transfer protocol. It enables the exchange of data between a computer, the FTP client, and a server, the FTP host. This server hosts the data from your website or applications, making it easier to put them online, migrate them or share them. In our case, it’s the Minecraft server!

Via FileZilla #

We’re going to use FileZilla to transfer files via the FTP protocol. To do this, we first need to download the software onto our local machine via this page.

Once FileZilla has been installed, we just need to set up the connection to our Minecraft server as follows:

  1. Open the site manager
  2. Create a new site
  3. Name the site
  4. Select the correct protocol (here SFTP)
  5. Enter your server’s IP address
  6. Enter the port to be used (here 22)
  7. Choose authentication with a key file
  8. Enter user name
  9. Enter key file
  10. Save settings

FileZilla 1

When you connect to your server via FTP, this is what you see:

  1. The folder tree of your local machine
  2. Your server’s folder tree
  3. Files in your local machine’s current directory
  4. Files in your server’s current directory

FileZilla 2
Files beginning with a dot (.) are hidden system files by default

To test this, I create a text file on my local machine and transfer it to my server:

FileZilla 3

From my SSH access, I list the files (with ls) and display their contents (with cat), I can see that the text file has been transferred.

FileZilla 4

Conclusion #

In this article, I introduced you to Oracle Cloud Infrastructure’s “Always Free” offer, enabling you to create your own private server.

This article lays the foundations that will enable you to follow the next tutorials without any problems. Don’t hesitate to read it again if you’re having trouble with OCI.

After reading this article, you should now be familiar with system and network administration concepts such as :

  • VM creation and resource allocation
  • Remote administration protocols such as SSH and FTP
  • Basic CLI commands for interacting with a Linux system

I hope you’ve enjoyed reading the article, if you have, please feel free to like it and share it with your friends!

See you

VPS Oracle - This article is part of a series.
Part 0: This Article