Free virtual private server hosting on a cloud.
Here are github repos with details on various providers:
So far I only run Oracle Cloud.
Will add others if I will deal with them, or if Oracle fucks me over.
As of 2023.
- 1-2 instances of AMD based Compute VMs with 1/8 OCPU and 1 GB ram each
shape name: VM.Standard.E2.1.Micro - 1-4 instances of 4 Arm-based Ampere A1 cores with 24 GB of ram to divide
shape name: VM.Standard.A1.Flex - Block Volumes Storage, 200 GB total, default 50GB for boot of any VM
- 10 Mbps bandwidth
- 10 TB per month outbound data transfer
- A credit card is needed during the registration.
- Home region is picked and it can not be changed later. Choise here will impact the IP address location and possibly availability of free instances to create.
- I read that you wont be able to re-use credit card if you terminate your account.
Seen comments online that some just cant get the registration done.
Instances > Create instance
- If none selected, pick Compartment in left column, default root
- Name - whatever
- Create in compartment - default
- Placement - default;
Always Free-eligible
- Security - default - shield disabled
- Image and shape
- VM.Standard.E2.1.Micro
Always Free-eligible
- Ubuntu 22.04
Always Free-eligible
- VM.Standard.E2.1.Micro
- Networking - edit; create a new virtual cloud network; or pick existing one
same for subnet
Assign a public IPv4 address - Add SSH keys -
Paste public keys
. Well it be good if you were not noob, and already have your ssh identiy and that you just paste your public key.
Noobs will need to pickGenerate a key pair for me
, then download both public and private keys and google out how to use them to SSH in the VM once it's running. - Boot volume - keep default
You can ignore €1.85/month charge for Boot volume displayed, its a bug. After the creation, in Billing & Cost Management - Subscriptions or Cost analysis the ammount displayed should be 0€.
Oracle network settings ingress rule
- Virtual Cloud Networks > VNC you got there > Subnet > Securty List > Ingress Rules
- A rule for port 22 should be there, to let in ssh.
- Add new rule
- Source Type - CIDR
- Source CIDR -
0.0.0.0/0
- IP Protocol -
All Protocols
firewalld in ubuntu open port
in examples here port will be 7777/tcp
sudo apt-get update && sudo apt-get upgrade
sudo apt install firewalld
sudo firewall-cmd --zone=public --permanent --add-port=7777/tcp
sudo firewall-cmd --reload
To test
- ssh in to the VM
nc -l 7777
- starts a netcat server listening on port 7777/tcp- go on site like yougetsignal.com
put in IP of the VM, port, test if you getopen
- or from your linux machine
nc <ip-of-the-vm> 7777
,
write something, it should appear in the VM
If it works, then depending on the use, one can start securing stuff better.
For example, restricing from what public ip connection are accepted -
ingress rule has Source CIDR
set to lets say 353.749.385.54/32
If set, the online test from a website will fail, but nc from a machine with that public IP will work.
For some reason its not stupid simple
to install docker on ubuntu. You are put to decisions.
I picked the script way, which I guess dont get upated?
curl -fsSL https://get.docker.com | bash
I will not be running anything for now as a test, if email about idle instance comes.
IF it comes the solution should be to put regular load on the VM. This should do it.
echo "*/5 * * * * root timeout 46 nice md5sum /dev/zero" | sudo tee /etc/cron.d/dummy-load
Some discussion on this
I am used to archlinux and everything else feels wrong.
So to get it as a VM on oracle cloud.
- Download the latest qcow2 image
https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2 - Storage > Buckets > Create Bucket > Defaults are fine
- Pick the bucket from the list > Upload the qcow2 arch image
- Compute > Custom images > Import image
- Operating system - Generic Linux
- Import from an Object Storage bucket
- Image type - QCOW2
- Paravirtualized mode
- Import image
Afterwards its going same as with any other instance.
arch/arch for SSH login, recommend disabling password login and do IP restriction
Not tested but theres also this as option:
Some youtube videos and articles