[Install](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/#install-mongodb-community-edition-on-debian) and [configure auth for mongodb](https://medium.com/mongoaudit/how-to-enable-authentication-on-mongodb-b9e8a924efac). This is to avoid out of date verisons in debian repos.
Install nodejs. You can use [node version manager](https://github.com/nvm-sh/nvm) (nvm) to help with this.
Once you have nvm, install the LTS version of nodejs (currently 10.x).
```bash
$ nvm install --lts
```
Configure nginx. Delete the default nginx config, then modify [the example config](https://gist.github.com/fatchan/87ac56e5556d178ab2213afdf7619dec) and put it in the correct folder. Next, get https with a certificate generated from [letsencrypt](https://wiki.debian.org/LetsEncrypt).
Now clone the repo, browse to the folder and set some things up.
```bash
# in repo directory
$ nano configs/main.json #edit config with appropriate data
$ npm i
$ npm i -g gulp pm2
$ gulp
$ npm run-script setup
$ npm run-script start #this will start the backend