-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from oiclid/guides
Guides
- Loading branch information
Showing
46 changed files
with
1,499 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
categories: ["Guides"] | ||
tags: ["Apps", "p2p", "file-sharing"] | ||
weight: 1 | ||
title: "qBittorrent" | ||
linkTitle: "qBittorrent" | ||
--- | ||
|
||
The [qBittorrent](https://www.qbittorrent.org/) project aims to provide an open-source software alternative to µTorrent. The provided deployment configuration [(`deploy-ssh-tunnel.yaml`)](https://github.com/akash-network/awesome-akash/blob/master/qbittorrent/deploy-ssh-tunnel.yaml) enables a relatively secure means of torrenting on Akash via qBittorrent. Please use this responsibly. | ||
|
||
![](../../../assets/qbittorent.png) | ||
|
||
## Overview | ||
|
||
The deployment uses a custom image (`ghcr.io/spacepotahto/qbittorrent:1.0.0`, code [here](https://github.com/spacepotahto/docker-qbittorrent-server)) that bundles the qBittorrent client ([base image](https://github.com/linuxserver/docker-qbittorrent) provided by LinuxServer.io) with a HTTP file server. This allows the user to access the qBitorrent WebUI to download files to the Akash provider, and to download the downloaded files through the HTTP file server. `deploy.yaml` and `deploy-ssh-tunnel.yaml` (recommended) differs in how security is handled. | ||
|
||
## `deploy.yaml` | ||
|
||
This configuration deploys the qBittorrent client + File Server, and the user can access them using their web browser. However, by default the Akash deployment is accessible through HTTP only, so traffic between the user and the qBittorrent WebUI + file server is unencrypted. Thus, it's recommended to enabled HTTPS. One way to do so is to use a custom domain with CloudFlare SSL as described in this [guide](https://teeyeeyang.medium.com/how-to-use-a-custom-domain-with-your-akash-deployment-5916585734a2) written by a community member. The downside is the traffic goes through CloudFlare. For personal use, using `deploy-ssh-tunnel.yaml` instead is recommended. | ||
|
||
### Usage | ||
|
||
Once deployed, the qBittorrent WebUI is accessible at `http://<HOSTED URI>`. The default username and password is `admin` and `adminadmin` respectively. They can be changed via the WebUI settings once authenticated. | ||
|
||
When downloading files using the WebUI, keep the default download location at `/downloads`. Once the files finish downloading, you can download the files to your computer by accessing the HTTP file server that serves `/downloads` at `http://<HOSTED URI>:<THE FORWARDED EXTERNAL PORT OF 5000>`. | ||
|
||
## `deploy-ssh-tunnel.yaml` (Recommended) | ||
|
||
Since this is likely for personal use only, it's also possible to utilize a SSH tunnel in lieu of HTTPS to establish an encyrpted connection between the user and qBittorrent WebUI + file server. The diagram below illustrates how this works: | ||
|
||
![](../../../assets/ssh-tunnel.png) | ||
|
||
The qBittorrent WebUI + file server deployment is not exposed to the public internet, and is only accessible from the SSH enabled deployment. The SSH enabled deployment is only accessible by the user through an encrypted connection. Thus the user can securely access the qBittorrent WebUI + file server through SSH tunneling. | ||
|
||
### Usage | ||
|
||
The `deploy-ssh-tunnel.yaml` is configured to enable SSH tunneling (using the `ghcr.io/spacepotahto/openssh-server:1.0.0` image, code [here](https://github.com/spacepotahto/docker-openssh-server)), with the option to use password based or key based (generally safer) authentication through setting environment variables. Once deployed, you can establish the SSH tunnel with: | ||
|
||
``` | ||
ssh -p <THE FORWARDED EXTERNAL PORT OF 2222> -N -L 8080:web:8080 -L 5000:web:5000 <USER_NAME>@<PROVIDER HOST> | ||
``` | ||
Then in your browser, you can navigate to `http://localhost:8080` to access the qBittorrent WebUI. The default username and password is `admin` and `adminadmin` respectively. They can be changed via the WebUI settings once authenticated. | ||
|
||
When adding the torrent files or magnet links using the WebUI, keep the default download location at `/downloads`. Once the files finish downloading, you can download the files to your computer by accessing the HTTP file server that serves `/downloads` at `http://localhost:5000`. Due to the SSH tunneling, your file download is done through an encrypted connection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
--- | ||
categories: ["Guides"] | ||
tags: ["Apps", "Privacy", "Messaging"] | ||
weight: 1 | ||
title: "What is Waku?" | ||
linkTitle: "Waku" | ||
--- | ||
|
||
[Waku](https://waku.org/) is a family of robust, censorship-resistant communication protocols designed to enable privacy-focused messaging for web3 apps. | ||
|
||
In other words, Waku allows you to build decentralized applications which require any form of message transfer (e.g. chats, push notifications, event broadcasting, weak consensus/coordination, message queues). You can build your own application protocols on top of plug&play Waku protocols, which ensure your node will be well connected with the network and your messages will be broadcasted reliably. | ||
|
||
Waku also includes protocols friendly to resource restricted / adaptive devices like smartphones or laptops which may not have a lot of compute power or bandwith. | ||
|
||
## Who is this deployment for? | ||
|
||
The deployment manifests in this folder target users who wish to support the Waku Network as a node operator (i.e. making the network more robust, decentralized and private), but also users who would like to build an application on top of waku. | ||
|
||
We provide 2 deployment manifests - they both enable `Relay`, `Lightpush`, `Filter` and `Store` protocols and connect to The Waku Network, but differ in the archive backend for `Store` protocol. | ||
|
||
The [deploy.sqlite.yaml](https://github.com/akash-network/awesome-akash/blob/master/waku/deploy.sqlite.yaml) is the simpler of two, leverages SQLite for archive, hence results in simpler and slightly cheaper deployment. | ||
|
||
The [deploy.yaml](https://github.com/akash-network/awesome-akash/blob/master/waku/deploy.yaml) deploys Postgresql database instance in addition to the `nwaku` node. | ||
|
||
## How to | ||
|
||
Waku nodes connecting to The Waku Network require access to an Ethereum (Sepolia Testnet) RPC endpoint. You can obtain one from miriad of node providers like Infura, Chainstack, Quicknode, or run one yourself (even on Akash:)). | ||
|
||
The RPC node URL needs to be configured in `ETH_CLIENT_ADDRESS` environment variable of the deployment manifest. | ||
|
||
Another mandatory environment variable is `IP_ADDR`. This is the IP address leased for this deplyoment. Sadly, it cannot be obtained before the actual deployment happens neither can it be resolved from inside the deployment. This means that after deploying first with empty `IP_ADDR`, you need to get the address of the IP lease and **update the deployment** by adding the value to the environment variable. Only after you do that, the node will be able to properly announce itself to the network and other peers will be able to connect to it. | ||
|
||
### Deploying as Relayer | ||
|
||
If you just want to support the network without intent to publish your own messages, you can simple add the RPC node URL and submit the deployment manifest. After the node syncs the RLN membership tree it will start relaying messages. You don't need to do anything else. | ||
|
||
### Deploying as Publisher | ||
|
||
In case your goal is to use this node to publish messages, you will need to obtain an RLN membership yourself. For that you can use a helper script in [`nwaku-compose`](https://github.com/waku-org/nwaku-compose/blob/master/register_rln.sh) which allows you to register the membership and produces `keystore.json` file. You will need to encode the content of this file with `base64` encoding and pass it into the deployment fail as `RLN_RELAY_CRED_BASE64`. | ||
|
||
### Deploying with Postgres | ||
|
||
This deployment not only deploys Waku node, but also a Postgres database serving as an archive for the store protocol. The manifest including Postgres instance is availabale in [`deploy.yaml`](https://github.com/akash-network/awesome-akash/blob/master/waku/deploy.yaml). | ||
|
||
You may want to change the `POSTGRES_PASSWORD` in `services.node.env` and `services.postgres.env` (make sure both values match!). | ||
|
||
### Deploying with Permanent PeerId | ||
|
||
PeerID is part of the node's identity. It is based on a private key which randomly generated by default. In case you want or need to hardcode your node in your application, you will need a stable/permanent PeerID. This is achieved by providing a value in the `NODEKEY` environment variable. You can generate a node key by running | ||
|
||
``` | ||
openssl rand -hex 32 | ||
``` | ||
|
||
### Deploying with Domain Name | ||
|
||
There is an environment variable `DOMAIN` available in the manifests which allows you to provide a domain name which can be used to address your node. This requires a 2 step deployment as we cannot predict the IP lease before the actual instance is deployed. | ||
|
||
1. Deploy one of the manifests with empty `DOMAIN`. | ||
|
||
2. Check the IP leased to your deployment. | ||
|
||
3. Create an A record for the desired domain name and the leased IP. | ||
|
||
4. Update your deployment with the `DOMAIN` value. | ||
|
||
After applying the updated deployment, you should see Let's Encrypt certificates being provisioned in logs and then node starting and relaying messages. | ||
|
||
### After You Deploy | ||
|
||
Two important pieces of information about your node are the node's multiaddresses and ENR. You can find both early in the logs output after the deployment. | ||
|
||
``` | ||
[node]: INF 2023-08-14 13:59:38.175+00:00 PeerInfo topics="waku node" tid=1 file=waku_node.nim:796 peerId=16U*9q9fq5 addrs=@[] | ||
[node]: INF 2023-08-14 13:59:38.175+00:00 Listening on topics="waku node" tid=1 file=waku_node.nim:803 full=[/dns4/waku.myrandomdemos.online/tcp/60000/p2p/16Uiu2HAmDdZ1brt7nq717ugWSK1EcGdaxUMVmHeVFzcPGb9q9fq5][/dns4/waku.myrandomdemos.online/tcp/8000/wss/p2p/16Uiu2HAmDdZ1brt7nq717ugWSK1EcGdaxUMVmHeVFzcPGb9q9fq5] | ||
[node]: INF 2023-08-14 13:59:38.175+00:00 DNS: discoverable ENR topics="waku node" tid=1 file=waku_node.nim:804 enr=enr:-OG4QIzHr0Xd9OJVY3cDxqmDvwprccDQcRL0km9LR-q0MnjwFXZsqri_mnFwECqzVOxi78YierreeH9DUyYpdCeWZvIBgmlkgnY0gmlwhLhporWKbXVsdGlhZGRyc7hCAB42GXdha3UubXlyYW5kb21kZW1vcy5vbmxpbmUG6mAAIDYZd2FrdS5teXJhbmRvbWRlbW9zLm9ubGluZQYfQN4DiXNlY3AyNTZrMaEDDn10Z_V6Qh_BJV0BA_Y7wuTaApavCGi0WiIoZkMlGXyDdGNwgupgg3VkcIIjLYV3YWt1Mg8 | ||
``` | ||
|
||
You can verify that your deployment was successful and your node is reachable by connecting to it using [`wakucanary`](https://github.com/waku-org/nwaku/releases/latest) tool or, if you used the full deployment, by connecting via WSS using one of the [js-waku-examples](https://examples.waku.org/light-js/). | ||
|
||
You can monitor your deployment with Prometheus and use a Grafana dashboard available in https://github.com/waku-org/nwaku-compose/tree/master/monitoring. | ||
|
||
You should see basic metrics printed in logs as well: | ||
|
||
``` | ||
[node]: INF 2023-08-15 10:39:37.807+00:00 Relay peer connections topics="waku node peer_manager" tid=1 file=peer_manager.nim:683 inRelayConns=4/160 outRelayConns=17/80 totalConnections=24/300 notConnectedPeers=137 outsideBackoffPeers=5 | ||
[node]: INF 2023-08-15 10:39:39.460+00:00 Finished dialing multiple peers topics="waku node peer_manager" tid=1 file=peer_manager.nim:532 successfulConns=0 attempted=3 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total connections initiated topics="waku node metrics" tid=1 file=waku_metrics.nim:56 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total messages topics="waku node metrics" tid=1 file=waku_metrics.nim:57 count=231479.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total store peers topics="waku node metrics" tid=1 file=waku_metrics.nim:58 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total peer exchange peers topics="waku node metrics" tid=1 file=waku_metrics.nim:59 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total lightpush peers topics="waku node metrics" tid=1 file=waku_metrics.nim:60 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total filter peers topics="waku node metrics" tid=1 file=waku_metrics.nim:61 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total active filter subscriptions topics="waku node metrics" tid=1 file=waku_metrics.nim:62 count=0.0 | ||
[node]: INF 2023-08-15 10:39:40.532+00:00 Total errors topics="waku node metrics" tid=1 file=waku_metrics.nim:63 count=1.0 | ||
[node]: INF 2023-08-15 10:40:10.532+00:00 Total connections initiated topics="waku node metrics" tid=1 file=waku_metrics.nim:56 count=0.0 | ||
``` | ||
|
||
Notice the `inRelayConns` and `outRelayConns` - those represent the number of nodes in peer-to-peer relay network you are connected to. | ||
|
||
Notice the `Total messages` metric - this represents how many messages went through your node. | ||
|
||
## Links | ||
|
||
- [Nwaku Akash repository](https://github.com/vpavlin/nwaku-akash) | ||
|
||
- [nwaku](https://github.com/waku-org/nwaku) | ||
|
||
- [Waku Docs](https://docs.waku.org/) | ||
|
||
- [js-waku](https://github.com/waku-org/js-waku) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.