- this example assumes you are using e.g. ubuntu and is a simple and direct route.
- if you want to use this in production you should take care of better security measures!
sudo apt update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
rm get-docker.sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
git clone https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion.git proxy
cd proxy &&\
docker network create webproxy &&\
sh ./start.sh &&\
cd ..
NAME=MY-NODE-XYZ
IP=/dns/your.node-domain.io
PORT_P2P=30333
PORT_WSS=30334
PORT_RPC=9933
PORT_PRO=9615
DATA_DIR=~/.zero
DOMAINS=your.node-domain.io // your domain for this machine
PORT="9944"
[email protected] // your email
KEY="nodekey"
UID=0
GID=0
depending on the node purpose, you should review the node options and connectivity. the node will need a security policy / firewall:
80,443 -> webproxy
9933 -> rpc
9944 -> wss
30333 -> p2p
9615 -> prometheus
set a nodekey if you want a persistent p2p address, e.g. for bootnodes
version: "3"
services:
subzero:
image: playzero/subzero:latest
restart: unless-stopped
user: "$UID:$GID"
ports:
- "${PORT_P2P}:30333"
- "${PORT_WSS}:9944"
- "${PORT_RPC}:9933"
- "${PORT_PRO}:9615"
volumes:
- ${DATA_DIR}:/root/.local/share/subzero
command: [
"/usr/local/bin/subzero",
"--name", "${NAME}",
"--validator",
"--ws-external",
"--rpc-external",
"--rpc-cors", "all",
"--rpc-methods", "unsafe",
"--public-addr","${IP}",
"--telemetry-url", "wss://telemetry.polkadot.io/submit/ 5",
"--node-key", "${KEY}"
]
environment:
- VIRTUAL_HOST=${DOMAINS}
- VIRTUAL_PORT=9944
- LETSENCRYPT_HOST=${DOMAINS}
- LETSENCRYPT_EMAIL=${EMAIL}
networks:
default:
external:
name: webproxy
questions? ping me on github or ask in our discord https://discord.com/invite/rhwtr7p