How to Install Chibisafe on Nat Vps


Natvps.id – Chibisafe is a service file upload Open-source self-hosted. Chibisafe is designed to be easy to use with an intuitive appearance, and supports various types of files. Chibisafe also provides links that can be shared to share files with others, and have public and private fashion options.

This article discusses the steps to install chibisafe on NAT VPS using a docker, configuration, and 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 the chibisafe domain.

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

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

Install Docker

We use a docker and docker to compose men-spread Gowhatsapp.

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 YouTube-DL-Server

Youtube-DL-Server provides examples of compose docker configurations that can be used, so we don’t need to create configuration files docker-compose.yml from the beginning.

Create a new directory:

mkdir chibisafe
cd chibisafe/

Create a file docker-compose.yml using nano:

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

Attach the following configuration:

# https;//natvps.id/install-chibisafe-nat-vps
# This configuration is now complete for all-in-one Chibisafe setup

services:
  # The following are the needed services for Chibisafe file server:
  #   - sfs: Static File Server
  #   - chibisafe: Chibisafe Web Interface
  #   - chibisafe_server: Chibisafe Server
  sfs:
    image: halverneus/static-file-server:v1.8.3
    ports:
      - "8002:8080"
    volumes:
      - "chibisafe_uploads:/web"
    environment:
      - ALLOW_INDEX=false
      - SHOW_LISTING=false
    restart: unless-stopped

  chibisafe:
    image: chibisafe/chibisafe:latest
    environment:
      - BASE_API_URL=
    expose:
      - 8001
    ports:
      - 8001:8001
    restart: unless-stopped

  chibisafe_server:
    image: chibisafe/chibisafe-server:latest
    volumes:
      - chibisafe_db:/app/database:rw
      - chibisafe_uploads:/app/uploads:rw
      - chibisafe_logs:/app/logs:rw
    expose:
      - 8000
    ports:
      - 8000:8000
    restart: unless-stopped


volumes:
  chibisafe_db:
  chibisafe_uploads:
  chibisafe_logs:

Save the file with Ctrl-XY, then enter.

If so, run the application:

docker compose up -d

Wait until the process spread finished.

Nginx Configuration (Reverse Proxy)

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

nano /etc/nginx/sites-available/chibisafe

Then stick the following configuration:

# Konfigurasi NGINX untuk deploy Chibisafe di NAT VPS
# 

server {
    server_name chibi.tutorial.mdinata.my.id;
    listen 80;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass 
    }

    location /api {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass 
    }

    location /docs {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass 
    }

    location /files/ {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass 
    }

}

Adjust chibi.tutorial.mdinata.my.id with your domain.

Activate the configuration with:

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

# Restart NGINX
systemctl 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 chibi.tutorial.mdinata.my.id

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

Happy! Chibisafe currently can be accessed via a safe connection https.

Access the dashboard

Dashboard can be accessed via your previous domain. Example: https://chibitch.tutorial.mdinata.my.id.

Default User Name: Admin
Default password: Admin

Domain Uploads Configuration

We need to configure the domain that will be used by Chibisafe to take uploaded files.

On Side BilahOpen the Settings tab.

On Serve uploads fromEnter the url address: Chibisafe>/File. Example:

Then click save.

Test upload

Chibisafe is ready to use! Please try uploading files to test whether chibisafe can upload and download files correctly.

Cover

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



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center