Skip to content

Commit a75413b

Browse files
authored
Fix Troubleshooting page & broken links (#37)
* Add configure_caddy.md to docs * Fix indentation in Troubleshooting; Fix links; Add abbreviations to Core (CCN) and Compute (CRN) directories for recognizability * Clarify supervisor restart command
1 parent 7a8b9a3 commit a75413b

File tree

16 files changed

+191
-43
lines changed

16 files changed

+191
-43
lines changed

docs/computing/volumes/persistent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Persistent volumes are logical block disks that are attached to virtual machines running programs
44
in [on-demand](../on_demand.md) or [persistent](../persistent.md) execution modes. They are typically used to store
55
mutable data such as databases and persist data. Currently, persistent volumes are only stored on
6-
the [Compute Resource Node](../../nodes/compute/index.md) (CRN) that is executing the program. Automatic backups and restoration
6+
the [Compute Resource Node](../../nodes/Compute_(CRN)/index.md) (CRN) that is executing the program. Automatic backups and restoration
77
in case of failure of the CRN is a feature that is planned to be added in the future, and is currently left to the user.
88

99
A persistent volume has the following properties:

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ information, resources, and tools to get started with the Aleph.im project.
88
- Read the [Overview](./overview.md) to understand what Aleph.im is and how it works.
99
- Use our [Python](./libraries/python.md) and [Typescript](./libraries/typescript.md) SDKs.
1010
- Follow a [Tutorial to run Python code on aleph.im](guides/python/getting_started.md).
11-
- Become part of the network by managing a [Core Channel Node](nodes/core/index.md) or a [Compute Resource Node](nodes/compute/index.md).
12-
- Trouble setting up your node? Check out our [Troubleshooting Guide](nodes/compute/troubleshooting.md).
11+
- Become part of the network by managing a [Core Channel Node](nodes/Core_(CCN)/index.md) or a [Compute Resource Node](nodes/Compute_(CRN)/index.md).
12+
- Trouble setting up your node? Check out our [Troubleshooting Guide](nodes/Compute_(CRN)/troubleshooting.md).
1313
- Chat on our [Telegram group](https://t.me/alephim).
1414
- Engage on our [Discourse Channel](https://community.aleph.im/)
File renamed without changes.

docs/nodes/compute/installation/Debian-11.md renamed to docs/nodes/Compute_(CRN)/installation/Debian-11.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For production using official Debian packages.
66

77
## 1. Requirements
88

9-
- A [supported Linux server](../src/aleph/vm/orchestrator/README.md#1-supported-platforms)
9+
- A [supported Linux server](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator#1-supported-platforms)
1010
- A public domain name from a registrar and top level domain you trust.
1111

1212
In order to run an official Aleph.im Compute Resource Node (CRN), you will also need the following resources:
@@ -26,15 +26,15 @@ You will need a public domain name with access to add TXT and wildcard records.
2626

2727
Run the following commands as `root`:
2828

29-
First install the [VM-Connector](../vm_connector/README.md) using Docker:
29+
First install the [VM-Connector](https://github.com/aleph-im/aleph-vm/tree/main/vm_connector) using Docker:
3030
```shell
3131
apt update
3232
apt upgrade
3333
apt install -y docker.io apparmor-profiles
3434
docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha
3535
```
3636

37-
Then install the [VM-Supervisor](../src/aleph/vm/orchestrator/README.md) using the official Debian package.
37+
Then install the [VM-Supervisor](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator) using the official Debian package.
3838
The procedure is similar for updates.
3939
```shell
4040
wget -P /opt https://github.com/aleph-im/aleph-vm/releases/download/0.3.0/aleph-vm.debian-11.deb
@@ -99,7 +99,7 @@ HTTPS/TLS certificates on time.
9999

100100
First, create a domain name that points to the server on IPv4 (A) and IPv6 (AAAA).
101101

102-
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](CONFIGURE_CADDY.md).
102+
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](configure_caddy.md).
103103

104104
Again, run these commands as `root`:
105105
```shell

docs/nodes/compute/installation/Debian-12.md renamed to docs/nodes/Compute_(CRN)/installation/Debian-12.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For production using official Debian packages.
66

77
## 1. Requirements
88

9-
- A [supported Linux server](../src/aleph/vm/orchestrator/README.md#1-supported-platforms)
9+
- A [supported Linux server](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator#1-supported-platforms)
1010
- A public domain name from a registrar and top level domain you trust.
1111

1212
In order to run an official Aleph.im Compute Resource Node (CRN), you will also need the following resources:
@@ -26,15 +26,15 @@ You will need a public domain name with access to add TXT and wildcard records.
2626

2727
Run the following commands as `root`:
2828

29-
First install the [VM-Connector](../vm_connector/README.md) using Docker:
29+
First install the [VM-Connector](https://github.com/aleph-im/aleph-vm/tree/main/vm_connector) using Docker:
3030
```shell
3131
apt update
3232
apt upgrade
3333
apt install -y docker.io apparmor-profiles
3434
docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha
3535
```
3636

37-
Then install the [VM-Supervisor](../src/aleph/vm/orchestrator/README.md) using the official Debian package.
37+
Then install the [VM-Supervisor](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator) using the official Debian package.
3838
The procedure is similar for updates.
3939
```shell
4040
wget -P /opt https://github.com/aleph-im/aleph-vm/releases/download/0.3.0/aleph-vm.debian-12.deb
@@ -100,7 +100,7 @@ HTTPS/TLS certificates on time.
100100

101101
First, create a domain name that points to the server on IPv4 (A) and IPv6 (AAAA).
102102

103-
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](CONFIGURE_CADDY.md).
103+
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](configure_caddy.md).
104104

105105
Again, run these commands as `root`:
106106
```shell

docs/nodes/compute/installation/Ubuntu-22.04.md renamed to docs/nodes/Compute_(CRN)/installation/Ubuntu-22.04.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For production using official Debian packages.
66

77
## 1. Requirements
88

9-
- A [supported Linux server](../src/aleph/vm/orchestrator/README.md#1-supported-platforms)
9+
- A [supported Linux server](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator#1-supported-platforms)
1010
- A public domain name from a registrar and top level domain you trust.
1111

1212
In order to run an official Aleph.im Compute Resource Node (CRN), you will also need the following resources:
@@ -26,15 +26,15 @@ You will need a public domain name with access to add TXT and wildcard records.
2626

2727
Run the following commands:
2828

29-
First install the [VM-Connector](../vm_connector/README.md) using Docker:
29+
First install the [VM-Connector](https://github.com/aleph-im/aleph-vm/tree/main/vm_connector) using Docker:
3030
```shell
3131
sudo apt update
3232
sudo apt upgrade
3333
sudo apt install -y docker.io
3434
docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha
3535
```
3636

37-
Then install the [VM-Supervisor](../src/aleph/vm/orchestrator/README.md) using the official Debian package.
37+
Then install the [VM-Supervisor](https://github.com/aleph-im/aleph-vm/tree/main/src/aleph/vm/orchestrator) using the official Debian package.
3838
The procedure is similar for updates.
3939
```shell
4040
sudo wget -P /opt https://github.com/aleph-im/aleph-vm/releases/download/0.3.0/aleph-vm.ubuntu-22.04.deb
@@ -101,7 +101,7 @@ HTTPS/TLS certificates on time.
101101

102102
First, create a domain name that points to the server on IPv4 (A) and IPv6 (AAAA).
103103

104-
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](CONFIGURE_CADDY.md).
104+
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](configure_caddy.md).
105105

106106
Again, run these commands as `root`:
107107
```shell
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Caddy Reverse-proxy for Aleph-VM
2+
3+
A reverse-proxy is required for production use. It allows:
4+
5+
- A different domain name for each VM function
6+
- Secure connections using HTTPS
7+
- Load balancing between multiple servers
8+
9+
Using a different domain name for each VM function is important when running web applications,
10+
both for security and usability purposes.
11+
12+
The VM Supervisor supports using domains in the form `https://identifer.vm.yourdomain.org`, where
13+
_identifier_ is the identifier/hash of the message describing the VM function and `yourdomain.org`
14+
represents your domain name.
15+
16+
## 1. Wildcard certificates
17+
18+
A wildcard certificate is recommended to allow any subdomain of your domain to work.
19+
20+
You can create one using [Let's Encrypt](https://letsencrypt.org/) and
21+
[Certbot](https://certbot.eff.org/) with the following instructions.
22+
23+
```shell
24+
sudo apt install -y certbot
25+
26+
certbot certonly --manual --email [email protected] --preferred-challenges dns \
27+
--server https://acme-v02.api.letsencrypt.org/directory --agree-tos \
28+
-d 'vm.yourdomain.org,*.vm.yourdomain.org'
29+
```
30+
31+
## 2. Caddy Server
32+
33+
In this documentation, we will install the modern [Caddy](https://caddyserver.com/) reverse-proxy.
34+
35+
Replace `vm.yourdomain.org` with your domain of choice.
36+
37+
To install on Debian/Ubuntu, according to the
38+
[official instructions](https://caddyserver.com/docs/install#debian-ubuntu-raspbian):
39+
```shell
40+
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
41+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
42+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
43+
sudo apt update
44+
sudo apt install caddy
45+
```
46+
47+
Then give Caddy access to the certificates generated by Certbot:
48+
```shell
49+
chmod 750 /etc/letsencrypt/live/
50+
chmod 750 /etc/letsencrypt/archive/
51+
chmod 640 /etc/letsencrypt/archive/vm.yourdomain.org/privkey1.pem
52+
chgrp -R caddy /etc/letsencrypt/archive/
53+
chgrp -R caddy /etc/letsencrypt/live/
54+
```
55+
56+
Configure Caddy:
57+
```shell
58+
cat >/etc/caddy/Caddyfile <<EOL
59+
60+
vm.yourdomain.org:443 {
61+
tls /etc/letsencrypt/live/vm.yourdomain.org/fullchain.pem /etc/letsencrypt/live/vm.yourdomain.org/privkey.pem
62+
reverse_proxy http://127.0.0.1:4020 {
63+
# Forward Host header to the backend
64+
header_up Host {host}
65+
}
66+
}
67+
68+
*.vm.yourdomain.org:443 {
69+
tls /etc/letsencrypt/live/vm.yourdomain.org/fullchain.pem /etc/letsencrypt/live/vm.yourdomain.org/privkey.pem
70+
reverse_proxy http://127.0.0.1:4020 {
71+
# Forward Host header to the backend
72+
header_up Host {host}
73+
}
74+
}
75+
EOL
76+
```
77+
78+
Optionally, you can allow users to host their website using their own domains using the following
79+
configuration. Be careful about rate limits if you enable `on_demand` TLS,
80+
see the [Caddy documentation on On-Demand TLS](https://caddyserver.com/docs/automatic-https#on-demand-tls).
81+
```shell
82+
cat >/etc/caddy/Caddyfile <<EOL
83+
{
84+
on_demand_tls {
85+
interval 60s
86+
burst 5
87+
}
88+
}
89+
90+
91+
vm.yourdomain.org:443 {
92+
tls /etc/letsencrypt/live/vm.yourdomain.org/fullchain.pem /etc/letsencrypt/live/vm.yourdomain.org/privkey.pem
93+
reverse_proxy http://127.0.0.1:4020 {
94+
header_up Host {host}
95+
}
96+
}
97+
98+
*.vm.yourdomain.org:443 {
99+
tls /etc/letsencrypt/live/vm.yourdomain.org/fullchain.pem /etc/letsencrypt/live/vm.yourdomain.org/privkey.pem
100+
reverse_proxy http://127.0.0.1:4020 {
101+
# Forward Host header to the backend
102+
header_up Host {host}
103+
}
104+
}
105+
106+
*:443 {
107+
tls {
108+
on_demand
109+
}
110+
reverse_proxy http://127.0.0.1:4020 {
111+
# Forward Host header to the backend
112+
header_up Host {host}
113+
}
114+
}
115+
EOL
116+
```
117+
118+
Finally, restard Caddy:
119+
```shell
120+
sudo systemctl restart caddy

docs/nodes/compute/troubleshooting.md renamed to docs/nodes/Compute_(CRN)/troubleshooting.md

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,25 @@ After setting up a CRN, users may encounter a `404: Invalid message reference` e
1616
- The hostname might not be correctly configured in the aleph-vm settings.
1717

1818
### Troubleshooting Steps
19+
1920
1. **Recheck SSL Configuration:**
20-
- Confirm that SSL certificates are correctly installed and configured.
21-
- Review the SSL configuration in the web server (e.g., Caddy, Nginx) to ensure it's correctly pointing to the intended ports with the right certificate paths.
21+
- Confirm that SSL certificates are correctly installed and configured.
22+
- Review the SSL configuration in the web server (e.g., Caddy, Nginx) to ensure it's correctly pointing to the intended ports with the right certificate paths.
23+
2224
2. **Configure Hostname Correctly:**
23-
- Ensure the hostname is properly configured as per the [CRN installation guide](./installation/Debian-11.md#2-installation).
24-
- Make sure the domain name in the supervisor.env file matches the domain used in your SSL configuration.
25+
26+
- Ensure the hostname is properly configured as per the [CRN installation guide](./installation/Debian-11.md#2-installation).
27+
- Make sure the domain name in the supervisor.env file matches the domain used in your SSL configuration.
28+
2529
3. **Restart Services:**
26-
- After updating the hostname, restart the relevant services to apply the changes.
27-
- This may include restarting the Docker container and the web server service.
30+
31+
- After updating the hostname, restart the relevant services to apply the changes.
32+
- This may include restarting the Docker container and the web server service.
33+
2834
4. **Review Log Files:**
29-
- If the problem still persists, check the log files of both the Docker container and the web server for any specific error messages related to SSL or hostname configurations.
35+
36+
- If the problem still persists, check the log files of both the Docker container and the web server for any specific error messages related to SSL or hostname configurations.
37+
3038

3139
## 2) SQUASHFS Errors in Diagnostic VM
3240
### Issue Summary
@@ -47,13 +55,22 @@ The runtime of the new diagnostic VM appears to be improperly downloaded or corr
4755
### Troubleshooting Steps
4856

4957
1. **Clear Cache**: Remove the cache of the problematic file using the diagnostic VM hash. This can be done by deleting the file located at `/var/cache/aleph/runtime/$RUNTIME_HASH`.
50-
- Navigate to the cache directory: `cd /var/cache/aleph/runtime/`.
51-
- Locate the file with the corresponding `$RUNTIME_HASH`.
52-
- Remove the file: `sudo rm -f $RUNTIME_HASH`.
58+
59+
- Navigate to the cache directory: `cd /var/cache/aleph/vm/runtime/`.
60+
- Locate the file with the corresponding `$RUNTIME_HASH`.
61+
- Remove the file:
62+
```shell
63+
sudo rm -f $RUNTIME_HASH
64+
```
65+
5366
2. **Restart Supervisor**: After deleting the problematic file, restart the supervisor system. This should trigger the re-download of the runtime file.
54-
- Restart the supervisor: `sudo systemctl restart supervisor` (or the equivalent command for your system).
67+
68+
- Restart the supervisor: `sudo systemctl restart supervisor` (or `aleph-vm-supervisor.service` when installing from source).
69+
5570
3. **Re-download**: Upon restart, the system will automatically attempt to re-download the runtime, replacing the corrupted file.
56-
- If the problem persists, further investigation into network stability or hardware integrity may be necessary.
71+
72+
- If the problem persists, further investigation into network stability or hardware integrity may be necessary.
73+
5774

5875
## 3) Missing Diagnostic VM Metrics
5976
### Issue Summary
@@ -79,25 +96,30 @@ Check that both work on your node, on an URL similar to
7996
### Troubleshooting Steps
8097

8198
1. **Upgrade Node Software:**
99+
82100
- Ensure the node is running the latest CRN version.
83101

84102
2. **Disable IPv6 Forwarding:**
103+
85104
- If upgrading does not resolve the issue, try disabling IPv6 forwarding:
86105
- Set `ALEPH_VM_IPV6_FORWARDING_ENABLED=False` in `/etc/aleph-vm/supervisor.env`.
87106
- Manually check if IPv6 forwarding is still active:
88107
```shell
89108
cat /proc/sys/net/ipv6/conf/all/forwarding
90109
```
91-
If the output is 1, disable it with:
110+
If the output is 1, disable it with:
92111
```shell
93112
echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
94113
```
95114

96115
3. **Clear Cache:**
97-
See [SQUASHFS Errors in running diagnostic VM](#squashfs-errors-in-running-diagnostic-vm).
116+
117+
- See [SQUASHFS Errors in running diagnostic VM](#squashfs-errors-in-running-diagnostic-vm).
118+
98119
4. **Contact Cloud Provider:**
120+
99121
- If the issue persists, ask your Cloud Provider:
100-
- "I tried to enable IPv6 forwarding on my server. This makes my machine unreachable over IPv6. Why is that?"
122+
"I tried to enable IPv6 forwarding on my server. This makes my machine unreachable over IPv6. Why is that?"
101123

102124

103125
## 4) IPv6 Unreachable
@@ -117,9 +139,11 @@ When using IPv6 on a node, the network is unreachable.
117139

118140
### Troubleshooting Steps
119141
1. **Check IPv6 Configuration:**
142+
120143
- Ensure that IPv6 is enabled on the network interface.
121144
- Verify that the IPv6 address is correctly assigned to the interface.
122145
- Confirm that the gateway for IPv6 is set up correctly.
146+
123147
2. **Review Netplan Configuration (for Ubuntu systems):**
124148

125149
- Open the Netplan configuration file located typically at /etc/netplan/*.yaml.
@@ -138,9 +162,13 @@ When using IPv6 on a node, the network is unreachable.
138162
nameservers:
139163
addresses: ["2001:4860:4860::8888", "2001:4860:4860::8844"]
140164
```
141-
After making changes, apply them with `sudo netplan apply`.
142-
3. **Check Network Interface:**
165+
After making changes, apply them with `sudo netplan apply`.
166+
167+
3. **Check Network Interface:**
168+
143169
- Use `ip -6 addr show` to check if the IPv6 address is assigned to the network interface.
144170
- Use `ip -6 route show` to verify the default route for IPv6.
171+
145172
4. **Test Network Connectivity:**
173+
146174
- Use `ping6` to ping the local IPv6 gateway or known IPv6 addresses like Google's DNS `2001:4860:4860::8888` to test connectivity.
File renamed without changes.
File renamed without changes.

docs/nodes/reliability/rewards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Node operators and stakers receive rewards for contributing to the aleph.im netw
44

55
## Core Channel Nodes
66

7-
A [Core Channel Node](../core/index.md) (CCN) is active when it is registered on the [aleph.im account page](
7+
A [Core Channel Node](../Core_(CCN)/index.md) (CCN) is active when it is registered on the [aleph.im account page](
88
https://account.aleph.im), has enough ALEPH token staked on it and has a [score](scores.md) non null.
99

1010
The performance score of a CCN affects the rewards distributed to the operator and stakers of the node the following way:
@@ -14,7 +14,7 @@ The performance score of a CCN affects the rewards distributed to the operator a
1414
- The complete reward is distributed when the score is equal to or greater than 80%
1515

1616
The second factor that affects the rewards of a CCN is its linking to
17-
[Compute Resource Nodes](../compute/index.md) (CRN). A CCN can have up to 3 CRNs linked to it, and a the CCN
17+
[Compute Resource Nodes](../Compute_(CRN)/index.md) (CRN). A CCN can have up to 3 CRNs linked to it, and a the CCN
1818
will incur a penalty of 10% of the rewards for each spot unfilled or filled with a defaulting CRN (score of 0).
1919

2020
The rewards distributed does not depend on the score of other nodes in the network. Less token from the pool

0 commit comments

Comments
 (0)