-
Notifications
You must be signed in to change notification settings - Fork 2
Install with Docker
Note
There are multiple ways you can host BookLogr. This guide goes through the recommended way of installing it on your own hardware but depending on your needs certain steps can be altered as you deem neccessary.
There are older versions of this document, pick the one most suitable to you.
- Linux server (tested with Ubuntu 24.04)
- Docker
Create a directory to store docker-compose.yml
and .env
files in and move to that directory.
mkdir ./booklogr
cd ./booklogr
Download docker-compose.yml
and .env.example
files from the repository
curl --output docker-compose.yml "https://raw.githubusercontent.com/Mozzo1000/booklogr/refs/heads/main/docker-compose.yml"
curl --output .env "https://raw.githubusercontent.com/Mozzo1000/booklogr/refs/heads/main/.env.example"
Edit the .env
file as needed along with the environment variables for the web service in the docker-compose.yml
file.
See ENV-variables.md for more information.
Start all containers
docker compose up -d
🎉 The web interface should now be available on http://localhost:5150
It is recommended to use a reverse proxy for the docker containers when wanting to access them externally. This will guide you through how to set it up with Nginx but other software may work as well.
sudo nano /etc/nginx/sites-available/api.booklogr
Paste the following inside the file,
server {
server_name api.YOUR_DOMAIN;
location / {
proxy_pass http://127.0.0.1:5002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Change api.YOURDOMAIN to the public domain you want the api service to be accessible from.
sudo nano /etc/nginx/sites-available/auth.booklogr
Paste the following inside the file,
server {
server_name auth.YOUR_DOMAIN;
location / {
proxy_pass http://127.0.0.1:5001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Change auth.YOURDOMAIN to the public domain you want the api service to be accessible from.
Create Nginx configuration file for auth service
sudo nano /etc/nginx/sites-available/booklogr
Paste the following inside the file,
server {
server_name YOUR_DOMAIN;
location / {
proxy_pass http://127.0.0.1:5150;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Change YOURDOMAIN to the public domain you want the api service to be accessible from.
sudo ln -s /etc/nginx/sites-available/api.booklogr /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/auth.booklogr /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/booklogr /etc/nginx/sites-enabled/
sudo systemctl restart nginx
🎉 You should now be able to go to YOUR_DOMAIN and have a working BookLogr service running! 🎉
Tip
It is recommended to use an SSL certificate for all web services, especially if you are hosting BookLogr for external use.