-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
81 lines (63 loc) · 2.05 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
set -eux
sudo apt-get update
sudo apt-get install -y ufw
sudo apt-get install -y net-tools
sudo apt-get install -y lz4 # install lz4 for decompression
sudo apt-get install -y python3-pip
sudo ufw disable
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp # SSH access
sudo ufw allow 30303 # P2P
sudo ufw allow 9000 # Lighthouse P2P
sudo ufw allow 80 # HTTP
sudo ufw allow 443 # HTTPS
sudo ufw enable
sudo ufw status verbose
sudo netstat -tlnp
echo "Install reth"
wget https://github.com/paradigmxyz/reth/releases/download/v0.2.0-beta.5/reth-v0.2.0-beta.5-x86_64-unknown-linux-gnu.tar.gz
tar zxvf reth-v0.2.0-beta.5-x86_64-unknown-linux-gnu.tar.gz
rm reth-v0.2.0-beta.5-x86_64-unknown-linux-gnu.tar.gz
sudo mv reth /usr/local/bin/
sudo su <<EOF2
cat > /lib/systemd/system/reth.service << EOF
[Unit]
Description=Reth Full Node
After=network-online.target
Wants=network-online.target
[Service]
WorkingDirectory=/root
User=root
ExecStart=/usr/local/bin/reth node --http --http.api "admin,debug,eth,net,trace,txpool,web3,rpc"
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
EOF2
# sudo systemctl enable reth
# sudo systemctl start reth
echo "Install lighthouse"
wget https://github.com/sigp/lighthouse/releases/download/v5.1.3/lighthouse-v5.1.3-x86_64-unknown-linux-gnu.tar.gz
tar zxvf lighthouse-v5.1.3-x86_64-unknown-linux-gnu.tar.gz
rm lighthouse-v5.1.3-x86_64-unknown-linux-gnu.tar.gz
sudo mv lighthouse /usr/local/bin/
sudo su <<EOF2
cat > /lib/systemd/system/lighthouse.service << EOF
[Unit]
Description=Lighthouse consensus client
After=network-online.target
Wants=network-online.target
[Service]
WorkingDirectory=/root
User=root
ExecStart=/usr/local/bin/lighthouse bn --network mainnet --execution-endpoint http://localhost:8551 --execution-jwt /root/.local/share/reth/mainnet/jwt.hex --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
EOF2
# sudo systemctl enable lighthouse
# sudo systemctl start lighthouse