| title | hachyderm.general Ansible Collection v1.0.0 Released |
|---|---|
| linkTitle | hachyderm.general Ansible Released |
| date | 2026-01-31 |
| author | Hachyderm Team ([@hachyderm@hachyderm.io](https://hachyderm.io/@hachyderm)) |
Hachyderm, as part of its committment to contributing back to the open source community, is open sourcing the Ansible code is uses to run Hachyderm's infrastructure, starting with a series of PostgreSQL related roles.
One of the biggest challenges facing larger Mastodon instances is proper caretaking of its database(s). Databases as a Service (DBaaS) can be prohibitively expensive for many organizations, pushing these teams toward self-hosting. Self-hosting successfully, especially at scale, requires getting many small details right or risking poor performance -- or worse -- lost data.
Hachyderm has been through it all: we've gone from a tiny server in Kris Nova's basement -- hi, alice! -- to one of the largest Fediverse instances today. Along the way, we've broken postgres in countless ways, lost data, and restored data. We've learned a lot, and we've baked in what we've learned about reliably and safely running one of the Fediverse's larger Mastodon sites into these roles.
The roles in this collection install and configure PostgreSQL in both standalone and multi-node layouts (primary + replicas). They also configure regular backups, a key component of the Mastodon Server Covenant.
Included in this collection are roles to configure:
- postgresql
- pgbackrest for backup management and pgbackrest_exporter for metrics
- pgbouncer for connection management and pgbouncer_exporter for metrics
Hachyderm has already replaced its internal use of these roles with the publicly published collection. Furthermore, the collection comes with a battery of molecule tests to validate the collection's functionality and is part of Hachyderm's continous integration release pipeline.
In the future, we plan to release additional Ansible roles, including:
- Basic VM setup and hardening
- Mastodon on VM installation and configuration (web, streaming, sidekiq)
- Hachyderm's edge CDN reference architecture
You can read more here about Hachyderm and the Nivenly Foundation.