Domani connects your domain to whatever you want to host on it, all with no account needed
Go to file
2024-06-04 19:49:15 +02:00
src Set openssl version number when creation certs 2024-06-04 19:49:15 +02:00
static Fix static file index.gmi 2023-07-31 20:47:14 +02:00
.gitignore Refactor how the configuration is documented 2023-08-25 18:44:55 +02:00
Cargo.lock Update hyper-reverse-proxy with fixes 2024-03-05 21:41:28 +01:00
Cargo.toml Update hyper-reverse-proxy with fixes 2024-03-05 21:41:28 +01:00
config-dev.yml.tpl Remove old git implementation completely 2024-02-16 21:22:39 +01:00
config.yml Make http optional 2024-02-29 17:55:10 +01:00
default.nix init 2023-05-03 09:58:06 +02:00
flake.lock Upgrade to rust stable 1.76.0 and fix clippy errors 2024-02-27 11:30:28 +01:00
flake.nix Upgrade hyper-reverse-proxy to fix websocket forwarding 2024-03-05 21:00:02 +01:00
LICENSE.txt License under the AGPLv3 2023-08-21 17:18:12 +02:00
README.md Update README with release build instructions 2024-01-09 11:24:54 +01:00
rust-toolchain.toml Upgrade to rust stable 1.76.0 and fix clippy errors 2024-02-27 11:30:28 +01:00
shell.nix init 2023-05-03 09:58:06 +02:00

Domani

Domani is a self-hosted rust service which connects a DNS hostname to a data backend (e.g. a git repository), all with no account needed. The user only inputs their domain name, their desired backend, and then adds two entries to their DNS server.

Demo

Domani supports serving domains using the following protocols:

  • HTTP
  • HTTPS (with SSL certificates automatically retrieved using LetsEncrypt)
  • Gemini

Files are served as-is, with their extension being used to determine Content-Type. If a directory is requested (e.g. /some/dir/) then index.html will be requested if the protocol is HTTP, or index.gmi if the protocol is gemini.

Build

Domani uses nix flakes for building and setting up the development environment.

In order to create a release binary:

nix build

A statically compiled binary will be placed in the result directory.

A full release, which cross-compiles binaries for all supported platforms, can be generated by doing:

nix build '.#release'

NOTE that cross-compiling will download a separate build environment for each target platform, which can take up quite a bit of disk space (>10GB). gigs).

Configuration

Domani is configured via a YAML file whose path is given on the command-line. The format of the YAML file, along with all default values, can be found in the config.yml file in this repo.

The YAML config file can be passed to the Domani process via the --config-path CLI parameter:

domani --config-path <path>

HTTPS Support

By default HTTPS is not enabled, but can be enabled by setting the service.http.https_addr field in the YAML config. There are a few other fields in the configuration file which must be correctly configured if HTTPS is set up, please read through the example file above carefully.

Once HTTPS is enabled, Domani will automatically handle setting it up via LetsEncrypt for both the Domani web interface and all domains which it is configured to serve.

Development

Domani uses nix flakes for building and setting up the development environment. In order to open a shell with all necessary tooling (expected rust toolchain versions, etc...) simply do:

cp config-dev.yml.tpl config-dev.yml
nix develop

Within the shell which opens you can do cargo run to start a local instance.

Using the default configuration, the domain domani-test.localhost should be immediately available at:

  • http://domani-test.localhost:3080
  • gemini://domani-test.localhost:3965

Roadmap

  • Tutorials aimed at beginner users.

  • Support for more backends than just git repositories, including:

    • IPFS/IPNS
    • Small static files (e.g. for well-knowns)
  • Automatic HTTP/gemtext rendering for markdown files.

  • Automatic HTTP rendering for gemtext files.