Installation guide
Requirements:
- a VPS
- Fully qualified domain name
OPTION 1. Install script ( Recommended )
This part is covered in docs/self-host-khofly VPS section, the ./scripts/install.sh script installs and runs both the web client and the API. If you've already run that script you probably don't need this page.
OPTION 2. Manual installation
Follow these steps only if you've manually installed Khofly web client.
1. Install dependencies
2. Install pm2
3. Install Bun
4. Create an empty folder in your home directory, ex. mkdir khofly.
5. cd khofly and type git clone https://github.com/cufta22/khofly.git .
5.1. Pick a branch, by default it will be on master but if you want more frequent updates git fetch origin staging and git checkout -b staging origin/staging
6. Build and run API
7. Create the ecosystem.config file for pm2
8. Create Nginx config for PV, don't forget to update the server_name to your domain name.
9. Add SSL certificate for your domain certbot --nginx
10. sudo systemctl reload nginx
Updating
To update the PV run ./scripts/redeploy-pv.sh pv, make sure to replace "pv" with pm2 instance name for your PV.
To get a list of all pm2 instances run pm2 ls
Read more