How to Install Memos on Nat Vps


Natvps.id – Memos is a recorder application (recording application) Open-source and can be self-host. Memos is designed as an alternative to cloud -based recorder services, which focus on privacy and data ownership for its users, as well as light and supportive performance syntax Price reduction.

This article discusses the steps of the Memos Installation in NAT VPS using a compose 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.

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 male domains.

For example, in this article will use a domain memos.tutorial.mdinata.my.id to access memos. 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 Memo.

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 memo

First, create a new directory to Micos:

mkdir /opt/memos
cd /opt/memos

Then, create a compose docker file:

apt install nano -y # Jika belum
nano docker-compose.yml

Fill in the following configuration:

services:
  postgres:
    image: postgres:15
    environment:
      POSTGRES_DB: memos
      POSTGRES_USER: memos
      POSTGRES_PASSWORD: password
    volumes:
      - postgres_data:/var/lib/postgresql/data
  memos:
    image: neosmemo/memos:stable
    depends_on:
      - postgres
    environment:
      - MEMOS_DRIVER=postgres
      - MEMOS_DSN=postgresql://memos:password@postgres:5432/memos?sslmode=disable
    ports:
      - "5230:5230"
volumes:
  postgres_data:

Save the file with Ctrl-X, yThen Enter.

Finally, run memos:

docker compose up -d

Wait until the process spread finished. The deploy can first take a few minutes because it has to download memos and postgreSQL, and configure it from the beginning.

Nginx Configuration (Reverse Proxy)

So that we can access the URL through a domain like memos.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 to teach:

nano /etc/nginx/sites-available/memos

Then stick the following configuration:

# 

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

    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass 
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
    }
}

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

Activate the configuration with:

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

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 memos.tutorial.mdinata.my.id

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

Happy! Memos is currently accessed via a safe connection https.

Access memos

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

Cover

That’s how this article was installed by men’s steps 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