Running chibisafe without Docker in a manual way
This document will guide you in setting up chibisafe manually in a server. Keep in mind we strongly recommend you use the Docker guide instead as it's simpler and tested thoroughly.
In order to install chibisafe and run it without containers there are a few things you need to set up on your system beforehand. This guide assumes you are using Ubuntu/Debian so feel free to adjust commands as you see fit based on your distro.
Pre-requisites
Before running chibisafe make sure you install the following dependencies:
- To install ffmpeg you can run
- To get node v20 we recommend you install it via volta.sh
- For the reverse proxy we recommend using Caddy
- But if you rather use NGINX instead of Caddy then:
Choose either Caddy or NGINX, don't install both!
Installing
The first things you should do is clone the repository to get everything necessary, so run the following commands:
With chibisafe now built you need to run both the backend and the frontend process to get the whole system working. Before starting the chibisafe stack you need to set up 2 environment variables in order for chibisafe to understand where it needs to connect. In order to do so first run the following command:
You can start both processes by running the following 2 commands in either separate terminals or tmux sessions.
Now the backend should be running in port 8000
and the frontend in port 8001
.
With PM2
If you rather use PM2 what you can do is create a file called chibisafe.json
in the root directory of the project with the following content:
Make sure to change chibi.domain for your own domain name.
Now you can run the following command and chibisafe will run in the background
Reverse proxy
In order to make chibisafe's 2 processes usable and attach a domain name, you need a reverse proxy. This guide assumes you are using Caddy since we like Caddy. Once you have Caddy installed locally you can add this to your Caddyfile in order reverse proxy the exposed ports from chibisafe:
Make sure to change chibi.domain for your own domain name, and root /app/uploads
for the actual path where your upload folder is.
After correctly setting your Caddyfile and restarting the caddy process in your system, you should be able to visit your instance with the domain name and start using it.