Skip to content
In progress. These plugins are built and tested, and run from a checkout of the repository. They aren't on npm yet and haven't been run on a live site from this repository. See what works today.

Run your own publishing server

Otso’s publishing plugins give a website the IndieWeb endpoints it needs, without a hosted service: you sign in to apps with your own address, post from any Micropub app, and your posts reach other sites and networks with a link home. Each piece is a plugin, so you use the ones you want.

You want toPlugin
Post from the Otso app or any Micropub app, with photos@otso/plugin-micropub
Keep posts as Markdown files in a GitHub repository or a folder@otso/plugin-store-github, @otso/plugin-store-files, with @otso/plugin-preset-markdown
Sign in to apps with your site, using a passkey@otso/plugin-indieauth
Send Webmentions to pages you link or reply to@otso/plugin-delivery
Copy posts to Mastodon and Bluesky with a link back@otso/plugin-syndicate-mastodon, @otso/plugin-syndicate-bluesky
Show replies, likes and reposts on your posts@otso/plugin-mentions
Tell feed readers the moment you post@otso/plugin-websub
Bring what you post on Mastodon and Bluesky back to your site@otso/plugin-import-social
Take email signups for a Buttondown newsletter from your own pages@otso/plugin-newsletter-buttondown
Let an AI client you approve write and edit posts (MCP)@otso/plugin-mcp
Give your own apps an assistant that answers with a model you choose and can write and edit posts@otso/plugin-chat

Each package has a README in packages/ with its settings.

The plugins store posts and serve endpoints. Your site generator turns the stored Markdown into pages. Three things on those pages make the rest work:

  • Links in your home page’s <head> so apps can find the endpoints:

    <link rel="indieauth-metadata" href="/.well-known/oauth-authorization-server">
    <link rel="authorization_endpoint" href="/auth">
    <link rel="token_endpoint" href="/auth/token">
    <link rel="micropub" href="/micropub">
  • Each post’s page says which revision it shows, so nothing is sent before the post is really live. The delivery plugin’s README has the one-line <meta> tag, or set publicCheck: 'reachable' to skip this.

  • To show replies and likes, a page asks /api/webmentions?target=<its path> and draws what comes back.

import { cloudflarePlatform, cloudflareWorker } from '@otso/plugin-platform-cloudflare';
import markdownPreset from '@otso/plugin-preset-markdown';
import githubStore from '@otso/plugin-store-github';
import indieauth from '@otso/plugin-indieauth';
import micropub from '@otso/plugin-micropub';
import delivery from '@otso/plugin-delivery';
import mastodon from '@otso/plugin-syndicate-mastodon';
import mentions from '@otso/plugin-mentions';
export default cloudflareWorker(env => ({
me: env.SITE, // https://example.com/
timeZone: env.TIME_ZONE, // Europe/Helsinki
platform: cloudflarePlatform({ bucket: env.OTSO, images: env.IMAGES, mode: env.OTSO_MODE }),
plugins: [
markdownPreset(),
githubStore({ owner: env.GITHUB_OWNER, repo: env.GITHUB_REPO, branch: 'main', token: env.GITHUB_TOKEN }),
indieauth({ name: env.OWNER_NAME, setupToken: env.AUTH_SETUP_TOKEN, clientIpHeader: 'cf-connecting-ip' }),
micropub(),
delivery(),
mastodon({ instance: env.MASTODON_INSTANCE }),
mentions({ mastodonProfile: env.MASTODON_PROFILE }),
],
}), { fallback: (request, env) => env.ASSETS.fetch(request) });

Bind one R2 bucket as OTSO, add a cron trigger every five minutes, and keep tokens as Worker secrets. Set OTSO_MODE to production only on the production Worker: without it, nothing is posted or sent, so preview deployments are safe.

import { createKit } from '@otso/core';
import { nodePlatform } from '@otso/core/node';
import markdownPreset from '@otso/plugin-preset-markdown';
import filesStore from '@otso/plugin-store-files';
import indieauth from '@otso/plugin-indieauth';
import micropub from '@otso/plugin-micropub';
const kit = await createKit({
me: 'https://example.com/',
timeZone: 'Europe/Helsinki',
platform: nodePlatform({ dataDir: '/var/lib/otso' }),
plugins: [markdownPreset(), filesStore({ dir: '/srv/site/content' }), indieauth({ name: 'Your Name' }), micropub()],
});
// In your HTTP server: plugins answer their own paths, and the rest is yours.
const response = (await kit.fetch(request)) ?? serveYourSite(request);
// From cron, every few minutes:
await kit.scheduled();
  1. Set setupToken to a long random value and deploy.
  2. Open /account, enter the token and add a passkey. Add a second one from another device.
  3. Remove setupToken. From then on the passkey is the only way in.
  4. In the Otso app, or any Micropub app, enter your site’s address. Your site asks you to allow it.
  5. To post to Mastodon or Bluesky, press Connect beside it on /account and approve on the other side. An access token (Mastodon) or app password (Bluesky) in settings works too, and is the fallback if you set both.
  • Platforms other than Node and Cloudflare Workers.
  • Importing from a Mastodon or Bluesky account export.
  • Publishing from the command line: otso publish is still a placeholder.
  • A chat page or chat in the apps. The chat plugin is an endpoint to call; it keeps no conversations.

How the pieces fit is in Plugin Architecture.