Skip to main content
This guide provides detailed instructions for installing and setting up a Stable node on various platforms.

Prerequisites

Before starting the installation, ensure you have:
  • Met all System Requirements
  • Root or sudo access to your server
  • Basic knowledge of Linux command line

Installation Method

Use the pre-compiled binaries for your platform. Building from source is not currently supported.

Linux AMD64

# Download the latest binary for AMD64 architecture
wget https://stable-testnet-data.s3.us-east-1.amazonaws.com/stabled-latest-linux-amd64-testnet.tar.gz

# Extract the archive
tar -xvzf stabled-0.8.1-testnet-linux-amd64.tar.gz

# Move binary to system path
sudo mv stabled /usr/bin/

# Verify installation
stabled version

Linux ARM64

# Download the binary for ARM64 architecture
wget https://stable-testnet-data.s3.us-east-1.amazonaws.com/stabled-latest-linux-arm64-testnet.tar.gz

# Extract and install
tar -xvzf stabled-0.8.1-testnet-linux-arm64.tar.gz
sudo mv stabled /usr/bin/

# Verify installation
stabled version

Node Initialization

After installing the binary, initialize your node:

Step 1: Set Node Name

# Set your node's moniker (choose a unique name)
export MONIKER="your-node-name"

Step 2: Initialize the Node

# Initialize with the correct chain ID (see Testnet Information for current chain ID)
stabled init $MONIKER --chain-id stabletestnet_2201-1

# This creates the configuration directory at ~/.stabled/
Note: For current network parameters including chain ID, see Testnet Information

Step 3: Download Genesis File

# Create backup of default genesis
mv ~/.stabled/config/genesis.json ~/.stabled/config/genesis.json.backup

# Download testnet genesis
wget https://stable-testnet-data.s3.us-east-1.amazonaws.com/stable_testnet_genesis.zip
unzip stable_testnet_genesis.zip

# Move genesis to config directory
cp genesis.json ~/.stabled/config/genesis.json

# Verify genesis checksum
sha256sum ~/.stabled/config/genesis.json
# Expected: 66afbb6e57e6faf019b3021de299125cddab61d433f28894db751252f5b8eaf2

Step 4: Configure Node

Download Configuration Files

# Download optimized configuration
wget https://stable-testnet-data.s3.us-east-1.amazonaws.com/rpc_node_config.zip
unzip rpcnode_config.zip

# Backup original config
cp ~/.stabled/config/config.toml ~/.stabled/config/config.toml.backup

# Apply new configuration
cp config.toml ~/.stabled/config/config.toml

# Update moniker in config
sed -i "s/^moniker = \".*\"/moniker = \"$MONIKER\"/" ~/.stabled/config/config.toml

Essential Configuration Updates

Edit ~/.stabled/config/app.toml:
# Enable JSON-RPC for EVM compatibility
[json-rpc]
enable = true
address = "0.0.0.0:8545"
ws-address = "0.0.0.0:8546"
allow-unprotected-txs = true
Edit ~/.stabled/config/config.toml:
# P2P Configuration
[p2p]
# Maximum number of peers
max_num_inbound_peers = 50
max_num_outbound_peers = 30

# Persistent peers (add stable seed nodes)
persistent_peers = "5ed0f977a26ccf290e184e364fb04e268ef16430@37.187.147.27:26656,128accd3e8ee379bfdf54560c21345451c7048c7@37.187.147.22:26656"

# Enable peer exchange
pex = true

# RPC Configuration
[rpc]
# Listen address
laddr = "tcp://0.0.0.0:26657"

# Maximum number of simultaneous connections
max_open_connections = 900

# CORS settings (adjust for production)
cors_allowed_origins = ["*"]

Systemd Service Setup

Create a systemd service for automatic management:

Step 1: Create Service File

sudo tee /etc/systemd/system/stabled.service > /dev/null <<EOF
[Unit]
Description=Stable Daemon Service
After=network-online.target

[Service]
User=$USER
ExecStart=/usr/bin/stabled start --chain-id stabletestnet_2201-1
Restart=always
RestartSec=3
LimitNOFILE=65535
StandardOutput=journal
StandardError=journal
SyslogIdentifier=stabled

[Install]
WantedBy=multi-user.target
EOF

Step 2: Enable and Start Service

# Reload systemd configuration
sudo systemctl daemon-reload

# Enable service to start on boot
sudo systemctl enable stabled

# Start the service
sudo systemctl start stabled

# Check service status
sudo systemctl status stabled

# View logs
sudo journalctl -u stabled -f
Cosmovisor is a process manager that automatically handles chain upgrades. This is the recommended setup for production nodes.

Step 1: Install Cosmovisor

# Install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

# Or download pre-built binary
wget https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.7.0/cosmovisor-v1.7.0-linux-amd64.tar.gz
tar -xvzf cosmovisor-v1.7.0-linux-amd64.tar.gz
sudo mv cosmovisor /usr/bin/

# Verify installation
cosmovisor version

Step 2: Set Environment Variables

# Add to ~/.bashrc or ~/.profile
echo "# Cosmovisor Configuration" >> ~/.bashrc
echo "export DAEMON_NAME=stabled" >> ~/.bashrc
echo "export DAEMON_HOME=$HOME/.stabled" >> ~/.bashrc
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> ~/.bashrc
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.bashrc
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.bashrc
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.bashrc

# Load variables
source ~/.bashrc

Step 3: Setup Cosmovisor Directory Structure

# Create cosmovisor directory structure
mkdir -p ~/.stabled/cosmovisor/genesis/bin
mkdir -p ~/.stabled/cosmovisor/upgrades

# Copy current binary to genesis
cp /usr/bin/stabled ~/.stabled/cosmovisor/genesis/bin/

# Create current symlink
ln -s ~/.stabled/cosmovisor/genesis ~/.stabled/cosmovisor/current

# Verify setup
ls -la ~/.stabled/cosmovisor/
cosmovisor run version

Step 4: Set Environment Variable

# Set service name (default: stable)
export SERVICE_NAME=stable

Step 5: Create Service File

sudo tee /etc/systemd/system/${SERVICE_NAME}.service > /dev/null <<EOF
[Unit]
Description=Cosmovisor daemon
After=network-online.target

[Service]
Environment="DAEMON_NAME=stabled"
Environment="DAEMON_HOME=$HOME/.stabled"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"
User=$USER
ExecStart=$(which cosmovisor) run start --chain-id stabletestnet_2201-1
Restart=always
RestartSec=3
LimitNOFILE=65535
StandardOutput=journal
StandardError=journal
SyslogIdentifier=${SERVICE_NAME}

[Install]
WantedBy=multi-user.target
EOF

Step 6: Enable and Start Service

# Reload systemd
sudo systemctl daemon-reload

# Enable service
sudo systemctl enable ${SERVICE_NAME}

# Start the service
sudo systemctl start ${SERVICE_NAME}

# Check status
sudo systemctl status ${SERVICE_NAME}

# View logs
sudo journalctl -u ${SERVICE_NAME} -f

Preparing for Upgrades

When a chain upgrade is announced:
# Example: Preparing for v0.8.0 upgrade
UPGRADE_NAME="v0.8.0"
mkdir -p ~/.stabled/cosmovisor/upgrades/$UPGRADE_NAME/bin

# Download new binary
wget https://stable-testnet-data.s3.us-east-1.amazonaws.com/v8/stabled-0.8.0-testnet-linux-amd64.tar.gz
tar -xvzf stabled-0.8.0-testnet-linux-amd64.tar.gz

# Place in upgrade directory
mv stabled ~/.stabled/cosmovisor/upgrades/$UPGRADE_NAME/bin/

# Verify the binary
~/.stabled/cosmovisor/upgrades/$UPGRADE_NAME/bin/stabled version

# Cosmovisor will automatically switch to this binary at the upgrade height

Monitoring Cosmovisor

# Check current binary version
cosmovisor run version

# View upgrade info
ls -la ~/.stabled/cosmovisor/upgrades/

# Check service logs for upgrade status
sudo journalctl -u ${SERVICE_NAME} | grep -i upgrade

# Monitor real-time logs during upgrade
sudo journalctl -u ${SERVICE_NAME} -f

Manual Systemd Service Setup (Alternative)

If you prefer not to use Cosmovisor, you can create a standard systemd service:

Step 1: Set Environment Variable

# Set service name (default: stable)
export SERVICE_NAME=stable

Step 2: Create Service File

sudo tee /etc/systemd/system/${SERVICE_NAME}.service > /dev/null <<EOF
[Unit]
Description=Stable Daemon Service
After=network-online.target

[Service]
User=$USER
ExecStart=/usr/bin/stabled start --chain-id stabletestnet_2201-1
Restart=always
RestartSec=3
LimitNOFILE=65535
StandardOutput=journal
StandardError=journal
SyslogIdentifier=${SERVICE_NAME}

[Install]
WantedBy=multi-user.target
EOF

Step 3: Enable and Start Service

# Reload systemd configuration
sudo systemctl daemon-reload

# Enable service to start on boot
sudo systemctl enable ${SERVICE_NAME}

# Start the service
sudo systemctl start ${SERVICE_NAME}

# Check service status
sudo systemctl status ${SERVICE_NAME}

# View logs
sudo journalctl -u ${SERVICE_NAME} -f

Quick Sync Options

For faster synchronization, see the Snapshots & Sync Guide for:
  • Archive node snapshots
  • Pruned node snapshots

Post-Installation Verification

Check Node Status

# Check if node is running
sudo systemctl status stabled

# Check sync status
curl -s localhost:26657/status | jq '.result.sync_info'

# Check connected peers
curl -s localhost:26657/net_info | jq '.result.n_peers'

# Check latest block
curl -s localhost:26657/status | jq '.result.sync_info.latest_block_height'

Monitor Logs

# Follow service logs
sudo journalctl -u stabled -f

# Check for errors
sudo journalctl -u stabled --since "1 hour ago" | grep -i error

# Check for peer connections
sudo journalctl -u stabled --since "10 minutes ago" | grep -i "peer"

Security Hardening

After installation, secure your node:

Firewall Configuration

# Configure UFW
sudo ufw allow 22/tcp  # SSH
sudo ufw allow 26656/tcp  # P2P
sudo ufw allow 26657/tcp  # RPC (only if needed externally)
sudo ufw enable

Next Steps

  1. Configure your node: See Configuration Guide
  2. Speed up sync: Check Snapshots & Sync
  3. Monitor your node: Set up Monitoring
  4. Join the community: Get support in Discord

Troubleshooting

If you encounter issues during installation:
  • Check the Troubleshooting Guide
  • Verify system requirements are met
  • Ensure ports are not blocked by firewall
  • Check disk space and permissions
  • Review systemd logs for errors