Domani connects your domain to whatever you want to host on it, all with no account needed
Go to file
2023-07-10 18:23:52 +02:00
src Implement support for AAAA records 2023-07-10 18:23:52 +02:00
.dev-config.yml Implement support for AAAA records 2023-07-10 18:23:52 +02:00
.env.dev Switch to using a config file 2023-07-09 16:09:00 +02:00
.gitignore Build release as a static binary 2023-05-15 22:58:40 +02:00
Cargo.lock Switch to using a config file 2023-07-09 16:09:00 +02:00
Cargo.toml Switch to using a config file 2023-07-09 16:09:00 +02:00
default.nix init 2023-05-03 09:58:06 +02:00
flake.lock Switch to using nightly 2023-05-08 18:25:51 +02:00
flake.nix Implemented acme store, started on manager 2023-05-18 12:22:35 +02:00
README.md Implement support for AAAA records 2023-07-10 18:23:52 +02:00
rust-toolchain.toml Build release as a static binary 2023-05-15 22:58:40 +02:00
shell.nix init 2023-05-03 09:58:06 +02:00
TODO Removed usage of sync::Arc where possible 2023-06-21 14:02:42 +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 which may or may not be live

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.

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, is as follows:

origin:

  # Path under which all origin data (i.e. git repositories, file caches,
  # etc...) will be stored.
  #
  # This should be different than any other store_dir_paths.
  store_dir_path: REQUIRED

domain:

  # Path under which all domain data (i.e. domains configured by users, HTTPS
  # certificates, etc...) will be stored.
  #
  # This should be different than any other store_dir_paths.
  store_dir_path: REQUIRED

  #dns:

    # Address of DNS resolver to use.
    #resolver_addr: "1.1.1.1:53"

  #acme:

    # Contact email to use when creating HTTPS certificates using LetsEncrypt.
    # This email will be used for notifying you if certificates are not being
    # renewed.
    #contact_email: REQUIRED if service.http.https_addr is set

service:

  # Passphrase which must be given by users who are configuring new domains via
  # the web interface.
  passphrase: foobar

  # DNS records which users must add to their domain's DNS so that
  # Domani can serve the domains. All records given must route to this Domani
  # instance. At least one record must be given.
  dns_records:
    #- type: A
    #  addr: 127.0.0.1

    #- type: AAAA
    #  addr: ::1

  # The domain name which will be used to serve the web interface of Domani. If
  # service.http.https_addr is enabled then an HTTPS certificate for this domain
  # will be retrieved automatically.
  #primary_domain: "localhost"

  #http:

    # The address to listen for HTTP requests on. This must use port 80 if
    # https_addr is set.
    #http_addr: "[::]:3030"

    # The address to listen for HTTPS requests on. This is optional.
    #https_addr: "[::]:443"

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:

nix develop

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

Roadmap

  • Support for CNAME records
  • Support for more backends than just git repositories, including:
    • IPFS/IPNS
    • Alternative URLs (reverse proxy)
    • Google Drive
    • Dropbox