Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 61 additions & 58 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,7 @@ Example for GitHub Container Registry:
image: ghcr.io/booklore-app/booklore:latest
```

---

### 📁 Step 1: Create Necessary Folders

Create folders on your computer to store Booklore’s data and your books.

Open a terminal and run the following commands (adjust the path as needed):

```bash
mkdir -p ~/booklore/config/mariadb
mkdir -p ~/booklore/data
mkdir -p ~/booklore/books
mkdir -p ~/booklore/bookdrop
```

Here’s what each folder is for:

- `config/mariadb`: MariaDB database configuration and data (persists your database)
- `data`: Booklore app data such as settings and cache
- `books`: Your main book library (store PDFs, EPUBs, CBZs here)
- `bookdrop`: Drop new books here to have Booklore import them automatically

---

### Step 2: Install Docker & Docker Compose
### Step 1: Install Docker & Docker Compose

If you haven’t already, install:

Expand All @@ -70,65 +46,92 @@ Follow the official installation instructions for your operating system.

---

### Step 3: Create the `docker-compose.yml` File
### Step 2: Create the `docker-compose.yml` File

In your preferred folder, create a file named `docker-compose.yml` and add the following content:

```yaml
name: booklore
services:
booklore:
image: booklore/booklore-app:latest
# Or use the GitHub Container Registry image:
# image: ghcr.io/booklore-app/booklore:latest
container_name: booklore
image: booklore/booklore:${BOOKLORE_IMAGE_TAG}
container_name: booklore_server
env_file:
- .env
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DATABASE_URL=jdbc:mariadb://mariadb:3306/booklore
- DATABASE_USERNAME=booklore
- DATABASE_PASSWORD=your_secure_password
- SWAGGER_ENABLED=false
- DATABASE_URL=jdbc:mariadb://mariadb:3306/${MYSQL_DATABASE}
- DATABASE_USERNAME=${MYSQL_USER}
- DATABASE_PASSWORD=${MYSQL_PASSWORD}
depends_on:
mariadb:
condition: service_healthy
ports:
- "6060:6060"
volumes:
- /your/local/path/to/booklore/data:/app/data
- /your/local/path/to/booklore/books:/books
- /your/local/path/to/booklore/bookdrop:/bookdrop
restart: unless-stopped
- ${BOOKLORE_DATA_PATH}:/app/data
- ${BOOKLORE_BOOKS_PATH}:/books

mariadb:
image: lscr.io/linuxserver/mariadb:11.4.5
container_name: mariadb
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- MYSQL_ROOT_PASSWORD=super_secure_password
- MYSQL_DATABASE=booklore
- MYSQL_USER=booklore
- MYSQL_PASSWORD=your_secure_password
image: lscr.io/linuxserver/mariadb:11.4
container_name: booklore_mariadb
env_file:
- .env
volumes:
- /your/local/path/to/mariadb/config:/config
- ${MARIADB_CONFIG_PATH}:/config
restart: unless-stopped
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
interval: 5s
interval: 10s
timeout: 5s
retries: 10
retries: 5
```

---

### Step 3: Create the `.env` File

```env
# Docker Image Version
# This determines which version of the Booklore image to pull from GitHub Container Registry (GHCR).
# Use "latest" for the most recent version or specify a tag like "v1.0.0".
BOOKLORE_IMAGE_TAG=latest

# User and Timezone Settings
# PUID and PGID define the user/group running the container.
# Avoid using "user" property because system won't work with it.
# TZ sets the timezone for correct time-related operations.
PUID=1000 # Default user ID (Check with `id -u` on Linux/Mac)
PGID=1000 # Default group ID (Check with `id -g` on Linux/Mac)
TZ=Etc/UTC # Change this to your timezone (e.g., America/New_York, Asia/Kolkata)

# Database Credentials (Replace with a secure password)
# This password is used by MariaDB. Make sure to keep it secure.
MYSQL_ROOT_PASSWORD=super_secure_password
MYSQL_DATABASE=booklore
MYSQL_USER=booklore
MYSQL_PASSWORD=your_secure_password

# Paths for Docker Volumes (Update these paths as per your system)
# These paths store persistent data for Booklore and MariaDB.
# Replace "/path/to/..." with actual directories on your system.
BOOKLORE_DATA_PATH=/path/to/booklore/data # Example: /home/user/booklore/data (Stores app-related data)
BOOKLORE_BOOKS_PATH=/path/to/booklore/books # Example: /home/user/booklore/books (Stores book files)
MARIADB_CONFIG_PATH=/path/to/mariadb/config # Example: /home/user/booklore/mariadb/config (Stores database config)

# How to find your correct paths?
# 1. Choose a location where you want to store persistent data.
# 2. Create the required folders if they don’t exist.
# 3. Use `pwd` in your terminal inside those directories to get the full path.
# 4. Replace `/path/to/...` above with your actual paths.
```

> 💡 Replace `/your/local/path/to/...` with the actual paths to the folders you created in Step 1.

> ⚠️ Use strong, secure passwords for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD`. These must match in both services.

> 💡 You can find more information and available tags on:
> - [Docker Hub: booklore/booklore-app](https://hub.docker.com/r/booklore/booklore-app)
> - [Docker Hub: booklore/booklore](https://hub.docker.com/r/booklore/booklore)
> - [GitHub Container Registry: booklore-app/booklore](https://github.com/booklore-app/booklore/pkgs/container/booklore)
> - [GitHub Releases page](https://github.com/adityachandelgit/booklore/releases).
> - [GitHub Releases page](https://github.com/booklore-app/booklore/releases).

---

Expand Down Expand Up @@ -156,4 +159,4 @@ You should see the Booklore web interface ready for use.

---

If you have any issues, double-check folder paths, passwords, and ensure Docker is running correctly on your system.
If you have any issues, double-check folder paths, passwords, and ensure Docker is running correctly on your system.