Back to services

Hatsu

Bridge that interacts with Fediverse on behalf of your static site.

View alternatives to Hatsu
Suggest edit
Open source
Self-hostable
AGPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

Hatsu is a self-hosted bridge service that connects your static website to the Fediverse on your behalf. You don't need to run your own instance of Mastodon or anything similar: your blog or static site can become a searchable, followable ActivityPub account. The official documentation states that the project is still a Work-In-Progress.

Key Features

  • Searchable account: when Fediverse users search for your site's account (e.g. @[email protected]), they are redirected to the corresponding user on the Hatsu instance.
  • Searchable posts: when users search for the URL of one of your posts (e.g. https://example.com/hello-world), they are redirected to the corresponding post on the Hatsu instance.
  • Automatic publishing: Hatsu accepts follow requests and automatically pushes new posts from your site to followers' timelines.
  • Backfeed: receives replies from Fediverse users and displays them on your static site. It can be used with KKna or the @oom/mastodon-comments component. Webmention-based backfeed is not implemented yet.
  • Fully automated: set it up once and you don't need to do anything manually afterward.

How It Works

  1. Feed source: your site needs to provide a valid JSON Feed, Atom or RSS feed that can be auto-discovered on the homepage via <link rel="alternate">. When several formats are available, the priority is JSON > Atom > RSS. There is also an experimental Hatsu JSON Feed extension (the _hatsu field) that lets you customize aliases, banner images and more.
  2. Redirection: you need to redirect .well-known requests (webfinger, nodeinfo, host-meta) and application/activity+json requests to the Hatsu instance. The available methods are:
    • Static files plus an HTML tag (AS2 Alternate), suitable for most hosting platforms and static site generators
    • A _redirects file (Netlify, Cloudflare Pages)
    • Platform-specific configuration (netlify.toml, vercel.json)
    • Aoba plugin or middleware (Lume, Hono)
    • FEP-612d DNS TXT record

Differences from Bridgy Fed

  • Hatsu uses feeds as its data source and doesn't rely on HTML pages marked up with microformats2.
  • No need to send Webmention notifications when creating or updating posts; everything is done automatically.
  • Only ActivityPub is supported, not other protocols such as Nostr or the AT Protocol (Bluesky).
  • It must be self-hosted. There is currently no public instance, so you either deploy it yourself or ask someone who runs a Hatsu instance to create an account for you.

Installation and Deployment

  • Docker: the image is published on GitHub Container Registry (ghcr.io/importantimport/hatsu) with three tags: latest (stable), beta and nightly. The repository includes a docker compose example.
  • Binary: stable and beta builds can be downloaded from GitHub Releases.
  • Nix/NixOS: can be installed via Nixpkgs (requires nixos-24.11 or unstable), NUR and Flakes. macOS is not supported.
  • Arch Linux: can be installed from the AUR.

Example:

docker run -d --name hatsu -p 3939:3939 \
  -v /opt/hatsu/hatsu.sqlite3:/app/hatsu.sqlite3 \
  -e HATSU_DATABASE_URL=sqlite://hatsu.sqlite3 \
  -e HATSU_DOMAIN=hatsu.example.com \
  -e HATSU_LISTEN_HOST=0.0.0.0 \
  -e HATSU_PRIMARY_ACCOUNT=blog.example.com \
  -e HATSU_ACCESS_TOKEN=<random UUID> \
  ghcr.io/importantimport/hatsu:latest

After deployment, you can create an account with just account create example.com or by calling the Admin API. The Admin API can also block or unblock instances and users.

Technical Requirements

  • Written in Rust, it listens on port 3939 by default. To connect to the Fediverse, you also need to set up a reverse proxy and a dedicated domain.
  • Supports SQLite and PostgreSQL databases.
  • Configured through environment variables or a .env file. The main variables include HATSU_DOMAIN, HATSU_PRIMARY_ACCOUNT and HATSU_ACCESS_TOKEN.

Protocols and Compatibility

  • Supports ActivityPub (server-to-server), HTTP Signatures, WebFinger, NodeInfo and Web Host Metadata.
  • Supports FEP-67ff, FEP-f1d5, FEP-fffd, FEP-4adb and FEP-2c59.
  • Activities sent: Accept(Follow), Create(Note) and Update(Note). Activities received: Follow, Create, Like, Announce and their corresponding undo operations.
  • Mainly aimed at microblogging platforms. According to the compatibility table, posting and following are confirmed to work on Mastodon, and posting is also confirmed on Pleroma. Shared inbox is not supported.