Get Started
Host Minipub on your own server
- Ensure the latest deno runtime is installed
- 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
- Generate an admin user rsa keypair, save to two separate files:
admin.server.public.pem
andadmin.server.private.pem
minipub generate-keypair
- Configure public internet traffic for your firewall/load-balancer to forward
https://comments.yourapp.com
to this machine, port 2022 - 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
- Ensure the latest deno runtime is installed
- Ensure you have the latest version of Denoflare installed
- 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>" },
}
}
}
}
- In the Cloudflare Dashboard:
- Ensure you have the Workers Paid plan enabled on your account (5.00 USD/month)
- Ensure you have Durable Objects enabled on your account, used as the backend data storage
- Upload to your Cloudflare account
denoflare push comments-yourapp-prod
- In the Cloudflare Dashboard:
- Set up an A record for your zone
yourapp.com
namedcomments
pointing to192.0.2.1
- In the
yourapp.com
zone, select Workers -> Add Route, set Route tocomments.yourapp.com/*
, and Service tocomments-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!