{"id":1059,"date":"2021-02-22T22:24:27","date_gmt":"2021-02-22T22:24:27","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1059"},"modified":"2026-06-29T12:30:31","modified_gmt":"2026-06-29T11:30:31","slug":"oracle-free-tier-compute-instance-vps-install-debian-image","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/cloud-serverless\/oracle-free-tier-compute-instance-vps-install-debian-image\/","title":{"rendered":"Installing Debian on an Oracle Cloud Free Tier VPS"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>According to <a href=\"https:\/\/www.oracle.com\/cloud\/free\/\">Oracle Cloud Free Tier \u2192 Product \u2192 Compute<\/a>, two architectures are available: <\/p>\n<ul>\n<li><strong>AMD<\/strong>. You can create no more than 2 instances, each having 1 GB RAM.<\/li>\n<li><strong>Arm<\/strong> a.k.a. Ampere instances. For these, you have 3000 OCPU hours and 18000 GB hours of RAM per month. When used continuously, i.e. during the whole month, that means you can have no more than 4 VMs for free.<br \/>\n<strong>Important<\/strong>: to be able to connect to these Arm instances, you will have to make some simple changes to your OS image - see below.<\/li>\n<\/ul>\n<p>You also get a total of 200 GB of storage that you share for everything, from boot volumes for your VMs, to storage, backups and your custom OS images. And because each VMs uses minimum ~47 GB, that also means you can't have more than 4 free VMs total.<\/p>\n<h2>Debian Images<\/h2>\n<ol>\n<li>\n<p>Go to <a href=\"https:\/\/cdimage.debian.org\/cdimage\/cloud\/\">cdimage.debian.org\/cdimage\/cloud<\/a> and choose a <strong><code>qcow2<\/code><\/strong> image for <strong>your architecture<\/strong>: <code>arm64<\/code> for <strong>Arm<\/strong> and <code>amd64<\/code> for <strong>AMD<\/strong>.<\/p>\n<ul>\n<li><strong>Debian 10<\/strong>: <a href=\"https:\/\/cdimage.debian.org\/cdimage\/cloud\/buster\/latest\/\">cdimage.debian.org\/cdimage\/cloud\/<strong>buster<\/strong>\/latest<\/a><\/li>\n<li><strong>Debian 11<\/strong>: <a href=\"https:\/\/cdimage.debian.org\/cdimage\/cloud\/bullseye\/latest\/\">cdimage.debian.org\/cdimage\/cloud\/<strong>bullseye<\/strong>\/latest<\/a><\/li>\n<li><strong>Debian 12<\/strong>: <a href=\"https:\/\/cdimage.debian.org\/cdimage\/cloud\/bookworm\/latest\/\">cdimage.debian.org\/cdimage\/cloud\/<strong>bookworm<\/strong>\/latest<\/a><\/li>\n<li><strong>Debian 13<\/strong>: <a href=\"https:\/\/cdimage.debian.org\/cdimage\/cloud\/trixie\/latest\/\">cdimage.debian.org\/cdimage\/cloud\/<strong>trixie<\/strong>\/latest\/<\/a><\/li>\n<\/ul>\n<p>Choosing between <code>generic<\/code> and <code>genericcloud<\/code>:<\/p>\n<blockquote>\n<p>The cloud kernel omits modules that are unlikely to be useful in a cloud environment. (\u2026) But if you're worried and don't want to mess with it, generic is a more conservative choice.<\/p>\n<p>As for Generic vs Genericcloud, indeed, what changes is the kernel. The<br \/>\nidea behind the Generic image is that the image can be used with Ironic,<br \/>\non baremetal hardware, where the Genericcloud may not.<\/p>\n<\/blockquote>\n<\/li>\n<li>\n<p><strong>Put the image file to <a href=\"https:\/\/cloud.oracle.com\/object-storage\/buckets\">object storage<\/a><\/strong> (create a new bucket if needed). <\/p>\n<ul>\n<li>Option 1, <strong>Download-Upload<\/strong>. The obvious approach, you download the file to your computer and then use OCI web UI to upload the file into your object storage bucket. Takes time and uses bandwidth.<\/li>\n<li>\n<p>Option 2, <strong>Wget\/cURL<\/strong>. Fetch the remote file right into your bucket. Click Developer Tools (top right corner) \u2192 Cloud Shell; then run:<\/p>\n<pre><code>wget https:\/\/example.com\/file.iso\noci os object put -bn my-bucket --file file.iso<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>If using the Archive Storage Tier, once the file appeared as object in the bucket, restore it for 24 hours \u2013 or else you'll be getting <em>The PAR\/object provided for image import is in archived state. Please restore it and try importing again<\/em> if you try to create a Custom Image using a file that's archived.<br \/>\nMy advice is to restore for 24 hours because restoring takes long, and if you choose 24 hours, you have room to return to this the next day while the file is still there.<\/p>\n<\/li>\n<li>\n<p><strong>Create an OCI Custom Image<\/strong> from your bucket object. Go to <a href=\"https:\/\/cloud.oracle.com\/compute\/images\">Custom Images<\/a>, click <em>Import Image<\/em> and choose <em>Import from an Object Storage bucket<\/em>. Select the bucket where you uploaded the image, and then select the image. The image type is <code>QCOW2<\/code> and I kept <em>Paravirtualized mode<\/em>.<\/p>\n<\/li>\n<li>\n<p>The new image should appear on the <a href=\"https:\/\/cloud.oracle.com\/compute\/images\">Custom Images<\/a> page. <strong>Wait for it to complete importing.<\/strong> Then go to <em>Custom image details<\/em> and under <em>Edit details<\/em> select the free tier shapes: <code>VM.Standard.E2.1.Micro<\/code> for AMD and <code>VM.Standard.A1.Flex<\/code> for Arm; you can deselect other shapes.<br \/>\n4.1. <strong>Arm-specific note<\/strong>: on the same <em>Custom image details<\/em> page click <em>Edit image capabilities<\/em> and set the following:<\/p>\n<ul>\n<li><strong>Firmware<\/strong> = <code>UEFI_64<\/code> checked and selected as preferred; <code>BIOS<\/code> deselected<\/li>\n<li><strong>Launch mode<\/strong> = <code>CUSTOM<\/code> checked and selected as preferred; everything else deselected<\/li>\n<li><strong>Consistent volume naming<\/strong> = <code>Disabled<\/code><\/li>\n<\/ul>\n<p>Otherwise you won't be able to connect to your Arm VMs.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.oracle.com\/compute\/instances\/create\">Create an OCI VM instance<\/a>, under <em>Placement and hardware<\/em> choose the image you have just created<\/p>\n<\/li>\n<li>\n<p>Define your SSH keys, or make sure to save the auto generated ones<\/p>\n<\/li>\n<li>\n<p>Start the instance if not started automatically<\/p>\n<\/li>\n<li>\n<p>Connect using <code>ssh -i \/path\/to\/private\/key -p 22 debian@ip<\/code><br \/>\nIf you changed the SSH port during install, see <a href=\"https:\/\/oracle-base.com\/articles\/vm\/oracle-cloud-infrastructure-oci-amend-firewall-rules\">amending OCI firewall rules<\/a>.<br \/>\n<strong>Important<\/strong>: <code>debian<\/code> is the username to log in with, and as always, you can elevate to root using <code>sudo su -<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>Lastly, if you can't connect to your newly created instance - it doesn't respond to ping and SSH times out - make sure you created the necessary ingress rules and the Internet gateway exists. See this Stackoverflow answer for more info: <a href=\"https:\/\/stackoverflow.com\/questions\/61375652\/oracle-cloud-instance-connectivity-issue\">racle Cloud Instance connectivity issue<\/a>.<\/p>\n<p>In short:<\/p>\n<ol>\n<li>\n<p>Go to <a href=\"https:\/\/cloud.oracle.com\/networking\/vcns\">Virtual Cloud Networks list<\/a> and open the VCN you're using for your free VPS<\/p>\n<\/li>\n<li>\n<p>Once inside the <em>Virtual Cloud Network Details<\/em>, go to <em>Internet Gateways<\/em> tab. There should be at least one. Otherwise click <em>Create Internet Gateway<\/em> and in the blade\/popup that slides from the left, just give your new gateway a name. Do <strong>not<\/strong> make any Route Table Association under Advanced options.<\/p>\n<\/li>\n<li>\n<p>Go to the <em>Virtual Cloud Network Details<\/em> \u2192 <em>Route Tables<\/em> tab that is neighbouring to the <em>Internet Gateways<\/em>. Make sure you have at least one, in my case the default is named <em>Default Route Table for my-VCN-name<\/em>. Inside, the Route Rules for that table should be:<\/p>\n<ul>\n<li>Destination = <code>0.0.0.0\/0<\/code><\/li>\n<li>Target Type = <code>Internet Gateway<\/code><\/li>\n<li>Target = (the Internet Gateway we created above)<\/li>\n<li>Route Type = <code>Static<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Finally, under the <em>Virtual Cloud Network Details<\/em> \u2192 <em>Subnets<\/em> tab (located again under the same level as <em>Internet Gateways<\/em> and <em>Route Tables<\/em>) and open the subnet you should already have there. Then under <em>Security Lists<\/em> open the one that's already there. Edit the <em>Ingress Rules<\/em> (incoming traffic) and <em>Egress Rules<\/em> (outgoing traffic).<\/p>\n<ul>\n<li>A normal ingress rule in my case has <em>Stateless<\/em> = <code>No<\/code>, <em>Source<\/em> = <code>0.0.0.0\/0<\/code>, <em>IP Protocol<\/em> = <code>TCP<\/code>, <em>Source Port Range<\/em> = <code>All<\/code> and <em>Port<\/em> = (whatever port you need to allow access to, e.g. <code>22<\/code> for SSH or <code>80,443<\/code> for HTTP)<\/li>\n<li>A one size fits all egress rule in my case is the same as above, except <em>IP Protocol<\/em> = <code>All Protocols<\/code> and no ports defined at all, thus allowing all outgoing traffic<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Reboot the VPS after making the above changes.<\/p>\n<p>Sources:<\/p>\n<ul>\n<li><a href=\"https:\/\/old.reddit.com\/r\/debian\/comments\/jayys3\/what_happened_with_the_debian_images_for_oracle\/\">reddit.com\/r\/debian\/comments\/jayys3\/what_happened_with_the_debian_images_for_oracle<\/a><\/li>\n<li><a href=\"https:\/\/www.mail-archive.com\/debian-cloud%40lists.debian.org\/msg05196.html\">Re: Difference between Debian cloud images: openstack\/generic\/genericcloud by Ross Vandegrift<\/a> and <a href=\"https:\/\/www.mail-archive.com\/debian-cloud%40lists.debian.org\/msg05197.html\">Re: Difference between Debian cloud images: openstack\/generic\/genericcloud by Thomas Goirand<\/a><\/li>\n<li><a href=\"https:\/\/old.reddit.com\/r\/oraclecloud\/comments\/rxjpil\/debian_byoi_on_ampere_a1_shapes_help_needed\/\">reddit.com\/r\/oraclecloud\/comments\/rxjpil\/debian_byoi_on_ampere_a1_shapes_help_needed<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you got a Free Tier VPS on Oracle Cloud and you want it to run Debian, you will not find it in pre-built OS images. Here&#8217;s how you create a custom OCI image based on Debian.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[778],"tags":[775,862,817],"class_list":["post-1059","post","type-post","status-publish","format-standard","hentry","category-cloud-serverless","tag-debian","tag-oracle-cloud-infrastructure","tag-vps","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1059"}],"version-history":[{"count":12,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1059\/revisions"}],"predecessor-version":[{"id":1829,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1059\/revisions\/1829"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}