Skip to content

Commit a41ec4f

Browse files
committed
chore: add verification to the readme
1 parent e18d683 commit a41ec4f

File tree

1 file changed

+111
-14
lines changed

1 file changed

+111
-14
lines changed

README.md

+111-14
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
<img alt="Issues" src="https://img.shields.io/github/issues/nodetec/relaywizard?style=for-the-badge&logo=bilibili&color=F5E0DC&logoColor=D9E0EE&labelColor=302D41" />
1414
</a>
1515
<a href="https://github.com/nodetec/relaywizard">
16-
<img alt="Repo Size" src="https://img.shields.io/github/repo-size/nodetec/relaywizard?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
16+
<img alt="Repo size" src="https://img.shields.io/github/repo-size/nodetec/relaywizard?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
1717
</a>
1818
</div>
1919

2020
![0622](https://github.com/nodetec/relaywizard/assets/29136904/eb226b30-9250-43c6-ba2a-0361446d790b)
2121

22-
Relay Wizard is a cli tool that helps you bootstrap a [nostr](https://nostr.com/) relay.
22+
Relay Wizard is a CLI tool that helps you bootstrap a [Nostr](https://nostr.com/ "Nostr") relay.
2323

2424
The program will automate the following steps:
2525

26-
1. install necessary dependencies
27-
1. configuring nginx
28-
1. setting up a firewall
29-
1. obtaining a TLS certificate for HTTPS
30-
1. installing the relay software
31-
1. setting up a systemd service for your relay
26+
1. Install necessary dependencies
27+
2. Set up a firewall
28+
3. Configure nginx
29+
4. Obtain a TLS certificate for HTTPS
30+
5. Install the relay software
31+
6. Set up a systemd service for your relay
3232

3333
## Installation
3434

@@ -38,20 +38,117 @@ To install a relay, spin up a new Debian server, hook up a domain name, and run
3838
curl -sL https://relaywizard.com/install.sh | bash
3939
```
4040

41+
## Verification
42+
43+
If you prefer to manually verify the authenticity of the Relay Wizard binary before running it, then you can follow along with the verification process described here. This will minimize the possibility of the binary being compromised. To perform the verification you'll need to have `gnupg` and `curl` installed which are most likely already installed on your system, but if not here's how to install them on some operating systems:
44+
45+
### gnupg
46+
47+
#### Arch
48+
49+
```sh
50+
sudo pacman -S gnupg
51+
```
52+
53+
#### Debian/Ubuntu
54+
55+
```sh
56+
sudo apt install -y gnupg
57+
```
58+
59+
### curl
60+
61+
#### Arch
62+
63+
```sh
64+
sudo pacman -S curl
65+
```
66+
67+
#### Debian/Ubuntu
68+
69+
```sh
70+
sudo apt install -y curl
71+
```
72+
73+
Now you need to import the public key that signed the manifest file which you can do by running the following command:
74+
75+
```sh
76+
curl https://keybase.io/nodetec/pgp_keys.asc | gpg --import
77+
```
78+
79+
You're now ready to verify the manifest file. You will need to have the `rwz-x.x.x-manifest.sha512sum` and the `rwz-x.x.x-manifest.sha512sum.asc` files in the same directory as the Relay Wizard binary you downloaded where the `x.x.x` is replaced by whatever version of `rwz` you're verifying.
80+
81+
To verify the manifest file run the following command:
82+
83+
```sh
84+
gpg --verify rwz-x.x.x-manifest.sha512sum.asc
85+
```
86+
87+
Here's the command to run for the latest version of `rwz`:
88+
89+
```sh
90+
gpg --verify rwz-0.2.0-manifest.sha512sum.asc
91+
```
92+
93+
You should see output similar to the following if the verification was successful:
94+
95+
```sh
96+
gpg: assuming signed data in 'rwz-0.2.0-manifest.sha512sum'
97+
gpg: Signature made Mon Sep 16 21:07:19 2024 EDT
98+
gpg: using RSA key 252F57B9DCD920EBF14E6151A8841CC4D10CC288
99+
gpg: Good signature from "NODE-TEC Devs <[email protected]>" [unknown]
100+
gpg: aka "[jpeg image of size 5143]" [unknown]
101+
Primary key fingerprint: 04BD 8C20 598F A5FD DE19 BECD 8F24 69F7 1314 FAD7
102+
Subkey fingerprint: 252F 57B9 DCD9 20EB F14E 6151 A884 1CC4 D10C C288
103+
```
104+
105+
> Unless you tell GnuPG to trust the key, you'll see a warning similar to the following:
106+
107+
```sh
108+
gpg: WARNING: This key is not certified with a trusted signature!
109+
gpg: There is no indication that the signature belongs to the owner.
110+
```
111+
112+
This warning means that the key is not certified by another third party authority. If the downloaded file was a fake, then the signature verification process would fail and you would be warned that the fingerprints don't match.
113+
114+
When you get a warning like this it's also good practice to check the key against other sources, e.g., the [NODE-TEC Keybase](https://keybase.io/nodetec "NODE-TEC Keybase") or the [NODE-TEC GitHub](https://github.com/nodetec "NODE-TEC GitHub").
115+
116+
You have now verified the signature of the manifest file which ensures the integrity and authenticity of the file but not of the binary.
117+
118+
To verify the binary you'll need to recompute the SHA512 hash of the file, compare it with the corresponding hash in the manifest file, and ensure they match exactly which you can do by running the following command:
119+
120+
```sh
121+
sha512sum --check rwz-x.x.x-manifest.sha512sum
122+
```
123+
124+
Here's the command to run for the latest version of `rwz`:
125+
126+
```sh
127+
sha512sum --check rwz-0.2.0-manifest.sha512sum
128+
```
129+
130+
If the verification was successful you should see the output similar to the following:
131+
132+
```sh
133+
rwz-0.2.0-x86_64-linux-gnu.tar.gz: OK
134+
```
135+
136+
By completing the above steps you will have successfully verified the integrity of the binary.
137+
41138
## Learn more
42139

43-
If you want to learn more about how to setup a relay from scratch, check out [relayrunner.org](https://relayrunner.org)
140+
If you want to learn more about how to setup a relay from scratch, check out [Relay Runner](https://relayrunner.org "Relay Runner")
44141

45142
If you just want to know enough to get started, read the following sections to get a server, hook up a domain name and setup remote access:
46143

47-
- [Get a server](https://relayrunner.org/server/get-a-server)
144+
- [Get a server](https://relayrunner.org/server/get-a-server "Get a server")
48145

49-
- [Get a domain](https://relayrunner.org/server/domain-name)
146+
- [Get a domain](https://relayrunner.org/server/domain-name "Get a domain")
50147

51-
- [Remote access](https://relayrunner.org/server/remote-access)
148+
- [Remote access](https://relayrunner.org/server/remote-access "Remote access")
52149

53150
from here you should be able to run the installation command above and get started.
54151

55-
## Contributing
152+
## Contribute
56153

57-
If you want to contribute consider adding a new package manager and test the script out on another Linux Distro, I also have plans to support multiple relay implementation options.
154+
If you want to contribute consider adding a new package manager and testing the script out on another Linux Distro. You can also look into adding support for more relay implementations.

0 commit comments

Comments
 (0)