Skip to content

Self-Host Grimmory and Access It with Localtonet

Install and verify a Grimmory ebook, comic, and audiobook library with Docker Compose, then access it remotely through a Localtonet HTTP tunnel.

Summary in your language
In this article 10 sections
Self-Hosting · Grimmory · Docker Compose · Localtonet · 2026

Build a private digital library, verify every local layer, and publish only the web interface you intend to share

Grimmory is a self-hosted library for ebooks, comics, documents, and audiobooks. This guide deploys Grimmory with Docker Compose and MariaDB, keeps the browser port bound to host loopback when Localtonet runs on the same machine, verifies the application locally, and then creates a Localtonet HTTP tunnel for controlled remote access. It also covers the Grimmory 3.5.0 security baseline, persistent storage, complete database-aware backups, restoration, upgrades, troubleshooting, and public-route verification.

🔒 Grimmory 3.5.0 or later required for public exposure 🌐 Public HTTPS access through a Localtonet HTTP tunnel ⚡ Docker Compose with persistent application and database state

How the Grimmory and Localtonet deployment works

Grimmory is designed for people who want to organize and read a digital collection on infrastructure they control. Its current project overview highlights shelves, filters, search, automatic metadata, rule-based collections, per-user permissions, OPDS support, Kobo and KOReader synchronization, and browser readers for EPUB, PDF, and comic content.

The Docker Compose deployment has two application layers. The Grimmory container serves the browser interface and application API on port 6060. MariaDB stores database-backed state. Grimmory connects to MariaDB over the private Compose network by using the database service name, so MariaDB does not need a host port or a public tunnel.

A third layer provides optional remote access. The Localtonet client establishes an outbound connection from your device to a Localtonet relay server. An HTTP tunnel then routes its assigned public HTTPS address to Grimmory's local HTTP listener. The books, database, users, metadata, and application files remain on your host.

Remote browser reaching a self-hosted Grimmory library through a Localtonet HTTP tunnel.
Grimmory remains on the private host while the Localtonet client carries public HTTP requests through an outbound tunnel connection.

This guide uses the safest simple topology: Grimmory publishes port 6060 only on 127.0.0.1, and the Localtonet client runs on the same host. The resulting Docker mapping is 127.0.0.1:6060:6060. Other LAN devices cannot connect to that host port directly, but the Localtonet client on the host can.

If the Localtonet client must run on another device, loopback-only publishing will not work because 127.0.0.1 is local to the Grimmory host. In that topology, bind the Docker port to a specific private LAN address and permit access only from the Localtonet client device through the host firewall or equivalent host security policy. Do not default to publishing Grimmory on every interface.

Router forwarding, Docker publishing, and host firewall policy are separate controls

Localtonet does not require an inbound router port-forwarding rule or a public IP address. That does not mean Docker or the operating system has no network policy. Docker still publishes the selected host port, and the host firewall still controls who can reach a LAN-bound listener. A loopback bind avoids direct LAN exposure when the Localtonet client runs on the Grimmory host.

📚 Self-hosted library Grimmory organizes ebooks, documents, comics, and audiobooks while keeping application and library state on storage you administer.
📖 Browser reading The project documents browser readers for EPUB, PDF, and comics, including reading-progress features.
👥 Multiple users Per-user permissions let an administrator separate ordinary reading access from administrative control.
🐳 Container separation Grimmory and MariaDB communicate over the Compose network, while only the Grimmory web port is published on the host.
🔒 Loopback-first exposure Same-host tunneling can use 127.0.0.1:6060, avoiding an unnecessary listener on every LAN-facing host interface.
🌐 Optional public route After local verification, a Localtonet HTTP tunnel can provide a public HTTPS address without inbound router port forwarding.
Component Purpose Exposure in this guide
Grimmory Library interface, readers, API, users, and organization Host loopback port 127.0.0.1:6060
MariaDB Database-backed Grimmory state Private Compose network only
Bind-mounted storage Application data, books, BookDrop, and database files Host filesystem only
Localtonet client Establishes the outbound relay connection Targets the reachable Grimmory host address and port
Localtonet HTTP tunnel Provides the public browser address Available only while the client is connected and the tunnel is running

Prerequisites and deployment decisions

You need a host with Docker Engine and Docker Compose support, enough storage for the collection and its backups, and permission to create persistent directories. Exact CPU and memory minimums are not established by the evidence used for this guide, so size the host for your collection, concurrent readers, indexing work, and any other services sharing the machine.

Confirm that Docker and the modern Compose command are available:

docker --version
docker compose version

Docker installation differs between operating systems and distributions. Use the supported installation process for your host rather than an unverified convenience script.

Create a dedicated deployment directory

The examples use ~/grimmory. Relative bind mounts in the Compose file will be created beneath this directory:

mkdir -p ~/grimmory
cd ~/grimmory
mkdir -p data books bookdrop mariadb/config backups

You may replace the relative storage paths with absolute paths if your media resides on a separate disk. The path on the left side of a volume mapping is the host path. The path on the right is what the container sees.

Determine appropriate user and group IDs

The example uses numeric IDs for container file access. On Linux, inspect the current account with:

id -u
id -g

Do not assume that 1000 is correct on every machine. Select IDs that can read the library and write to the application, BookDrop, and database directories. On Docker Desktop and other platforms with a different file-sharing model, follow the runtime's supported permission behavior.

Use a reviewed stable Grimmory image

Do not deploy the moving nightly development image for this internet-facing workflow. Avoid relying indefinitely on latest, since a later pull can change the running software without making that change obvious in the Compose file.

This guide pins the Grimmory application to grimmory/grimmory:3.5.0. Grimmory 3.5.0 is the minimum acceptable release for public exposure because it contains three documented security corrections. If a newer stable release is available when you deploy, review its release notes and replace the tag with that tested stable version.

Do not publicly expose Grimmory releases older than 3.5.0

Grimmory 3.5.0 fixes inappropriate access to sensitive server settings, insufficient library-access checks during uploads, and resource exhaustion from a crafted EPUB. Keep the tunnel stopped until the running container has been upgraded to version 3.5.0 or later and the version has been verified.

Choose the Localtonet client location now

The client location determines the Docker host-port bind:

Topology Recommended Docker mapping Required control
Localtonet client on the Grimmory host 127.0.0.1:6060:6060 Target 127.0.0.1:6060 from the client
Localtonet client on another LAN device A specific private host address, such as 192.168.1.50:6060:6060 Allow only the client device through the host or LAN policy
Unrestricted host-interface publishing 6060:6060 or 0.0.0.0:6060:6060 Not recommended as the default because it can expose Grimmory across additional interfaces

Prepare strong, separate secrets

Generate different values for the MariaDB root password and Grimmory database password. Do not reuse either value for the Grimmory administrator. Keep the .env file out of source control, screenshots, chat messages, and public support requests.

Install Grimmory with Docker Compose

Docker Compose architecture with a Grimmory container and persistent application and media storage.
The Compose deployment connects Grimmory to MariaDB and persistent host directories without publishing the database service.

The deployment sequence has three parts: create the environment configuration, create and validate the Compose definition, and start the services. The example uses the stable 3.5.0 security baseline and assumes the Localtonet client will run on the same host.

1

Create the environment file

Set the application and database IDs, time zone, database connection, unique passwords, API documentation preference, and storage mode.

2

Create and validate the Compose definition

Define the pinned Grimmory and MariaDB services, persistent mounts, health checks, private database networking, and loopback-only host publishing.

3

Start Grimmory and complete initial setup

Launch the containers, wait for both services to become healthy, open the local browser interface, and complete the administrator setup presented by the installed release.

Step 1: Create the .env file

Create ~/grimmory/.env with the following structure. Replace both password placeholders, review the numeric IDs, and set the correct time zone:

# Grimmory process
APP_USER_ID=1000
APP_GROUP_ID=1000
TZ=Etc/UTC

# Grimmory database connection
DATABASE_URL=jdbc:mariadb://mariadb:3306/grimmory
DB_USER=grimmory
DB_PASSWORD=REPLACE_WITH_A_STRONG_DATABASE_PASSWORD

# Application options
API_DOCS_ENABLED=false
DISK_TYPE=LOCAL

# MariaDB process and initialization
DB_USER_ID=1000
DB_GROUP_ID=1000
MYSQL_ROOT_PASSWORD=REPLACE_WITH_A_DIFFERENT_STRONG_ROOT_PASSWORD
MYSQL_DATABASE=grimmory

The database hostname is mariadb, not localhost. Inside the Compose network, the service name resolves to the database container. The same application database password must be supplied to Grimmory and to MariaDB's initialization variables.

Keep API_DOCS_ENABLED=false unless you intentionally need Grimmory's API documentation. When enabled, the documented paths include /api/docs and /api/openapi.json. A Localtonet HTTP tunnel carries the same application routes available through the target, so enabling additional interfaces should be a deliberate decision.

This tutorial uses DISK_TYPE=LOCAL. Do not switch storage modes without reviewing the current stable documentation for the exact Grimmory release you selected.

Step 2: Create docker-compose.yml

Create docker-compose.yml beside .env:

services:
  grimmory:
    image: grimmory/grimmory:3.5.0
    container_name: grimmory
    environment:
      - USER_ID=${APP_USER_ID}
      - GROUP_ID=${APP_GROUP_ID}
      - TZ=${TZ}
      - DATABASE_URL=${DATABASE_URL}
      - DATABASE_USERNAME=${DB_USER}
      - DATABASE_PASSWORD=${DB_PASSWORD}
      - API_DOCS_ENABLED=${API_DOCS_ENABLED}
      - DISK_TYPE=${DISK_TYPE}
    depends_on:
      mariadb:
        condition: service_healthy
    ports:
      - "127.0.0.1:6060:6060"
    volumes:
      - ./data:/app/data
      - ./books:/books
      - ./bookdrop:/bookdrop
    healthcheck:
      test: ["CMD-SHELL", "wget -q -O - http://localhost:6060/api/v1/healthcheck >/dev/null 2>&1 || exit 1"]
      interval: 60s
      retries: 5
      start_period: 60s
      timeout: 10s
    restart: unless-stopped

  mariadb:
    image: lscr.io/linuxserver/mariadb:11.4.5
    container_name: grimmory-mariadb
    environment:
      - PUID=${DB_USER_ID}
      - PGID=${DB_GROUP_ID}
      - TZ=${TZ}
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASSWORD}
    volumes:
      - ./mariadb/config:/config
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
      interval: 5s
      timeout: 5s
      retries: 10

The mapping 127.0.0.1:6060:6060 has three parts: the host address, host port, and container port. Docker accepts connections on port 6060 only through host loopback and forwards them to port 6060 in the Grimmory container.

MariaDB has no ports section. Grimmory reaches it through the private Compose network. Publishing port 3306 is unnecessary for this deployment and would create another service to secure.

Use a controlled LAN bind only when the Localtonet client runs elsewhere

If the client is on another trusted device, replace the loopback mapping with the Grimmory host's specific private address, such as 192.168.1.50:6060:6060. Then permit inbound port 6060 only from the Localtonet client device. Do not copy the example address literally, and do not add router port forwarding.

Ask Compose to render and validate the configuration:

docker compose config

Check the image tags, port binding, mount paths, and database hostname. Rendered output can contain expanded passwords, so do not publish it.

Step 3: Start the services

Pull the pinned images and launch the stack:

docker compose pull
docker compose up -d
docker compose ps

The first launch can take longer because Docker downloads images and MariaDB initializes its persistent directory. A running state alone does not prove readiness. Wait for MariaDB and Grimmory health checks before continuing.

If either service remains unhealthy, inspect its recent logs:

docker compose logs --tail=200 mariadb
docker compose logs --tail=200 grimmory

Verify Grimmory locally and confirm its version

Local browser verification of Grimmory before the remote tunnel is enabled.
Complete health, browser, storage, account, and version checks before starting a public tunnel.

Local verification creates a known-good baseline. Confirm container health, the configured image, the health route, the browser interface, administrator setup, persistent storage, and a representative library operation.

Check service state and the health endpoint

docker compose ps
curl -i http://127.0.0.1:6060/api/v1/healthcheck

Look for a successful HTTP result. The available evidence establishes the endpoint but not a fixed response body that should be embedded in automation, so do not depend on an invented JSON field.

Verify the configured and running image

Confirm that the running container was created from the expected stable image:

docker inspect --format '{{.Config.Image}}' grimmory

For this example, the result should identify grimmory/grimmory:3.5.0. If you intentionally selected a newer stable release, confirm that the reported tag matches it and is not older than 3.5.0.

Also inspect Grimmory's own version display if the installed release exposes it in its administration, system-information, or about interface. The container image reference verifies what Docker launched, while an application-reported version provides an additional post-upgrade check. If the two do not agree with your intended release, keep the Localtonet tunnel stopped and investigate before publishing the service.

Open Grimmory and create the administrator

On the Grimmory host, open:

http://127.0.0.1:6060

Complete the initial account workflow shown by the installed stable release. Use a strong administrator password that is different from both database passwords. Reserve this account for administration and create ordinary accounts for routine reading.

A loopback-bound service cannot be opened directly from another LAN computer. That is intentional in the same-host topology. If the server has no local browser, use an SSH port-forwarding method appropriate for your environment or temporarily follow the controlled LAN-binding topology. Do not broaden the bind without also applying host access controls.

Create a library under the mounted path

The mapping ./books:/books means Grimmory sees the library at /books. It does not see the host path as ~/grimmory/books. Create a library under the container-visible mount and test a small, non-sensitive item.

Confirm that Grimmory can discover or import the item, show its metadata, and open it in the appropriate reader or download workflow. This proves that the application can read the bind-mounted content rather than merely answer its health route.

Test BookDrop independently

The host's ./bookdrop directory is mounted as /bookdrop. Place a non-sensitive supported file in the host directory and confirm that Grimmory detects it and presents the expected import or review workflow.

BookDrop is an ingestion path, not a backup. Keep source files or maintain another tested copy of anything you cannot replace.

Do not use a tunnel to diagnose a broken local installation

Grimmory's root page, health endpoint, login, mounted storage, and version checks should succeed from the Localtonet client device before you create the tunnel. If the client runs on another LAN device, verify the LAN URL from that exact device first.

Access Grimmory through a Localtonet HTTP tunnel

Grimmory presents a browser-based HTTP service, so an HTTP tunnel is the appropriate Localtonet tunnel family for this workflow. Our client establishes an outbound connection to a relay server, and the running tunnel supplies a public HTTPS address for the local target.

This avoids an inbound router port-forwarding rule, a public IP address, and VPN setup. It does not override Docker bindings or the host firewall. If you selected the loopback topology, the Localtonet client must run directly on the Grimmory host. If you selected a controlled LAN bind, the client device must be permitted to reach that private address and port.

Current dashboard details are available in our HTTP tunnel documentation. Use server and region choices currently shown in your account rather than copying a hardcoded server code.

1

Install and run the Localtonet client

Install the client on the Grimmory host for the loopback topology, or on the approved LAN device for the controlled LAN topology. The client must remain connected for the tunnel to remain available.

2

Authenticate and select the device

Use the supported Localtonet client and dashboard flow with the device-specific authentication token. Keep the token secret and do not place it in the Grimmory Compose files.

3

Select an available relay server

Choose a server or region offered in the current dashboard. Available values can vary, so do not reuse an undocumented server code from another installation.

4

Create the HTTP tunnel

For a same-host client, target 127.0.0.1 on port 6060. For a separate LAN client, target the Grimmory host's controlled private address on port 6060.

5

Start the tunnel

Creating a tunnel does not start it. Review the device, relay server, process type, local address, and port, then use the Start button.

6

Test from outside the local network

Open the assigned public URL from a genuinely external connection. Confirm that the login page is Grimmory, authenticate with an authorized account, and open a permitted item.

Select the correct target for the client placement

Client placement Localtonet target Required pre-tunnel test
On the Grimmory host 127.0.0.1:6060 Open http://127.0.0.1:6060 on that host
On another trusted LAN device The Grimmory host's specific private address and port 6060 Open the LAN URL from the client device
Inside a separate container Depends on the configured container networking path Verify the target from inside that client environment before tunneling

Localtonet HTTP tunnels can use Random Sub Domain, Custom Sub Domain, or Custom Domain process types. Each serves the target through a public HTTPS address. Availability can vary by current product configuration or plan. Custom-domain DNS values should come from current Localtonet instructions rather than an unrelated deployment.

The public URL is not an authentication mechanism

Internet users can reach the Grimmory login surface while the tunnel is running. Use Grimmory authentication, strong passwords, least-privilege accounts, and a supported release. Do not rely on an unshared or hard-to-guess URL as the only protection.

Create and restore a database-consistent backup

A complete Grimmory backup needs more than the books directory. Protect the books, BookDrop files you still need, Grimmory's application data, deployment configuration, and a logical MariaDB dump. Do not treat a live copy of mariadb/config as a database-consistent backup.

The procedure below stops Grimmory so that application writes do not occur while the database dump and filesystem archive are created. MariaDB remains running long enough to produce the logical dump. This creates a straightforward recovery point across the application-managed files and database.

Create the backup

From ~/grimmory, create a timestamped backup directory:

cd ~/grimmory
BACKUP_DIR="./backups/grimmory-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_DIR"

Stop only the Grimmory service. Existing readers will be disconnected, so schedule this operation:

docker compose stop grimmory

Create a logical MariaDB dump with routines, events, and triggers included. The password is expanded inside the database container rather than copied into the host command line:

docker compose exec -T mariadb sh -c 'mariadb-dump \
  --user=root \
  --password="$MYSQL_ROOT_PASSWORD" \
  --single-transaction \
  --routines \
  --events \
  --triggers \
  --databases "$MYSQL_DATABASE"' \
  > "$BACKUP_DIR/mariadb.sql"

Confirm that the command succeeded and that the dump is not empty:

test -s "$BACKUP_DIR/mariadb.sql"
echo $?

An output of 0 means the file exists and is not empty. Next, archive the persistent application files and deployment configuration. The archive contains secrets from .env, so protect it accordingly:

tar -czf "$BACKUP_DIR/grimmory-files.tar.gz" \
  .env \
  docker-compose.yml \
  data \
  books \
  bookdrop

Record checksums for both artifacts:

sha256sum \
  "$BACKUP_DIR/mariadb.sql" \
  "$BACKUP_DIR/grimmory-files.tar.gz" \
  > "$BACKUP_DIR/SHA256SUMS"

Restart Grimmory and verify health:

docker compose start grimmory
docker compose ps
curl -i http://127.0.0.1:6060/api/v1/healthcheck

Copy the completed backup directory to storage separate from the Grimmory host. A backup on the same disk does not protect against disk failure, theft, or severe filesystem corruption.

Restore the backup

Practice restoration on an isolated host or recovery directory before you need it. Do not test by overwriting the only working deployment. Use the same reviewed Grimmory and MariaDB versions first, then perform upgrades separately after the restored system works.

Place mariadb.sql, grimmory-files.tar.gz, and SHA256SUMS in a protected recovery directory. Verify the artifacts:

cd /path/to/recovery-backup
sha256sum -c SHA256SUMS

Stop the existing deployment and preserve its current directories before replacing anything:

cd ~/grimmory
docker compose down

mv data data.before-restore
mv books books.before-restore
mv bookdrop bookdrop.before-restore

If any directory does not exist, omit its corresponding mv command. Copy the archive into the deployment directory and extract it:

tar -xzf /path/to/recovery-backup/grimmory-files.tar.gz

Start only MariaDB and wait until it is healthy:

docker compose up -d mariadb
docker compose ps

Reset the Grimmory database, then import the logical dump. This is destructive to the current grimmory database, which is why the procedure requires a protected backup and an isolated restoration test:

docker compose exec -T mariadb sh -c \
  'mariadb --user=root --password="$MYSQL_ROOT_PASSWORD" \
  -e "DROP DATABASE IF EXISTS grimmory;"'

docker compose exec -T mariadb sh -c \
  'mariadb --user=root --password="$MYSQL_ROOT_PASSWORD"' \
  < /path/to/recovery-backup/mariadb.sql

Start Grimmory after the import completes:

docker compose up -d grimmory
docker compose ps

Verify the restored system

A completed import is not enough. Perform the following checks before removing the pre-restore directories:

  1. Request http://127.0.0.1:6060/api/v1/healthcheck.
  2. Confirm the expected Grimmory image with docker inspect.
  3. Sign in with a restored account.
  4. Confirm that expected users, libraries, shelves, settings, and metadata exist.
  5. Open representative EPUB, PDF, comic, and audiobook items that belong to your collection.
  6. Confirm that Grimmory can read the restored /books mount.
  7. Test BookDrop with a disposable file.
  8. Start the Localtonet tunnel only after local restoration checks pass.
  9. Test the public route with an authorized non-administrator account.

Retain the previous directories until the restored deployment has passed these checks. Protect and rotate old backups according to your storage capacity and recovery requirements.

Operate and upgrade Grimmory safely

Inspect status and logs

docker compose ps
docker compose logs --tail=200
docker compose logs -f grimmory
docker compose logs -f mariadb

Press Ctrl+C to stop following logs. This does not stop the containers. Logs may expose filenames, paths, usernames, metadata, or configuration details, so redact them before sharing.

Stop, start, and recreate the services

docker compose stop
docker compose start

To recreate containers while retaining bind-mounted state:

docker compose down
docker compose up -d

Do not add destructive volume or filesystem cleanup options without understanding exactly what they remove.

Upgrade to a reviewed stable version

Read the target release notes, create and verify a complete backup, and change the Grimmory image tag in docker-compose.yml. Keep the Localtonet tunnel stopped during the upgrade and local verification.

docker compose pull
docker compose up -d
docker compose ps
docker inspect --format '{{.Config.Image}}' grimmory
curl -i http://127.0.0.1:6060/api/v1/healthcheck

Sign in, inspect the application-reported version where available, open representative content, and test BookDrop. Start the public tunnel only after the running version is confirmed as 3.5.0 or later and the local workflow succeeds.

Version pinning makes changes deliberate, but it also means upgrades do not happen automatically. Track stable releases and prioritize security corrections. Do not leave an internet-accessible deployment indefinitely on an old pinned tag.

Collect heap dumps only when needed

Grimmory documents an optional JVM setting for an out-of-memory heap dump. If a diagnostic process requires it, add the following environment entry to the Grimmory service:

- JDK_JAVA_OPTIONS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/data

The resulting .hprof file can be large and can contain sensitive application data. Restrict access, transfer it securely, and remove the option and file after the diagnostic work is complete.

Security checklist for an internet-accessible library

Self-hosting gives you control over storage and deployment, but it also makes you responsible for updates, authentication, authorization, network bindings, backups, and public exposure. Apply these controls before treating the public URL as a permanent service.

🛡️ Require Grimmory 3.5.0 or later Version 3.5.0 fixes sensitive-settings access, upload authorization, and crafted EPUB resource-exhaustion vulnerabilities.
🔌 Bind only where needed Use host loopback for a same-host Localtonet client. If LAN access is required, bind to a specific private address and restrict the source.
🔑 Separate credentials Use unique passwords for MariaDB root, the Grimmory database account, the Grimmory administrator, and ordinary users.
👤 Apply least privilege Reserve administrative access for management and give readers only the libraries and actions they require.
💾 Test complete recovery Protect media, application data, configuration, and a logical database dump. Verify checksums and practice restoration.
⏹️ Stop unused tunnels A tunnel is available only while its selected client is connected and the tunnel is running. Stop or delete access that is no longer needed.

Never expose MariaDB for this workflow. The browser needs Grimmory's HTTP service, not direct database access. Keep API_DOCS_ENABLED=false unless the interface is required and its exposure has been reviewed.

Protect the Localtonet device token because it identifies the client device that can run a tunnel. Do not store it in the Grimmory Compose stack, shell scripts committed to source control, screenshots, or support posts.

Treat library metadata and activity as potentially sensitive. Titles, filenames, annotations, reading history, account details, and uploaded documents can reveal personal information. Review users periodically and remove access that is no longer needed.

Remote technical access does not change copyright, licensing, or distribution obligations. Store and share only content you are entitled to use.

Troubleshooting Grimmory and Localtonet

Decision tree separating local Grimmory failures from Localtonet tunnel failures.
Find the first failing boundary before changing the database, container stack, host policy, or tunnel.

Compose reports a configuration error

Run docker compose config from ~/grimmory. Confirm the filenames, YAML indentation, environment-variable names, image tags, and volume mappings. Keep the rendered output private because it can contain passwords.

MariaDB is unhealthy or Grimmory does not start

docker compose logs --tail=200 mariadb
docker compose logs --tail=200 grimmory

Confirm that the application password matches in both services, the database name matches the JDBC URL, and the hostname remains mariadb. Check ownership and permissions on mariadb/config.

Changing .env after MariaDB has initialized does not necessarily rewrite credentials already stored in the persistent database. Do not delete the database directory as an improvised fix. Use a database-aware recovery procedure or restore a verified backup.

The host cannot open 127.0.0.1:6060

Check docker compose ps, inspect Grimmory logs, and confirm that the mapping is 127.0.0.1:6060:6060. If another process already owns port 6060, Docker should report a bind failure.

Remember that a loopback-bound port is intentionally unavailable to other LAN devices. Do not test it from another computer by entering that computer's own localhost.

A separate Localtonet client cannot reach Grimmory

A client on another device cannot reach a loopback-only bind on the Grimmory host. Change the Compose mapping to the host's specific private address, recreate the Grimmory service, and permit port 6060 only from the client device. Test the private URL from that device before modifying the tunnel.

Grimmory cannot see the books

Confirm that ./books:/books is present and that the application library uses a path under /books. Check the selected application user and group IDs and the host filesystem permissions.

BookDrop files are not detected

Confirm that the file is copied into the host's ./bookdrop directory, which appears as /bookdrop in Grimmory. Use a supported, non-sensitive test file and inspect Grimmory logs for permission or parsing errors.

Local access works but the public URL fails

  1. Open the local Grimmory URL from the host.
  2. If the Localtonet client is elsewhere, open the LAN URL from that device.
  3. Confirm that the Localtonet client is connected.
  4. Confirm that the intended device and an available relay server are selected.
  5. Review the tunnel target address and port 6060.
  6. Confirm that the tunnel was started rather than merely created.
  7. Test the assigned address from an external connection.

If the first check fails, troubleshoot Grimmory. If same-host access works but the LAN check fails, troubleshoot the Docker bind and host policy. If the client can reach Grimmory but the public URL fails, focus on client connectivity and tunnel configuration.

The public URL opens the wrong service

Recheck the local address and port. On a separate client device, 127.0.0.1 points back to that client, not to the Grimmory host. Use the controlled private address for the Grimmory server.

An upgrade succeeded but the version is still old

Inspect the running image:

docker inspect --format '{{.Config.Image}}' grimmory
docker compose images

Confirm that the Compose file contains the intended stable tag, pull it, and recreate the service. Then check Grimmory's own version display where available. Keep the public tunnel stopped until the discrepancy is resolved.

A restored deployment starts but data is missing

Confirm that the logical SQL import completed without errors and that the correct data, books, and bookdrop directories were extracted. Verify mount paths with docker compose config. Do not delete the pre-restore directories until users, libraries, settings, and representative files have been checked.

Frequently asked questions

What is the local Grimmory address in this guide?

The same-host topology publishes Grimmory at http://127.0.0.1:6060. Its health endpoint is http://127.0.0.1:6060/api/v1/healthcheck. Because the port is bound to loopback, it is not directly reachable from another LAN device.

Why does this guide require Grimmory 3.5.0 or later?

Version 3.5.0 fixes three documented security issues involving access to sensitive settings, authorization for uploads into libraries, and resource exhaustion from a crafted EPUB. Do not expose a pre-3.5.0 installation to the internet.

How do I verify the running Grimmory version?

Run docker inspect --format '{{.Config.Image}}' grimmory and confirm the expected stable image tag. Also check Grimmory's application-reported version in its administration, system-information, or about interface when the installed release provides one.

Why not use 6060:6060 in the Compose file?

A mapping without a host address normally publishes the port on all host interfaces. That can make Grimmory reachable over the LAN or other attached networks independently of Localtonet. Binding 127.0.0.1:6060:6060 limits direct access to the host when the Localtonet client runs there.

Do I need router port forwarding?

No. The Localtonet client establishes an outbound connection to our relay service, so this workflow does not require inbound router port forwarding or a public IP address. Docker host-port publishing and host firewall rules remain separate local controls.

Can the Localtonet client run on another computer?

Yes, but Grimmory must be reachable from that device. Bind Docker to the Grimmory host's specific private address, allow only the client device through the host or LAN policy, and target that address instead of loopback. Do not add router forwarding.

Does Localtonet store my Grimmory books or database?

No. Grimmory, MariaDB, and the mounted directories remain on your host. The HTTP tunnel provides a public route to the running local web service and does not replace your storage or backup system.

Is copying the books directory a complete backup?

No. A complete recovery point includes the books, Grimmory application data, required BookDrop content, deployment configuration, and a database-consistent MariaDB dump. Verify checksums and test restoration on an isolated deployment.

Can I use a custom domain for Grimmory?

Localtonet HTTP tunnels support Random Sub Domain, Custom Sub Domain, and Custom Domain process types. Check current dashboard availability and current DNS instructions before configuring a custom domain.

Publish your verified Grimmory library with Localtonet

Upgrade Grimmory to version 3.5.0 or later, verify the application and backups locally, run the Localtonet client on the appropriate device, and create an HTTP tunnel to the controlled Grimmory listener.

Get Started Free →

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Reviewed and updated for accuracy and completeness.

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

Support