How to Install Immich on Nat Vps


Natvps.idImich is an application for storing, managing, and reaching photos and videos on a private server. Immich can be an alternative to services such as Google Photo or iCloud. With Immich, you have full kentrol to manage media files without worrying about the data sent to the server outside.

This article discusses the steps to install Immich on NAT VPS using a docker, along with the Nginx configuration for Reverse-Proxy. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and Centos. Make sure the OS used supports the docker.

Port forwarding configuration

Considering we use grout, we need to add 2 Port Forwarding Configuration on the virtualizor panel (or other VPS panels according to the provider), namely Port Forwarding HTTP and HTTPS For domain imich.

For example, in this article will use a domain gallery.tutorial.mdinata.my.id to access Immich. You are free to change the domain according to your choice. Record this port and domain, because we will use it again in the installation process.

Don’t forget to add DNS Records to go to your NAT VPS public IP, like this:

If confused, please read our article about Domain prosecution Here: Explanation of Domain Forwarding in NAT VPS.

Install Docker

We will use a docker and compile a docker for spread Privateb.

First, install curly Using Orders:

apt update && apt install curl -y

Then, run manuscript Automatic installation from the docker by entering:

curl -fsSL get.docker.com | sh

Wait until the installation process is complete.

Install Imich

First, create a new folder for Imich.

mkdir immich
cd immich/

Download the configuration of Docker Compose and ENV from IMMICH repository:

wget -O docker-compose.yml 
wget -O .env 

Change the configuration first .env Before starting Immich:

apt install nano -y # Jika belum
nano .env

Some configurations that can be changed:

  • UPLOAD_LOCATION: Immich upload location. Adjust as needed
  • TZ: Timezone. Can be replaced to Asia/Jakarta. Don’t forget to delete the fence mark # in front of.

Save the file with Ctrl-X, yThen Enter.

Finally, run Immich:

docker compose up -d

Wait until the process spread finished. Deploy can first take a few minutes because it has to download all picture Immich from the start.

Nginx Configuration (Reverse Proxy)

So that we can access the URL through a domain like gallery.tutorial.mdinata.my.idwe can use Reverse Proxy Like Nginx.

First, install Nginx through the command:

# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ)
apt purge apache2* -y

# Install NGINX
apt install nginx -y

Create a new host configuration specifically for Immich:

nano /etc/nginx/sites-available/immich

Then stick the following configuration:

# 
server {
    server_name gallery.tutorial.mdinata.my.id;
    listen 80;
    listen [::]:80;

    # allow large file uploads
    client_max_body_size 50000M;

    # Set headers
    proxy_set_header Host              $host;
    proxy_set_header X-Real-IP         $remote_addr;
    proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # enable websockets: 
    proxy_http_version 1.1;
    proxy_set_header   Upgrade    $http_upgrade;
    proxy_set_header   Connection "upgrade";
    proxy_redirect     off;

    # set timeout
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    send_timeout       600s;

    location / {
        proxy_pass 
    }
}

Change gallery.tutorial.mdinata.my.id with your domain.

Activate the configuration with:

ln -sf /etc/nginx/sites-available/immich/etc/nginx/sites-enabled/immich

systemctl restart nginx # Restart NGINX

Produce SSL certificate (let’s encryption)

So that our domain can be accessed through HTTPS, we need to make a SSL certificate. We can use a free SSL certificate from Let’s Encrypt through Certbot.

Install Certbot and Nginx plugin use the command:

apt install python3-certbot python3-certbot-nginx

So, produce Certificate through Certbot with the command

certbot --nginx -d gallery.tutorial.mdinata.my.id

Change gallery.tutorial.mdinata.my.id with your domain.

Happy! Your current domain can be accessed via a safe connection https.

Access Immich

Immich can be accessed through your previous domain. Example: https://gallery.tutorial.mdinata.my.id.

Follow the user registration as usual. If so, you will be taken to dashboard Imich.

Congratulations, Immich Ready to Use!

Cover

Thus this article is about the steps to install Immich on NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!


News
Berita
News Flash
Blog
Technology
Sports
Sport
Football
Tips
Finance
Berita Terkini
Berita Terbaru
Berita Kekinian
News
Berita Terkini
Olahraga
Pasang Internet Myrepublic
Jasa Import China
Jasa Import Door to Door