domani/README.md

102 lines
2.9 KiB
Markdown
Raw Normal View History

2023-06-25 11:35:59 +00:00
# Domani
2023-05-15 19:46:40 +00:00
2023-06-25 11:35:59 +00:00
Domani is a self-hosted rust service which connects a DNS hostname to a data
2023-05-15 19:46:40 +00:00
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.
2023-06-25 11:35:59 +00:00
[Demo which may or may not be live](https://domani.mediocregopher.com)
2023-05-15 19:46:40 +00:00
2023-05-20 13:03:11 +00:00
## Build
2023-06-25 11:35:59 +00:00
Domani uses nix flakes for building and setting up the development environment.
2023-05-20 13:03:11 +00:00
In order to create a release binary:
```
nix build
```
A statically compiled binary will be placed in the `result` directory.
## Configuration
2023-06-25 11:35:59 +00:00
Domani is configured via command-line arguments or environment variables:
2023-05-20 13:03:11 +00:00
```
--http-domain <HTTP_DOMAIN>
2023-06-25 11:35:59 +00:00
[env: DOMANI_HTTP_DOMAIN=]
2023-05-20 13:03:11 +00:00
--http-listen-addr <HTTP_LISTEN_ADDR>
2023-06-25 11:35:59 +00:00
[env: DOMANI_HTTP_LISTEN_ADDR=] [default: [::]:3030]
2023-05-20 13:03:11 +00:00
--https-listen-addr <HTTPS_LISTEN_ADDR>
2023-06-25 11:35:59 +00:00
E.g. '[::]:443', if given then SSL certs will automatically be retrieved for all domains using LetsEncrypt [env: DOMANI_HTTPS_LISTEN_ADDR=]
2023-05-20 13:03:11 +00:00
--passphrase <PASSPHRASE>
2023-06-25 11:35:59 +00:00
[env: DOMANI_PASSPHRASE=]
2023-05-20 13:03:11 +00:00
--origin-store-git-dir-path <ORIGIN_STORE_GIT_DIR_PATH>
2023-06-25 11:35:59 +00:00
[env: DOMANI_ORIGIN_STORE_GIT_DIR_PATH=]
2023-05-20 13:03:11 +00:00
--domain-checker-target-a <DOMAIN_CHECKER_TARGET_A>
2023-06-25 11:35:59 +00:00
[env: DOMANI_DOMAIN_CHECKER_TARGET_A=]
2023-05-20 13:03:11 +00:00
--domain-checker-resolver-addr <DOMAIN_CHECKER_RESOLVER_ADDR>
2023-06-25 11:35:59 +00:00
[env: DOMANI_DOMAIN_CHECKER_RESOLVER_ADDR=] [default: 1.1.1.1:53]
2023-05-20 13:03:11 +00:00
--domain-config-store-dir-path <DOMAIN_CONFIG_STORE_DIR_PATH>
2023-06-25 11:35:59 +00:00
[env: DOMANI_DOMAIN_CONFIG_STORE_DIR_PATH=]
2023-05-20 13:03:11 +00:00
--domain-acme-store-dir-path <DOMAIN_ACME_STORE_DIR_PATH>
2023-06-25 11:35:59 +00:00
[env: DOMANI_DOMAIN_ACME_STORE_DIR_PATH=]
2023-05-20 13:03:11 +00:00
--domain-acme-contact-email <DOMAIN_ACME_CONTACT_EMAIL>
2023-06-25 11:35:59 +00:00
[env: DOMANI_DOMAIN_ACME_CONTACT_EMAIL=]
2023-05-20 13:03:11 +00:00
-h, --help
Print help
-V, --version
Print version
```
### HTTPS Support
2023-06-25 11:35:59 +00:00
Domani will automatically handle setting up HTTPS via LetsEncrypt for both the
domani frontend site and all domains which it has been configured to serve.
2023-05-20 13:03:11 +00:00
By default HTTPS is not enabled, but can be easily enabled by setting the
following arguments:
```
--https-listen-addr='[::]:443'
--domain-acme-contact-email='foo@example.com'
--domain-acme-store-dir-path='/some/secure/directory'
```
The contact email can be anything, it doesn't have to be real. The store
directory will have all SSL private keys written to it, and so should be
secured as best as possible.
2023-05-15 19:46:40 +00:00
## Development
2023-06-25 11:35:59 +00:00
Domani uses nix flakes for building and setting up the development environment.
2023-05-15 19:46:40 +00:00
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
2023-07-04 17:09:07 +00:00
* Support for AAAA and CNAME records
* Support for more backends than just git repositories, including:
* IPFS/IPNS
* Alternative URLs (reverse proxy)
* Google Drive
* Dropbox