Skip to main content

Requirements

Supported OSes

Architectures​

  • amd64
  • arm64

Systems​

  • Debian / Ubuntu
  • Arch Linux
  • RHEL / Rocky Linux
  • MacOS (with brew installed)

It should work on other distributions, you can try translating the commands below.

Specs​

Minimum​

  • 1 vcpu
  • 2gb ram or 1gb ram + 1gb swap
  • 2 vcpu
  • 4gb ram

Dependencies​

tip

You could install other dependencies using the setup script, but you must install git and clone the repository first.

Git​

Debian​

sudo apt install git

Arch​

sudo pacman -Sy git

RHEL​

sudo dnf install git

MacOS​

brew install git

Nodejs & yarn​

Debian​

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# use the nodesource setup script

sudo apt install -y nodejs
# install nodejs

sudo corepack enable
# enable yarn

Arch​

sudo pacman -Sy nodejs
# install nodejs

sudo corepack enable
# enable yarn

RHEL​

sudo dnf install nodejs
# install nodejs

sudo corepack enable
# enable yarn

MacOS​

brew install nodejs yarn

Docker & docker-compose​

Debian​

sudo apt install docker.io

sudo curl -L "https://github.com/docker/compose/releases/download/$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Arch​

sudo pacman -Sy docker docker-compose

RHEL​

sudo dnf install docker

sudo curl -L "https://github.com/docker/compose/releases/download/$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

MacOS​

brew install docker docker-compose

Nginx​

Debian​

sudo apt install nginx

Arch​

sudo pacman -Sy nginx-mainline

RHEL​

sudo dnf install nginx

MacOS​

brew install nginx

Mongodb shell and database tools​

Optional

This is now optional but still recommended. Required in many manual steps. Skip this for now if you just want to try out metahkg.

Debian​

sudo apt install gnupg
# install gnupg

wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
# import public key

echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/6.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
# add mongodb apt repository

sudo apt update
# update packages list

sudo apt install mongodb-org-shell mongodb-org-tools
# install mongosh and mongodb database tools

Arch​

Install from aur.

cd ~/Downloads
# go to downloads folder (or any other folders)

git clone https://aur.archlinux.org/mongosh-bin.git
git clone https://aur.archlinux.org/mongodb-tools-bin.git
# clone the aur repositories

cd mongosh-bin
makepkg -si
# install mongosh

cd ../mongodb-tool-bin
makepkg -si
# install mongodb tools

cd ..
rm -rf mongodb-tools-bin mongosh-bin
# remove the repositories after installation

RHEL​

Add the mongodb repository:

nano /etc/yum.repos.d/mongodb-org-6.0.repo
[mongodb-org-6.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc

Install:

sudo dnf install mongodb-org-shell mongodb-org-tools

MacOS​

brew tap mongodb/brew
# add mongodb formula repository

brew update

brew install mongodb-database-tools mongodb-community-shell

Third party services​

Domain​

Tip

You don't need a domain to test or deploy locally. See below.

Metahkg needs five domains / subdomains, for the web app and api, link shortening, images processing/proxy, and metadata (link preview) proxy.

Deploying locally​

If you are deploying locally only, you can use domains that resolves to localhost ( e.g. *.test.wcyat.me )

You can configure the domain to resolve to localhost on your machine only:

sudo nano /etc/hosts

Append a line to /etc/hosts.

# ...

127.0.0.1 example.com
127.0.0.1 l.example.com
127.0.0.1 i.example.com
127.0.0.1 rlp.example.com
127.0.0.1 r.example.com