~vikanezrimaya/kittybox

A personal blogging solution using the IndieWeb internet protocols and standards
Prototype sanitizer for SQL
kittybox-html: cargo fmt
Mask sensitive headers

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~vikanezrimaya/kittybox
read/write
git@git.sr.ht:~vikanezrimaya/kittybox

You can also use your local clone with git send-email.

#Kittybox

Kittybox is an IndieWeb-centric blogging solution designed for easy self-hosting in any environment from a single-board computer in your closet to a PaaS platform or a public cloud.

#Implementation status

Kittybox is currently is not fully suitable for production, however, there is a deployment at https://fireburn.ru/ used as my personal blog.

Some things aren't currently fully implemented. The non-exhaustive list is:

  • Logging in to the website via IndieAuth (e.g. for private posts)
  • Displaying received Webmentions (beyond counters)
  • Syndication with social network silos
  • UI for token management and revocation
  • Changing settings beyond what was filled in at the onboarding

Some planned features also include:

  • An interactive (and customizable) widget on the main page
  • Custom CSS
  • Custom syndication locations
  • A built-in fully featured admin interface

#Building

#Using Nix

If you happen to have Nix installed:

$ nix build

You can optionally use the binary cache provided by nix-community and backed by their Hydra.

#Using Cargo

First, make sure you have stable Rust installed. Kittybox doesn't use any C libraries for building, preferring to use their Rust equivalents for memory safety and ease of building.

$ cd ./kittybox-rs/
$ cargo build

For tests, you will need development files for OpenSSL and zlib installed. Consult with your distribution's manual on how to install them. These are only used for building httpmock, a mock server for web requests.

$ cargo check

#Deployment

#Using NixOS

{ config, pkgs, lib, ...}: let
  # Included as an example. You should probably use `flake.nix` instead.
  # You will get version pinning and you will probably be happier.
  kittybox = (builtins.getFlake "git+https://git.sr.ht/~vikanezrimaya/kittybox?ref=main");
in {
  imports = [
    kittybox.nixosModules.default
  ];

  services.kittybox.enable = true;
}

#Manually

Currently Kittybox requires several external components for deployment. In the future, these will be fully reimplemented within Kittybox to preserve your privacy and security.

Set the following environment variables:

  • BACKEND_URI: Your storage backend URI, used to store post content.
    • To use flat files, use file:// and append an absolute path to your folder like this: file:///var/lib/kittybox/data
    • To use Postgres, use postgres://. You probably know how to use this.
  • BLOBSTORE_URI: Your media endpoint storage URI, used to store files uploaded via the media endpoint.
    • To use flat files, use file:// and append an absolute path to your folder like this: file:///var/lib/kittybox/media
  • AUTH_STORE_URI: Storage for authentication-related data (tokens, authorization codes etc.)
    • To use flat files, use file:// and append an absolute path to your folder like this: file:///var/lib/kittybox/auth
  • JOB_QUEUE_URI: Job queue URI, currently used for incoming webmention handling. Only Postgres is supported (see above for syntax)

Additionally you can customize the SERVE_AT environment variable to customize where Kittybox will listen to requests.

Note: it is heavily recommended to deploy Kittybox behind a reverse proxy, since it is currently unable to handle TLS by itself. Recommended reverse proxies are Caddy and/or nginx.