-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[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.
- PuTTY (free)
- Oracle Cloud Infrastructure (“OCI”) Account (Credit Card Required - You will never be billed if you follow this guide)
- Sign in to OCI and click the hamburger menu
- Select ‘Compute’ and then ‘Instances’
- Click ‘Create Instance’
- 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
- Click the "Change image" button
- Click the ‘Edit’ button on the ‘Image’ section
- 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
- Click the‘ Change shape’ button
- ‘Networking’
- Leave as default.
- ‘Add SSH keys’
- Click on the ‘Paste public keys’ radial button
- Install PuTTY if you haven’t already and open ‘PuTTYGen’.
- Click the ‘Generate’ button and move the mouse randomly until the green bar is full.
- Select All of the text (right-click ‘Select All’) in the PuTTYGen ‘Public key for pasting…’ text box
- Copy to clipboard (right-click ‘Copy’)
- Paste (right-click ‘Paste’) in to the ‘SSH keys’ text box on the OCI ‘Add SSH keys’ section
- 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’.
- ‘Boot Volume’
- Click ‘Specify a custom boot volume size’
- Enter ‘200’ in ‘Boot volume size (GB)’ text box
- Click ‘Create’ button
- 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.
- In the ‘Primary VNIC’ section, click link beside ‘Subnet:’
- In the ‘Security Lists’ section click the ‘Default Security List…’ link
-
Click ‘Add Ingress Rules’ button
-
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
- Click ‘Add Ingress Rules’ button
- Click hamburger menu > Compute > Instance
- Select instance
- Click the ‘Copy’ link beside "Public IP Address"
- Open PuTTY
- Paste Public IP Address into ‘Host Name’ text box
- On left-hand side of PuTTY window expand ‘SSH’ menu and click ‘Auth’
- Click ‘Browse’ button, browse to the location that you saved your private key file in PuTTYGen and click the open button
- 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
- Double click the new session and click ‘Accept’ on the PuTTY Security Alert prompt
- log in as: ubuntu
- 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
- 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.
- Set ‘VITE_SERVER_ENDPOINT’ to http://:2283/api (see pic for example)
- 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
Dedicated to my wife and my children