Hammer: An Offline-First Open-Source Novel Writing App with Docker Self-Hosted Sync

Hammer: an offline-first open-source novel writing app with Docker-based self-hosted sync.
Hammer is an open-source novel writing application built on an offline-first philosophy, storing all content as plain Markdown and TOML files. It supports Windows, macOS, Linux, Android, and iOS. With its official multi-architecture Docker image, users can deploy a self-hosted sync server in minutes, enabling cross-device sync and web-based publishing for beta readers — all while keeping data under their own control.
For serious fiction writers, choosing the right tool often presents a dilemma: cloud-based apps offer convenient syncing but sacrifice privacy and control, while local software is secure but makes cross-device collaboration difficult. The open-source project Hammer attempts to find a balance between the two — built around an "offline-first" core philosophy while offering an optional self-hosted sync server. Recently, the developer released an official multi-architecture Docker image, reducing what was once a tedious deployment process to just five minutes.

What Is Hammer: An Offline-First Novel Writing App
Hammer is an open-source application specifically designed for novel writing and worldbuilding, continuously developed by Darkrock Studios since 2022. It covers nearly all major platforms: Windows, macOS, Linux, Android, and iOS.
Its most distinctive feature is that it's fully offline by default — no account, no registration, and no internet connection required to start writing. This design philosophy is particularly rare in today's SaaS-saturated writing tool market.
"Offline-First" is a software architecture philosophy that treats the local device as the primary location for data storage and processing. Unlike cloud-first architectures, offline-first applications provide full core functionality even in completely disconnected environments. This philosophy stems from practical considerations about network reliability — airplanes, remote areas, and spotty café WiFi shouldn't be obstacles to creativity. Technically, offline-first implementations typically rely on conflict resolution algorithms (such as CRDTs — Conflict-free Replicated Data Types) to handle data merging after multi-device offline edits. In recent years, as users increasingly demand data privacy and application reliability, tools like Obsidian and Logseq have adopted similar local-first strategies.
Data Format Openness: Breaking Free from Tool Lock-In
Hammer's true technical highlight lies in its respect for data sovereignty. Your entire project is simply an ordinary directory on disk:
- Each scene corresponds to a Markdown file
- Each encyclopedia entry corresponds to a TOML file
TOML (Tom's Obvious Minimal Language) is a configuration file format designed in 2013 by GitHub co-founder Tom Preston-Werner. Its design goal is to be semantically clear and easy for humans to read, while mapping unambiguously to hash table data structures. Compared to JSON, TOML supports comments and doesn't require extensive curly braces; compared to YAML, it avoids the parsing ambiguities caused by indentation sensitivity. TOML is widely used in the Rust ecosystem (Cargo.toml), Python projects (pyproject.toml), and other domains. Hammer's choice of TOML for encyclopedia entries means that each entry's metadata (such as categories, tags, and relationships) can be precisely parsed by programs while also being directly editable with any text editor.
This means your creative content is grep-searchable, diff-comparable, and rsync-syncable — even without the Hammer application itself, these files remain fully usable and portable plain text. For creators concerned about vendor lock-in, this transparent data structure provides a strong sense of security. By contrast, many commercial writing applications use proprietary binary formats, putting user data at risk if the service shuts down.
Core Capabilities of the Self-Hosted Sync Server
While Hammer itself works entirely offline, the optional self-hosted sync server adds two key capabilities:
- Multi-device sync: Synchronize projects across devices on a server you control, with data never passing through third-party clouds.
- Web publishing view: Publish a chapter to a URL so editors or beta readers can read and annotate directly in their browser without installing any software.
This design elegantly balances the privacy of personal creation with the convenience of collaboration. Authors can remain fully offline during the writing phase and selectively expose specific content only when external feedback is needed.
Docker Image Deployment: Set Up a Sync Server in Five Minutes
Previously, self-hosting a Hammer sync server required downloading a release zip package and manually configuring systemd service units, which presented a high barrier for non-technical users. Now, official images have been published to GHCR (GitHub Container Registry):
GHCR is a container image hosting service launched by GitHub in 2020. Similar to Docker Hub but deeply integrated into the GitHub ecosystem, it allows developers to associate Docker images with source code repositories, automatically build and publish images using GitHub Actions, and inherit the repository's permission model. Compared to Docker Hub's free tier limitations (such as anonymous pull rate limits and automatic deletion of inactive images), GHCR offers free unlimited bandwidth for public images and doesn't automatically clean them up. For open-source projects, GHCR provides a complete auditable chain from source code to image — users can trace a specific image tag back to the exact code commit.
curl -O https://raw.githubusercontent.com/Darkrock-Studios/hammer-editor/develop/docker/docker-compose.yml
docker compose up -d
That's it. It pulls ghcr.io/darkrock-studios/hammer-editor/server:latest, stores all persistent data in a named volume, and serves plain HTTP on 127.0.0.1:8080, ready to sit behind your existing reverse proxy.
Named volumes in Docker are a persistent storage mechanism managed by the Docker engine. Unlike bind mounts, Docker manages the storage location itself (typically under /var/lib/docker/volumes/), offering better cross-platform compatibility and clearer lifecycle management. Named volumes persist after container deletion and support backup, migration, and cleanup through docker volume commands. For database-type applications, using named volumes is a recommended best practice because it avoids file permission mapping issues and facilitates declarative management with Docker Compose.
Deployment Highlights
The Docker image is quite thoughtfully engineered:
- No external database required: The image includes an in-process PostgreSQL, making the default deployment truly single-container. If you want to connect to an existing Postgres instance, simply set the
[storage]typeto"remote"— it will automatically migrate the schema on first connection. The compose file already includes a commented-out sidecar configuration.
Traditional Docker best practices recommend "one process per container," but Hammer's choice to embed PostgreSQL in a single container is a pragmatic compromise. This "embedded database" pattern dramatically reduces deployment complexity — users don't need to understand inter-container networking or database connection strings. Similar approaches have precedent in Gitea (which can embed SQLite) and Mastodon's single-machine deployment options. The trade-off is limited horizontal scalability, but for personal or small-team writing sync scenarios, single-machine performance is more than sufficient. Hammer also retains the option to connect to an external PostgreSQL, leaving room for future scaling.
- Multi-architecture support: Provides both
linux/amd64andlinux/arm64, so Raspberry Pi or ARM VPS deployments work seamlessly. - Secure defaults: Runs as a non-root user (uid/gid 1000), with a built-in HEALTHCHECK in the image.
- Dead-simple backups: All persistent data — database, cache, configuration, keyring — lives under
/data. Backing up this single volume equals backing up the entire server.
Security and Privacy Protection
Hammer's stance on privacy is unambiguous: neither the client nor the server contains any tracking or analytics code. If you do need access statistics, you can optionally self-host Umami, but it's disabled by default and requires manual configuration.
Umami is an open-source web analytics tool positioned as a privacy-friendly alternative to Google Analytics. It doesn't use cookies, doesn't track cross-site behavior, and doesn't collect personally identifiable information, fully complying with privacy regulations like GDPR and CCPA. Data is stored on the user's own server, the interface is clean, and resource consumption is minimal. Umami is licensed under MIT and supports MySQL and PostgreSQL as backend storage. Hammer's recommendation of Umami over other analytics solutions reflects its consistency in privacy philosophy — even when analytics are needed, data stays out of third-party hands.
On the deployment security front, the server uses an invite system by default — the whitelist is enabled out of the box, and the first account created automatically becomes the administrator. This means that after setting up your instance, you won't inadvertently expose a registration form to the entire internet.
For encryption needs, Hammer also offers optional encryption at rest, complete with a keyring and offline key rotation mechanism. Encryption at rest means data is stored in encrypted form on the storage medium — even if a hard drive is physically stolen or a server is accessed without authorization, attackers cannot read plaintext content. Key rotation is the security practice of periodically changing encryption keys, so that even if a key is compromised, the impact is limited to data within that key's validity period. Hammer's "offline key rotation" means the key change operation can be performed in a completely disconnected environment, preventing key exposure during network transmission. This design is particularly important for authors handling sensitive creative content, such as unpublished manuscripts.
A Note on TLS Certificate Configuration
The developer candidly points out a detail that "will bite you after 90 days": if you choose to let Hammer terminate TLS on port 443 itself (rather than using a reverse proxy like Nginx, Caddy, or Traefik), be aware that it only reads certificates at startup. This means that after certificate renewal, you need to configure a deploy_hook to restart the container, or you'll encounter certificate expiration issues. The official documentation covers this point, but it remains a common pitfall for newcomers. The recommended approach is still to use a reverse proxy in front to handle TLS.
The "90 days" mentioned here is directly related to Let's Encrypt's certificate validity period. Let's Encrypt is currently the most widely used free TLS certificate authority, issuing certificates with a 90-day validity period (rather than the traditional CA's one year or longer), intended to encourage automated renewal and shorten the risk window after key compromise. Most modern reverse proxies (such as Caddy) have built-in automatic certificate issuance and renewal functionality requiring no manual intervention, which is another reason Hammer recommends using a reverse proxy.
Open-Source License and Community Ecosystem
Commendably, Hammer is open-sourced under the MIT License, one of the most permissive open-source licenses available. The MIT License only requires preserving copyright and license notices, allowing anyone to freely use, modify, and distribute the code, including for commercial purposes, without requiring derivative works to be open-sourced. Compared to GPL's copyleft requirements or Apache 2.0's patent clauses, MIT's simplicity makes it the most popular open-source license — according to GitHub statistics, over 25% of open-source projects use the MIT license.
The developer himself maintains a refreshing level of honesty — describing himself as an "old-school VPS guy" who is relatively new to Docker, and actively soliciting improvement suggestions from the community. This kind of openness tends to attract more contributors to help refine the project.
Additionally, the team runs a demo instance at hammer.ink where users can experience its public-facing features.
Conclusion: A Mature Choice for Local-First Writing Tools
Hammer represents an increasingly popular software philosophy: local-first + optional self-hosting. This movement traces back to the 2019 paper "Local-First Software: You Own Your Data, in spite of the Cloud" published by Ink & Switch Labs, which proposed seven ideal principles: works without a network, fast responsiveness, cross-device sync, collaboration support, long-term availability, privacy and security, and full user control over data. Since then, this philosophy has spawned a range of tools and technologies, including CRDTs (such as Yjs and Automerge), peer-to-peer sync protocols (such as Hypercore), and representative products including Obsidian, Anytype, and Linear.
Hammer preserves the openness and portability of plain text files while dramatically lowering the barrier to self-hosted sync through Docker. For writers who value data sovereignty and don't want to be locked into cloud services — especially creators who also possess some technical ability — Hammer provides a mature option that combines privacy, control, and collaborative convenience. With the landing of the official Docker image, it's one step closer to being accessible to everyone.
Key Takeaways
Related articles

ml-pipes: Building Software Engineering Best Practices Into ML Inference Pipelines
ml-pipes is an open-source framework that builds pre-run validation, pipeline inspection, tracing, and benchmarking into ML inference pipelines, bridging the MLOps engineering gap.

Aquifer Open Source: A Traffic Smoothing Solution for Peak Shaving Bursty GPU Inference Workloads
Aquifer is an open-source traffic smoothing runtime that uses durable queue buffering and backend backpressure to solve burst traffic challenges in GPU inference services, enabling peak shaving and cost reduction.

AI Mass-Producing Sales Videos: The Horse Racing Revolution in Content Commerce
Breaking down an explosive overseas AI content commerce strategy: batch-generating sales videos via AI workflows and horse-race testing them on TikTok and Instagram with CLI + Codex automation.