Visit project on GitHub
Set theme to dark

Get Started

Host Minipub on your own server

  1. Ensure the latest deno runtime is installed
  2. Install the minipub cli
deno install --name minipub \
  --allow-net --allow-env \
  --allow-read --allow-write \
  https://raw.githubusercontent.com/skymethod/minipub/v0.1.7/src/cli.ts
  1. Generate an admin user rsa keypair, save to two separate files: admin.server.public.pem and admin.server.private.pem
minipub generate-keypair
  1. Configure public internet traffic for your firewall/load-balancer to forward https://comments.yourapp.com to this machine, port 2022
  2. Start the server
minipub server \
  --db path/to/storage.db \
  --origin https://comments.yourapp.com \
  --admin-ip 1.2.3.4 \
  --admin-public-key-pem /path/to/admin.server.public.pem 

Host Minipub inside a Cloudflare Worker

  1. Ensure the latest deno runtime is installed
  2. Ensure you have the latest version of Denoflare installed
  3. Define your script in the Denoflare configuration file (e.g. ~/.denoflare.jsonc)
{
  // This file supports comments!
  "$schema": "https://raw.githubusercontent.com/skymethod/denoflare/2ddef4cce293d56ab7137eacaf7d79db055b849b/common/config.schema.json",

  "scripts": {
    "comments-yourapp-prod": {
      "path": "https://raw.githubusercontent.com/skymethod/minipub/v0.1.7/src/worker.ts",
      "bindings": {
        "origin" : { "value": "https://comments.yourapp.com" },
        "backendNamespace": { "doNamespace": "comments-yourapp-prod-backend:BackendDO" },
        "backendName": { "value": "backend1" },
        "adminIp": { "value": "1.2.3.4" },
        "adminPublicKeyPem": { "value": "<text contents from your admin.server.public.pem escaped as a json string>" },
      }
    }
  }
}
  1. In the Cloudflare Dashboard:
  1. Upload to your Cloudflare account
denoflare push comments-yourapp-prod
  1. In the Cloudflare Dashboard:
  • Set up an A record for your zone yourapp.com named comments pointing to 192.0.2.1
  • In the yourapp.com zone, select Workers -> Add Route, set Route to comments.yourapp.com/*, and Service to comments-yourapp-prod

Administrate your Minipub server

In either hosting option, you will now have a comments service running at https://comments.yourapp.com

You can define users, create comments, federate activities using the Minipub Admin RPC API, or the minipub cli which wraps it.

You can use the cli help (e.g. minipub --help or minipub create-note --help), or take a look at the Admin RPC API docs for details of how to orchestrate your Minipub service from code.

Ideas and Feedback

Start a discussion over in the project's Github repo

Funding this project

This is an independent open-source project by John Spurlock with no financial backing, just an interest in helping open podcasting comments get off the ground.

If you support the goals of this project and want to help fund its ongoing development, you can send a donation our way using the button below, thanks!

Donate →