Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 1.33 KB

self_hosting.md

File metadata and controls

69 lines (50 loc) · 1.33 KB

Self Host ZipLink

Requirements

  • Mandatory: Node.js at least 16x (16.15.1 LTS), best with 20x (20.0.0 LTS).
  • NPM
  • Mandatory: Your domain name, example: your.domain.name

Install the requirements (Note: Many of the installation steps require root or sudo access)

# Install NodeJS 16.X and npm
$ sudo apt update
$ sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
$ curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ npm install -g npm@latest

# clone this repo
$ git clone https://github.com/ishaanSh06/ZipLink.git
# go to ZipLink dir
$ cd ZipLink
# copy .env.template to .env (edit it according to your needs)
$ cp .env.template .env

Now, go to .env file and change the MONGO URL & DATABASE, with your own:

mongo_url = mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}
DB = ZipLink # Database Name
# Install dependencies
$ npm install
# Start the server
$ npm start

PM2

Using PM2

# Install pm2
$ npm install -g pm2
# Start the server
$ pm2 start app/server.js
# Takes a snapshot
$ pm2 save
# Add it on startup
$ pm2 startup