Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Jun 26, 2024
1 parent 9bb5a00 commit 3634808
Showing 1 changed file with 56 additions and 80 deletions.
136 changes: 56 additions & 80 deletions aquadoggo_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@ database_url = "sqlite:$HOME/.local/share/aquadoggo/db.sqlite3"
blobs_base_path = "$HOME/.local/share/aquadoggo/blobs"
```

#### Private Network

> "I want only peers who know a pre-shared key to be able to join my network."
```sh
# Generate a 64 digit hexadecimal string, for example on the command line like this
hexdump -vn64 -e'"%x"' /dev/urandom
# => <PRE_SHARED_KEY>

# Pass the pre-shared key to your node via environment variables or config file
PSK=<PRE_SHARED_KEY> aquadoggo
```

### Configuration

Check out the [`config.toml`] file for all configurations and documentation or
Expand All @@ -184,64 +197,53 @@ Options:
-c, --config <PATH>
Path to an optional "config.toml" file for further configuration.
When not set the program will try to find a `config.toml` file in the
same folder the program is executed in and otherwise in the regarding
operation systems XDG config directory
("$HOME/.config/aquadoggo/config.toml" on Linux).
When not set the program will try to find a `config.toml` file in the same folder the program is executed in and otherwise in the regarding operation systems XDG config directory ("$HOME/.config/aquadoggo/config.toml" on Linux).
[env: CONFIG=]
-s, --allow-schema-ids [<SCHEMA_ID>...]
List of schema ids which a node will replicate, persist and expose on
the GraphQL API. Separate multiple values with a whitespace. Defaults
to allow _any_ schemas ("*").
List of schema ids which a node will replicate, persist and expose on the GraphQL API. Separate multiple values with a whitespace. Defaults to allow _any_ schemas ("*").
When allowing a schema you automatically opt into announcing,
replicating and materializing documents connected to it, supporting
applications and networks which are dependent on this data.
When allowing a schema you automatically opt into announcing, replicating and materializing documents connected to it, supporting applications and networks which are dependent on this data.
It is recommended to set this list to all schema ids your own
application should support, including all important system schemas.
It is recommended to set this list to all schema ids your own application should support, including all important system schemas.
WARNING: When set to wildcard "*", your node will support _any_
schemas it will encounter on the network. This is useful for
experimentation and local development but _not_ recommended for
production settings.
WARNING: When set to wildcard "*", your node will support _any_ schemas it will encounter on the network. This is useful for experimentation and local development but _not_ recommended for production settings.
-d, --database-url <CONNECTION_STRING>
URL / connection string to PostgreSQL or SQLite database. Defaults to
an in-memory SQLite database.
URL / connection string to PostgreSQL or SQLite database. Defaults to an in-memory SQLite database.
WARNING: By default your node will not persist anything after
shutdown. Set a database connection url for production settings to
not loose data.
WARNING: By default your node will not persist anything after shutdown. Set a database connection url for production settings to not loose data.
-p, --http-port <PORT>
HTTP port for client-node communication, serving the GraphQL API.
Defaults to 2020
HTTP port for client-node communication, serving the GraphQL API. Defaults to 2020
-q, --transport <TRANSPORT>
Protocol (TCP/QUIC) used for node-node communication and data replication. Defaults to QUIC
-t, --node-port <PORT>
QUIC port for node-node communication and data replication. Defaults to 2022
-y, --psk <PSK>
Pre-shared key formatted as a 64 digit hexadecimal string.
When provided a private network will be made with only peers knowing the psk being able to form connections.
-q, --quic-port <PORT>
QUIC port for node-node communication and data replication. Defaults
to 2022
WARNING: Private networks are only supported when using TCP for the transport layer.
-f, --blobs-base-path <PATH>
Path to folder where blobs (large binary files) are persisted.
Defaults to a temporary directory.
Path to folder where blobs (large binary files) are persisted. Defaults to a temporary directory.
WARNING: By default your node will not persist any blobs after
shutdown. Set a path for production settings to not loose data.
WARNING: By default your node will not persist any blobs after shutdown. Set a path for production settings to not loose data.
-k, --private-key <PATH>
Path to persist your ed25519 private key file. Defaults to an
ephemeral key only for this current session.
Path to persist your ed25519 private key file. Defaults to an ephemeral key only for this current session.
The key is used to identify you towards other nodes during network
discovery and replication. This key is _not_ used to create and sign
data.
The key is used to identify you towards other nodes during network discovery and replication. This key is _not_ used to create and sign data.
If a path is set, a key will be generated newly and stored under this
path when node starts for the first time.
If a path is set, a key will be generated newly and stored under this path when node starts for the first time.
When no path is set, your node will generate an ephemeral private key
on every start up and _not_ persist it.
When no path is set, your node will generate an ephemeral private key on every start up and _not_ persist it.
-m, --mdns [<BOOL>]
mDNS to discover other peers on the local network. Enabled by default
Expand All @@ -251,74 +253,48 @@ Options:
-n, --direct-node-addresses [<IP:PORT>...]
List of known node addresses we want to connect to directly.
Make sure that nodes mentioned in this list are directly reachable
(they need to be hosted with a static IP Address). If you need to
connect to nodes with changing, dynamic IP addresses or even with
nodes behind a firewall or NAT, do not use this field but use at
least one relay.
Make sure that nodes mentioned in this list are directly reachable (they need to be hosted with a static IP Address). If you need to connect to nodes with changing, dynamic IP addresses or even with nodes behind a firewall or NAT, do not use this field but use at least one relay.
-a, --allow-peer-ids [<PEER_ID>...]
List of peers which are allowed to connect to your node.
If set then only nodes (identified by their peer id) contained in
this list will be able to connect to your node (via a relay or
directly). When not set any other node can connect to yours.
If set then only nodes (identified by their peer id) contained in this list will be able to connect to your node (via a relay or directly). When not set any other node can connect to yours.
Peer IDs identify nodes by using their hashed public keys. They do
_not_ represent authored data from clients and are only used to
authenticate nodes towards each other during networking.
Peer IDs identify nodes by using their hashed public keys. They do _not_ represent authored data from clients and are only used to authenticate nodes towards each other during networking.
Use this list for example for setups where the identifier of the
nodes you want to form a network with is known but you still need to
use relays as their IP addresses change dynamically.
Use this list for example for setups where the identifier of the nodes you want to form a network with is known but you still need to use relays as their IP addresses change dynamically.
-b, --block-peer-ids [<PEER_ID>...]
List of peers which will be blocked from connecting to your node.
If set then any peers (identified by their peer id) contained in this
list will be blocked from connecting to your node (via a relay or
directly). When an empty list is provided then there are no
restrictions on which nodes can connect to yours.
If set then any peers (identified by their peer id) contained in this list will be blocked from connecting to your node (via a relay or directly). When an empty list is provided then there are no restrictions on which nodes can connect to yours.
Block lists and allow lists are exclusive, which means that you
should _either_ use a block list _or_ an allow list depending on your
setup.
Block lists and allow lists are exclusive, which means that you should _either_ use a block list _or_ an allow list depending on your setup.
Use this list for example if you want to allow _any_ node to connect
to yours _except_ of a known number of excluded nodes.
Use this list for example if you want to allow _any_ node to connect to yours _except_ of a known number of excluded nodes.
-r, --relay-addresses [<IP:PORT>...]
List of relay addresses.
A relay helps discover other nodes on the internet (also known as
"rendesvouz" or "bootstrap" server) and helps establishing direct p2p
connections when node is behind a firewall or NAT (also known as
"holepunching").
A relay helps discover other nodes on the internet (also known as "rendesvouz" or "bootstrap" server) and helps establishing direct p2p connections when node is behind a firewall or NAT (also known as "holepunching").
WARNING: This will potentially expose your IP address on the network.
Do only connect to trusted relays or make sure your IP address is
hidden via a VPN or proxy if you're concerned about leaking your IP.
WARNING: This will potentially expose your IP address on the network. Do only connect to trusted relays or make sure your IP address is hidden via a VPN or proxy if you're concerned about leaking your IP.
-e, --relay-mode [<BOOL>]
Enable if node should also function as a relay. Disabled by default.
Other nodes can use relays to aid discovery and establishing connectivity.
Relays _need_ to be hosted in a way where they can be reached
directly, for example with a static IP address through an VPS.
Relays _need_ to be hosted in a way where they can be reached directly, for example with a static IP address through an VPS.
[possible values: true, false]
-l, --log-level <LEVEL>
Set log verbosity. Use this for learning more about how your node
behaves or for debugging.
Set log verbosity. Use this for learning more about how your node behaves or for debugging.
Possible log levels are: ERROR, WARN, INFO, DEBUG, TRACE. They are
scoped to "aquadoggo" by default.
Possible log levels are: ERROR, WARN, INFO, DEBUG, TRACE. They are scoped to "aquadoggo" by default.
If you want to adjust the scope for deeper inspection use a filter
value, for example "=TRACE" for logging _everything_ or
"aquadoggo=INFO,libp2p=DEBUG" etc.
If you want to adjust the scope for deeper inspection use a filter value, for example "=TRACE" for logging _everything_ or "aquadoggo=INFO,libp2p=DEBUG" etc.
-h, --help
Print help (see a summary with '-h')
Expand Down Expand Up @@ -350,9 +326,9 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE)
<img src="https://raw.githubusercontent.com/p2panda/.github/main/assets/nlnet-logo.svg" width="auto" height="80px"><br />
<img src="https://raw.githubusercontent.com/p2panda/.github/main/assets/eu-flag-logo.png" width="auto" height="80px">

*This project has received funding from the European Union’s Horizon 2020
_This project has received funding from the European Union’s Horizon 2020
research and innovation programme within the framework of the NGI-POINTER
Project funded under grant agreement No 871528 and NGI-ASSURE No 957073*
Project funded under grant agreement No 871528 and NGI-ASSURE No 957073_

[`config.toml`]: config.toml
[`p2panda`]: https://p2panda.org

0 comments on commit 3634808

Please sign in to comment.