Skip to content

[Community] Immich OCI Free Tier ARM Ubuntu 22.04 VM Tutorial by Jay2

Alex edited this page Aug 5, 2022 · 1 revision

This tutorial is intended for both Oracle Cloud and Linux command line beginners, all steps and commands will be included.

When you’ve finished these steps, you’ll have an always-free virtual machine that you can access from anywhere with a 2.4Ghz quad-core ARM64 CPU, 24GB RAM, 200GB SSD, and 4Gbps connectivity, 10TB per month outgoing traffic, and Unlimited incoming traffic.

What You’ll Need:

Steps:

  1. Sign in to OCI and click the hamburger menu

image8

  1. Select ‘Compute’ and then ‘Instances’

image16

  1. Click ‘Create Instance’

image1

  1. On the ‘Create compute instance’ page, make the following changes:
  • ‘Placement’
    • Leave as default.
  • ‘Image and shape’
    • Click the ‘Edit’ button on the ‘Image’ section
      • Click the "Change image" button
        • Choose "Canonical Ubuntu"
        • Click the ‘Select image’ button

image25

  • Click the ‘Change Shape’ button on the ‘Shape’ section
    • Click the‘ Change shape’ button
      • Choose ‘Ampere’
      • Select ‘VM.Standard.A1.Flex’
      • Drag ‘Number of OCPUs slider to ‘4’
      • Drag ‘Amount of memory (GB)’ slider to ‘24’
      • Click ‘Select shape’ button

image23

  • ‘Networking’
    • Leave as default.
  • ‘Add SSH keys’
    • Click on the ‘Paste public keys’ radial button

image3

  • Install PuTTY if you haven’t already and open ‘PuTTYGen’.

image15

  • Click the ‘Generate’ button and move the mouse randomly until the green bar is full.

image12

  • Select All of the text (right-click ‘Select All’) in the PuTTYGen ‘Public key for pasting…’ text box

image13

  • Copy to clipboard (right-click ‘Copy’)

image28

  • Paste (right-click ‘Paste’) in to the ‘SSH keys’ text box on the OCI ‘Add SSH keys’ section

image9

  • In ‘PuTTYGen’ window, click ‘Save private key’ button. Choose whatever file name you want and save this file in a safe place. PuTTYGen will ask you if you’re sure you want to save without a passphrase - choose ‘Yes’.

image21 image21

  1. ‘Boot Volume’
  • Click ‘Specify a custom boot volume size’
  • Enter ‘200’ in ‘Boot volume size (GB)’ text box
  • Click ‘Create’ button

image14

  1. Wait 1-2 minutes for VM provisioning to complete. When complete, yellow provisioning box will turn green. Once green, you can proceed with next steps.

image2

  1. In the ‘Primary VNIC’ section, click link beside ‘Subnet:’

image27

  1. In the ‘Security Lists’ section click the ‘Default Security List…’ link

image6

  1. Click ‘Add Ingress Rules’ button

  2. Fill out the ‘Ingress Rule’ form:

  • Stateless: Unchecked
  • Source Type: CIDR
  • Source CIDR: 0.0.0.0/0
  • IP Protocol: TCP
  • Source Port Range: [blank]
  • Destination Port Range: 2283
  • Description: Immich
  1. Click ‘Add Ingress Rules’ button

image10

  1. Click hamburger menu > Compute > Instance

image16

image1

  1. Select instance

image22

  1. Click the ‘Copy’ link beside "Public IP Address"

image4

  1. Open PuTTY

image11

  1. Paste Public IP Address into ‘Host Name’ text box

image18

  1. On left-hand side of PuTTY window expand ‘SSH’ menu and click ‘Auth’

image29

  1. Click ‘Browse’ button, browse to the location that you saved your private key file in PuTTYGen and click the open button

image17

  1. On left hand side of PuTTY window select ‘Session’, enter any name you’d like in to ‘Saved Sessions’ text box and click ‘Save’ button

image24

  1. Double click the new session and click ‘Accept’ on the PuTTY Security Alert prompt

image20

  1. log in as: ubuntu

image19

  1. Enter the following commands in the order listed. You must enter them 1 at a time. You can copy (highlight > right-click ‘Copy’) from this document and paste it into the PuTTY window (right-click). If at any point you are prompted with a bright pink ‘Package configuration’ screen, push tab-enter to select ‘Ok’ and continue with the following steps.
sudo -i


apt update


apt upgrade -y


apt install net-tools ca-certificates curl gnupg lsb-release


mkdir -p /etc/apt/keyrings


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg


echo \

  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \

  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


apt update


apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y


mkdir immich-main


mkdir immich-photos


cd immich-main


wget https://raw.githubusercontent.com/immich-app/immich/main/docker/docker-compose.yml


wget https://raw.githubusercontent.com/immich-app/immich/main/docker/.env.example


cp .env.example .env


nano .env

*Use arrow keys to navigate down to ‘Upload File Config’ section and set ‘UPLOAD_LOCATION’ to /root/immich-photos *Navigate to ‘JWT SECRET’ section and set ‘JWT_SECRET’ to some random string of characters (see image below for example

image5

  • Navigate to ‘WEB - Required’ section
  • Open another PuTTY window, click on your saved session and click ‘Load’ button. Take note of the IP address in the ‘Host Name’ text box.

image7

  • Set ‘VITE_SERVER_ENDPOINT’ to http://:2283/api (see pic for example)

image26

  • Press ‘CTRL-X’ and then ‘Y’ and then ‘Enter’ to save
  • Enter command: docker compose up -d
  • Wait at least 2 minutes
  • Close PuTTY
  • Open Windows Browser and navigate to: http://:2283
  • Done! If you enjoy Immich please consider buying Alex a coffee :) https://www.buymeacoffee.com/altran1502