Skip to content

Commit

Permalink
docs: add wot-relay guide and update node-tec contact methods (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiarulli authored Oct 17, 2024
1 parent b7492f6 commit 9c958e1
Show file tree
Hide file tree
Showing 18 changed files with 581 additions and 45 deletions.
19 changes: 0 additions & 19 deletions docs/contact/developers.md

This file was deleted.

26 changes: 16 additions & 10 deletions docs/contact/node-tec.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# NODE-TEC

🦩 npub:
🦩 npub: `npub1809mpa7748df7kext899m2yatetky9w78zz72x7jgaxarvxyfvtqwvfpz8`

```bash
npub1809mpa7748df7kext899m2yatetky9w78zz72x7jgaxarvxyfvtqwvfpz8
```
🔑 Keybase: [nodetec](https://keybase.io/nodetec "nodetec")

📧 Email:
🔖 Substack: [NODE-TEC](https://nodetec.substack.com "NODE-TEC")

[[email protected]](mailto:devs@node-tec.com "[email protected]")
𝕏: [@node_tec](https://twitter.com/node_tec "@node_tec")

🔐 PGP Fingerprint:
🤖 Discord: [NODE-TEC](https://discord.gg/zdKq5brhF9 "NODE-TEC")

```bash
04BD 8C20 598F A5FD DE19 BECD 8F24 69F7 1314 FAD7
```
📧 Email: [[email protected]](mailto:[email protected] "[email protected]")

🔐 PGP Fingerprint: `04BD 8C20 598F A5FD DE19 BECD 8F24 69F7 1314 FAD7`

## Developers

🦩 Chris' npub: `npub1ygzj9skr9val9yqxkf67yf9jshtyhvvl0x76jp5er09nsc0p3j6qr260k2`

🦩 J's npub: `npub1zn559gr2vwyex2s2mt2s7x5r5ryjeyy0zwy2zx3ckp6ktwpe4p4spgt84e`

🦩 Nick's npub: `npub1te6nugpy7utp9ls620awmj5zw0nedwhh3rjj2gx6vnzms2rvz5jq9kkh4n`
8 changes: 8 additions & 0 deletions docs/relays/khatru-pyramid/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ You can now run the binary:
DOMAIN="relay.relayrunner.xyz" RELAY_NAME="Relay Runner's Khatru Pyramid Relay" RELAY_PUBKEY="3bcbb0f7dea9da9f5b2659ca5da89d5e576215de3885e51bd2474dd1b0c44b16" ./khatru-pyramid
```

Be sure to replace the values of the following:

- `DOMAIN` with the domain name of your server

- `RELAY_NAME` with the name you're going to use with your relay

- `RELAY_PUBKEY` with the pubkey you're using with your relay

Khatru Pyramid should now be listening on `0.0.0.0:3334`. A relay database will be created in your current directory called `db` along with a file for storing user data called `users.json`.

To stop the relay press `Ctrl+C`.
2 changes: 1 addition & 1 deletion docs/relays/khatru-pyramid/websocket-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We're now going to set up the upstream WebSocket connection by editing the Nginx config file.

Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Nginx config file:
Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Khatru Pyramid Nginx config file:

```nginx title="relay_relayrunner_xyz.conf"
map $http_upgrade $connection_upgrade {
Expand Down
8 changes: 7 additions & 1 deletion docs/relays/khatru29/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ You can now run the binary:
DOMAIN="relay.relayrunner.xyz" RELAY_NAME="Relay Runner's Khatru29 Relay" RELAY_PRIVKEY="<your-secret-key>" ./khatru29
```

Be sure to replace `<your-secret-key>` with your secret key. The secret key can be passed as a 32-byte hex. Also, be sure to replace `relay.relayrunner.xyz` with the domain you set up with your relay.
Be sure to replace the values of the following:

- `DOMAIN` with the domain name of your server

- `RELAY_NAME` with the name you're going to use with your relay

- `RELAY_PRIVKEY` with the secret key you're going to use with your relay which should be passed as a 32-byte hex

Khatru29 should now be listening on `0.0.0.0:5577`. A relay database will also be created in your current directory called `db`.

Expand Down
2 changes: 1 addition & 1 deletion docs/relays/khatru29/websocket-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We're now going to set up the upstream WebSocket connection by editing the Nginx config file.

Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Nginx config file:
Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Khatru29 Nginx config file:

```nginx title="relay_relayrunner_xyz.conf"
map $http_upgrade $connection_upgrade {
Expand Down
2 changes: 1 addition & 1 deletion docs/relays/nostr-rs-relay/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration

We're now going to discuss the nostr-rs-relay config file including how to set some of the settings as well as how to move the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.
We're now going to discuss the nostr-rs-relay config file including how to set some of the settings as well as how to copy the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.

## Config File

Expand Down
2 changes: 1 addition & 1 deletion docs/relays/nostr-rs-relay/websocket-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We're now going to set up the upstream WebSocket connection by editing the Nginx config file.

Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Nginx config file:
Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your nostr-rs-relay Nginx config file:

```nginx title="relay_relayrunner_xyz.conf"
map $http_upgrade $connection_upgrade {
Expand Down
2 changes: 1 addition & 1 deletion docs/relays/strfry/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration

We're now going to discuss the strfry config file including how to set some of the settings as well as how to move the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.
We're now going to discuss the strfry config file including how to set some of the settings as well as how to copy the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.

## Config File

Expand Down
2 changes: 1 addition & 1 deletion docs/relays/strfry/websocket-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We're now going to set up the upstream WebSocket connection by editing the Nginx config file.

Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your Nginx config file:
Replace the contents of `/etc/nginx/conf.d/relay_relayrunner_xyz.conf` with the following configuration where `relay_relayrunner_xyz.conf` should be replaced by whatever name you used for your strfry Nginx config file:

```nginx title="relay_relayrunner_xyz.conf"
map $http_upgrade $connection_upgrade {
Expand Down
4 changes: 2 additions & 2 deletions docs/relays/strfry29/configuration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Configuration

We're now going to discuss the strfry config file that we'll be using with strfry29. We'll go over how to set some of the settings as well as how to move the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.
We're now going to discuss the strfry config file that we'll be using with strfry29. We'll go over how to set some of the settings as well as how to copy the file to a config directory owned by the `nostr` user we previously created. We're also going to discuss how to create the data directory which will be owned by the `nostr` user.

Along with the strfry config file, we also have a `strfry29.json` file. This file contains settings specific to strfry29. We'll go over how to set the settings as well as how to move the file to the `/usr/local/bin` directory which is where the strfry29 binary is located. Currently, the strfry29 binary expects the `strfry29.json` file to be located in the same directory which is why we're moving it to the `/usr/local/bin` directory.
Along with the strfry config file, we also have a `strfry29.json` file. This file contains settings specific to strfry29. We'll go over how to set the settings as well as how to copy the file to the `/usr/local/bin` directory which is where the strfry29 binary is located. Currently, the strfry29 binary expects the `strfry29.json` file to be located in the same directory which is why we're moving it to the `/usr/local/bin` directory.

## Config File

Expand Down
162 changes: 161 additions & 1 deletion docs/relays/wot-relay/build.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,163 @@
# Build

🚧 Under Construction 🚧
We're now going to discuss how to build the [WoT Relay](https://github.com/bitvora/wot-relay "WoT Relay").

## Dependencies

Before building the binary, we need to install Go, Git, and build-essential.

To install build-essential run:

```bash
apt install build-essential
```

We need to install Git to be able to clone the WoT Relay repository:

```bash
apt install git
```

We're now going to discuss how to install Go on your relay.

First, you need to determine which version of Go you want to install which you can do by going to the [All releases](https://go.dev/dl "All releases") page on the Go website.

Make sure to choose the appropriate download file for your relay's operating system (OS) and architecture. Since we're using Debian with an AMD processor, we're going to download the `linux-amd64` file.

At the time of writing the current version of Go is `1.23.2`, so we'll be downloading the `go1.23.2.linux-amd64.tar.gz` file.

We'll be downloading the file to the `/tmp` directory which is cleared when the system reboots. We’ll be downloading the file here because we won’t need this file after the installation process is completed.

Since we're using a headless server, we can use the `wget` command to download Go:

```bash
wget -P /tmp https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
```

Be sure to replace `go1.23.2.linux-amd64.tar.gz` with whatever version of Go you're downloading and with whatever architecture you're using.

Before extracting the contents of the file, be sure to first remove any previously installed version of Go:

```bash
rm -rf /usr/local/go
```

You can now extract the contents of the file into the `/usr/local` directory:

```bash
tar -C /usr/local -xzf /tmp/go1.23.2.linux-amd64.tar.gz
```

Be sure to not extract the contents into an already existing `/usr/local/go` directory since this can break the Go installation.

After successfully extracting the contents, you should see a `go` directory in the `/usr/local` directory:

```bash
ls /usr/local
```

You can now add `/usr/local/go/bin` to the `PATH` environment variable by adding `export PATH=$PATH:/usr/local/go/bin` to your `$HOME/.bashrc` file.

First open the file with a text editor of your choice, e.g., `nano`:

```bash
nano $HOME/.bashrc
```

Then add the following to the end of the file:

```bash
export PATH=$PATH:/usr/local/go/bin
```

Save the changes made to the `.bashrc` file and exit the editor.

The changes may not take effect until after you log back into the server.

To apply the changes immediately run:

```bash
source $HOME/.bashrc
```

Verify the installation was successful by running:

```bash
go version
```

The command should output:

```bash
go version go1.23.2 linux/amd64
```

## Clone the Repository

We'll be downloading the repository to the `$HOME` directory.

Navigate to the `$HOME` directory:

```bash
cd $HOME
```

We're now ready to clone the WoT Relay repository:

```bash
git clone https://github.com/bitvora/wot-relay.git
```

After cloning the repository, navigate to the `wot-relay` directory:

```bash
cd wot-relay
```

You can use the repository to update the WoT Relay, so we're going to keep the repository on the relay.

## Build WoT Relay

We're now ready to build the WoT Relay:

```bash
go build -ldflags "-X main.version=$(git describe --tags --always)"
```

The compilation could take a while depending on your server's specs, so be patient while the binary is being built.

When the compilation is finished the binary will be located in the `wot-relay` directory.

You can list out the contents of that directory to see the binary:

```bash
ls
```

You should see the binary file which should be named `wot-relay`.

## Version

At the time of writing, the latest version of the WoT Relay is `v0.1.13` which is what the rest of the guide is currently based on.

## Run Binary

You can now run the binary:

```bash
RELAY_NAME="Relay Runner's WoT Relay" RELAY_PUBKEY="3bcbb0f7dea9da9f5b2659ca5da89d5e576215de3885e51bd2474dd1b0c44b16" RELAY_DESCRIPTION="Only notes in relayrunner WoT" RELAY_URL="wss://relay.relayrunner.xyz" DB_PATH="db" INDEX_PATH="templates/index.html" STATIC_PATH="templates/static" ARCHIVAL_SYNC="FALSE" ARCHIVE_REACTIONS="FALSE" ./wot-relay
```

Be sure to replace the values of the following:

- `RELAY_NAME` with the name you're going to use with your relay

- `RELAY_PUBKEY` with the pubkey you're using with your relay

- `RELAY_DESCRIPTION` with the description you're going to use with your relay

- `RELAY_URL` with the domain name of your server prefixed by `wss` if you set up an SSL/TLS certificate or `ws` if you didn't set up a certificate

The Wot Relay should now be listening on `localhost:3334`. A relay database will be created in your current directory called `db`.

To stop the relay press `Ctrl+C`.
Loading

0 comments on commit 9c958e1

Please sign in to comment.