# Self-host BookStack

> A simple, self-hosted platform for organizing documentation into books, chapters, and pages.

- Page: https://levelrail.com/templates/bookstack/
- JSON: https://levelrail.com/templates/bookstack.json
- Category: Productivity
- Licence: MIT (Permissive license)
- Source: https://github.com/BookStackApp/BookStack
- Upstream docs: https://www.bookstackapp.com/docs/

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 24.05.2

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| bookstack | lscr.io/linuxserver/bookstack | 24.05.2 | 80 | bookstack_data -> /config |
| db | mariadb | 11 | none | bookstack_db_data -> /var/lib/mysql |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| bookstack | APP_URL | preset |
| bookstack | DB_DATABASE | preset |
| bookstack | DB_HOST | preset |
| bookstack | DB_PASSWORD | generated |
| bookstack | DB_USERNAME | preset |
| db | MYSQL_DATABASE | preset |
| db | MYSQL_PASSWORD | generated |
| db | MYSQL_ROOT_PASSWORD | generated |
| db | MYSQL_USER | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy bookstack --name my-bookstack
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/bookstack/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy BookStack on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id bookstack for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image lscr.io/linuxserver/bookstack:24.05.2, mariadb:11 is what you deploy there.

Self-host BookStack, BookStack docker compose file, deploy BookStack on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
