mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-05-02 06:36:22 -04:00
add vps scripts for reference
This commit is contained in:
parent
a47290bac7
commit
280ed484e7
11 changed files with 222 additions and 2 deletions
1
scripts/deployment/haveno-pricenode.env
Normal file
1
scripts/deployment/haveno-pricenode.env
Normal file
|
@ -0,0 +1 @@
|
|||
JAVA_OPTS="-XX:+ExitOnOutOfMemoryError"
|
22
scripts/deployment/haveno-pricenode.service
Normal file
22
scripts/deployment/haveno-pricenode.service
Normal file
|
@ -0,0 +1,22 @@
|
|||
[Unit]
|
||||
Description=Haveno Price Node
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
SyslogIdentifier=haveno-pricenode
|
||||
EnvironmentFile=/etc/default/haveno-pricenode.env
|
||||
ExecStart=/home/haveno-pricenode/haveno-pricenode/haveno-pricenode 2
|
||||
ExecStop=/bin/kill -TERM ${MAINPID}
|
||||
Restart=on-failure
|
||||
|
||||
User=haveno-pricenode
|
||||
Group=haveno-pricenode
|
||||
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
MemoryDenyWriteExecute=false
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
36
scripts/deployment/haveno-seednode.service
Normal file
36
scripts/deployment/haveno-seednode.service
Normal file
|
@ -0,0 +1,36 @@
|
|||
[Unit]
|
||||
Description=Haveno seednode
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=haveno
|
||||
Group=haveno
|
||||
SyslogIdentifier=Haveno-Seednode
|
||||
|
||||
ExecStart=/bin/sh /home/haveno/haveno/haveno-seednode --baseCurrencyNetwork=XMR_STAGENET\
|
||||
--useLocalhostForP2P=false\
|
||||
--useDevPrivilegeKeys=false\
|
||||
--nodePort=2002\
|
||||
--appName=haveno-XMR_STAGENET_Seed_2002\
|
||||
# --logLevel=trace\
|
||||
--xmrNode=http://127.0.0.1:38088\
|
||||
--xmrNodeUsername=admin\
|
||||
--xmrNodePassword=password
|
||||
|
||||
ExecStop=/bin/kill ${MAINPID}
|
||||
Restart=always
|
||||
|
||||
# Hardening
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
MemoryDenyWriteExecute=false
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
# limit memory usage to 2gb
|
||||
LimitRSS=2000000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
36
scripts/deployment/haveno-seednode2.service
Normal file
36
scripts/deployment/haveno-seednode2.service
Normal file
|
@ -0,0 +1,36 @@
|
|||
[Unit]
|
||||
Description=Haveno seednode 2
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=haveno
|
||||
Group=haveno
|
||||
SyslogIdentifier=Haveno-Seednode2
|
||||
|
||||
ExecStart=/bin/sh /home/haveno/haveno/haveno-seednode --baseCurrencyNetwork=XMR_STAGENET\
|
||||
--useLocalhostForP2P=false\
|
||||
--useDevPrivilegeKeys=false\
|
||||
--nodePort=3003\
|
||||
--appName=haveno-XMR_STAGENET_Seed_3003\
|
||||
# --logLevel=trace\
|
||||
--xmrNode=http://127.0.0.1:38088\
|
||||
--xmrNodeUsername=admin\
|
||||
--xmrNodePassword=password
|
||||
|
||||
ExecStop=/bin/kill ${MAINPID}
|
||||
Restart=always
|
||||
|
||||
# Hardening
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
MemoryDenyWriteExecute=false
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
# limit memory usage to 2gb
|
||||
LimitRSS=2000000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
26
scripts/deployment/monero-stagenet.service
Normal file
26
scripts/deployment/monero-stagenet.service
Normal file
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=Monero stagenet node
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=monero-stagenet
|
||||
Group=monero-stagenet
|
||||
Type=simple
|
||||
ExecStart=/home/monero-stagenet/monerod --config-file /home/monero-stagenet/shared-stagenet.conf --non-interactive
|
||||
SyslogIdentifier=stagenet-node
|
||||
Restart=always
|
||||
|
||||
# Hardening
|
||||
PrivateTmp=true
|
||||
#ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
MemoryDenyWriteExecute=false
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
# limit memory usage to 4gb
|
||||
LimitRSS=4000000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
20
scripts/deployment/private-stagenet.conf
Normal file
20
scripts/deployment/private-stagenet.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
stagenet=1
|
||||
data-dir=/home/monero-stagenet/private-stagenet/
|
||||
log-file=/home/monero-stagenet/logs/
|
||||
p2p-bind-ip=0.0.0.0
|
||||
p2p-bind-port=38079
|
||||
hide-my-port=1
|
||||
no-zmq=1
|
||||
|
||||
# RPC
|
||||
#rpc-bind-ip=136.244.105.131
|
||||
rpc-bind-ip=127.0.0.1
|
||||
rpc-bind-port=38088
|
||||
rpc-login=admin:password
|
||||
|
||||
confirm-external-bind=1
|
||||
restricted-rpc=0 # must be unrestricted for arbitrator
|
||||
no-igd=1
|
||||
|
||||
# second vps peer
|
||||
add-priority-node=45.63.8.26:38080
|
26
scripts/deployment/private-stagenet.service
Normal file
26
scripts/deployment/private-stagenet.service
Normal file
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=Private stagenet node
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=monero-stagenet
|
||||
Group=monero-stagenet
|
||||
Type=simple
|
||||
ExecStart=/home/monero-stagenet/monerod --config-file /home/monero-stagenet/private-stagenet.conf --non-interactive
|
||||
SyslogIdentifier=private-stagenet-node
|
||||
Restart=always
|
||||
|
||||
# Hardening
|
||||
PrivateTmp=true
|
||||
#ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
MemoryDenyWriteExecute=false
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
# limit memory usage to 4gb
|
||||
LimitRSS=4000000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
17
scripts/deployment/run-arbitrator-daemon.sh
Normal file
17
scripts/deployment/run-arbitrator-daemon.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Start arbitrator daemon on Monero's stagenet (Haveno testnet)
|
||||
|
||||
runArbitrator() {
|
||||
./haveno-daemon --baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=7777 \
|
||||
--appName=haveno-XMR_STAGENET_arbitrator \
|
||||
--xmrNode=http://127.0.0.1:38088 \
|
||||
--xmrNodeUsername=admin \
|
||||
--xmrNodePassword=password
|
||||
}
|
||||
|
||||
cd /home/haveno/haveno && \
|
||||
runArbitrator
|
17
scripts/deployment/run-arbitrator-gui.sh
Normal file
17
scripts/deployment/run-arbitrator-gui.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Start arbitrator GUI on Monero's stagenet (Haveno testnet)
|
||||
|
||||
runArbitrator() {
|
||||
./haveno-desktop --baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=7777 \
|
||||
--appName=haveno-XMR_STAGENET_arbitrator \
|
||||
--xmrNode=http://127.0.0.1:38088 \
|
||||
--xmrNodeUsername=admin \
|
||||
--xmrNodePassword=password
|
||||
}
|
||||
|
||||
cd /home/haveno/haveno && \
|
||||
runArbitrator
|
19
scripts/deployment/shared-stagenet.conf
Normal file
19
scripts/deployment/shared-stagenet.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
stagenet=1
|
||||
data-dir=/home/monero-stagenet/shared-stagenet/
|
||||
log-file=/home/monero-stagenet/logs/
|
||||
p2p-bind-ip=0.0.0.0
|
||||
p2p-bind-port=38080
|
||||
#hide-my-port=1
|
||||
no-zmq=1
|
||||
|
||||
# RPC
|
||||
#rpc-bind-ip=136.244.105.131
|
||||
rpc-bind-ip=0.0.0.0
|
||||
rpc-bind-port=38081
|
||||
|
||||
confirm-external-bind=1
|
||||
restricted-rpc=1
|
||||
no-igd=1
|
||||
|
||||
# second vps peer
|
||||
#add-peer=70.34.196.88:38080
|
Loading…
Add table
Add a link
Reference in a new issue