> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-host Grimmory with Docker

> Organize, read, annotate, and sync your entire book collection from one place.

Organize, read, annotate, and sync your entire book collection from one place.

This page describes the Levelrail template for Grimmory (Media). It deploys the services below as one Docker Compose app on your own server. Project site: [https://github.com/grimmory-tools/grimmory](https://github.com/grimmory-tools/grimmory).

Recommended memory: about 512 MiB.

## Services, ports and volumes

| Service | Image | Container ports | Volumes |
| - | - | - | - |
| `db` | `mariadb:11` | none | `grimmory_db_data -&#62; /var/lib/mysql` |
| `grimmory` | `grimmory/grimmory:nightly-20260403-3a371f7` | 80 | `grimmory_data -&#62; /app/data`<br />`grimmory_books -&#62; /books` |

## Environment variables

| Service | Variable | Value |
| - | - | - |
| `db` | `MARIADB_DATABASE` | Preset in the template |
| `db` | `MARIADB_PASSWORD` | Generated at deploy |
| `db` | `MARIADB_ROOT_PASSWORD` | Generated at deploy |
| `db` | `MARIADB_USER` | Generated at deploy |
| `grimmory` | `DATABASE_PASSWORD` | Generated at deploy |
| `grimmory` | `DATABASE_URL` | Preset in the template |
| `grimmory` | `DATABASE_USERNAME` | Generated at deploy |

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

## Deploy Grimmory with Levelrail

In the dashboard, open **Apps**, choose **New app**, then **Browse templates**, and select Grimmory. Review the Compose body and deploy.

With the CLI:

```bash theme={"dark"}
levelrail-cli templates deploy grimmory --name my-grimmory
```

See the [service template catalog](/templates-and-registry) for how templates work, and [Getting started](/getting-started) if you have not installed Levelrail yet.

## More Media templates

* [Audiobookshelf](/self-host/audiobookshelf)
* [Bazarr](/self-host/bazarr)
* [Calibre-Web](/self-host/calibre-web)
* [Castopod](/self-host/castopod)
* [Emby](/self-host/emby)

All templates are listed in the [self-host gallery](/self-host).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.