# Running Sentinel dVPN Node ## Prerequisites ### System Requirements - **RAM**: Minimum 1GB (2GB recommended) - **CPU**: Minimum 2GHz - **Disk Space**: Minimum 10GB free space - **Operating System**: Ubuntu 20.04+ (preferred), other Linux distributions supported - **Network**: Public IP address required for node operation ### Important Notes - Ensure your firewall allows the necessary ports - You'll need $P2P coins for node registration and operation - Basic command line knowledge is recommended ## Installation ### Update System and Install Dependencies ```bash # Update package manager sudo apt update && sudo apt upgrade -y # Install required packages sudo apt install -y curl git golang-github-pelletier-go-toml jq make ``` ### Install Docker ```bash # Download and install Docker curl -fsSL https://get.docker.com -o "${HOME}/get-docker.sh" sudo sh "${HOME}/get-docker.sh" # Add current user to docker group (optional, to run docker without sudo) sudo usermod -aG docker "${USER}" # Start and enable Docker service sudo systemctl start docker sudo systemctl enable docker ``` **Note**: Log out and back in for group changes to take effect, or use `newgrp docker`. ## Build the Docker Image ### Clone and Build from Source ```bash # Clone the repository git clone https://github.com/sentinel-official/sentinel-dvpnx.git "${HOME}/sentinel-dvpnx" # Navigate to directory and checkout development branch cd "${HOME}/sentinel-dvpnx/" git checkout development # Build the Docker image make build-image ``` **Verification**: Run `docker images | grep sentinel-dvpnx` to confirm the image was built successfully. ## Configuration ### Set Variables ```bash # Define application directory APP_DIR="${HOME}/.sentinel-dvpnx" # Get your public IP addresses MY_IPv4_ADDR=$(dig -4 +short A myip.opendns.com @resolver1.opendns.com 2>/dev/null) MY_IPv6_ADDR=$(dig -6 +short AAAA myip.opendns.com @resolver1.opendns.com 2>/dev/null) REMOTE_ADDRS_FLAGS=() if [ -n "${MY_IPv4_ADDR}" ]; then REMOTE_ADDRS_FLAGS+=("--node.remote-addrs" \"${MY_IPv4_ADDR}\"); fi if [ -n "${MY_IPv6_ADDR}" ]; then REMOTE_ADDRS_FLAGS+=("--node.remote-addrs" \"${MY_IPv6_ADDR}\"); fi # Set Docker volume mapping VOLUME="${APP_DIR}:/root/.sentinel-dvpnx" # Set key name for transactions TX_FROM_NAME="key-1" # Display configuration for verification echo "App Directory: $APP_DIR" echo "Public IPv4: $MY_IPv4_ADDR" echo "Public IPv6: $MY_IPv6_ADDR" echo "Key Name: $TX_FROM_NAME" ``` ### Initialize Configuration ```bash # Create initial configuration sudo docker run \ --rm \ --volume "${VOLUME}" \ sentinel-dvpnx init \ --keyring.backend "test" \ --node.interval-session-usage-sync-with-blockchain "540s" \ --node.interval-session-validate "60s" \ --node.interval-status-update "240s" \ --node.service-type "wireguard" \ --rpc.addrs "https://rpc-bluenet.sentinel.co:443" \ --rpc.chain-id "bluenet-2-2" \ --tx.from-name "${TX_FROM_NAME}" \ "${REMOTE_ADDRS_FLAGS[@]}" ``` ### Configuration Files The initialization creates several configuration files that you can customize: #### Main App Configuration - `${APP_DIR}/config.toml` ([template](https://github.com/sentinel-official/sentinel-dvpnx/blob/development/config/config.toml.tmpl)) #### Service-Specific Configurations - **OpenVPN**: `${APP_DIR}/openvpn/config.toml` ([template](https://github.com/sentinel-official/sentinel-go-sdk/blob/development/openvpn/server_config.toml.tmpl)) - **V2Ray**: `${APP_DIR}/v2ray/config.toml` ([template](https://github.com/sentinel-official/sentinel-go-sdk/blob/development/v2ray/server_config.toml.tmpl)) - **WireGuard**: `${APP_DIR}/wireguard/config.toml` ([template](https://github.com/sentinel-official/sentinel-go-sdk/blob/development/wireguard/server_config.toml.tmpl)) ### Create Wallet Key ```bash # Add a new wallet key (you'll be prompted to create a passphrase) sudo docker run \ --rm \ --volume "${VOLUME}" \ --interactive \ --tty \ sentinel-dvpnx keys add "${TX_FROM_NAME}" ``` **Important**: - Save the mnemonic phrase securely - Remember your passphrase ### Fund Your Wallet - Transfer $P2P coins to your wallet address - Minimum balance required for node registration and operation ## Starting the Node ### Configure Port Mapping ```bash # Automatically detect and configure required ports PUBLISH_PORT_ARGS=$(find "${APP_DIR}" -name "config.toml" -exec tomljson {} \; | jq -sr '[.[] | .. | objects | to_entries[] | select(.key == "port" or (.key | endswith("_port"))) | .value] | flatten | unique | map("-p \(.):\(.)/tcp -p \(.):\(.)/udp") | join(" ")') # Verify port configuration echo "Port arguments: $PUBLISH_PORT_ARGS" ``` ### Run the Container ```bash docker run \ --rm \ --cap-drop ALL \ --cap-add NET_ADMIN \ --cap-add NET_RAW \ --cap-add SYS_MODULE \ --device /dev/net/tun \ --sysctl net.ipv4.ip_forward=1 \ --sysctl net.ipv6.conf.all.disable_ipv6=0 \ --sysctl net.ipv6.conf.all.forwarding=1 \ --sysctl net.ipv6.conf.default.forwarding=1 \ --volume "${VOLUME}" \ --name "dvpnx" \ --interactive \ --tty \ --sig-proxy=false \ ${PUBLISH_PORT_ARGS} \ sentinel-dvpnx start ``` ## Post-Setup Tasks ### Monitor Node Status ```bash # Check container logs docker logs dvpnx ``` ## Troubleshooting ### Common Issues 1. **Port conflicts**: Ensure required ports are not in use by other services 2. **Docker permissions**: Run docker commands with `sudo` or add user to docker group 3. **Network connectivity**: Verify your public IP is accessible and firewall rules allow traffic 4. **Insufficient funds**: Ensure wallet has enough $P2P coins ### Useful Commands ```bash # Stop the node docker stop dvpnx ``` ## Support Resources - **Community**: Join Sentinel [Telegram](https://t.me/SentinelNodeNetwork) for support
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up