Stellar

Set up your Stellar node.

💡

These instructions have been tested on version 22.0.0. Please refer to the official Stellar releases for the latest release

  • Minimum hardware requirements: At least 4GB of RAM and a 2.40GHz CPU with 6 cores depending on your request load. Disk/Storage is recommended at least 10GB
  • MacOS or Ubuntu 18.04+
  • Build-essential packages
  • Golang 1.17+
  • Official Documentation

In order to build the Stellar node, you first need to install all the required dependencies.

  • c++ toolchain and headers that supports c++17
  • clang >= 12.0 (Only >= 14.0 versions are available on 24.04 LTS)
  • g++ >= 10.0
  • pkg-config
  • bison and flex
  • libpq-dev unless you ./configure —disable-postgres in the build step below.
  • 64-bit system
  • clang-format >= 12 (for make format to work)
  • sed and perl
  • libunwind-dev
  • Rust toolchain (see Installing Rust subsection)
  • cargo >= 1.74
  • rust >= 1.74
Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt-get update
sudo apt-get install -y make git-core libssl-dev pkg-config libclang-18-dev build-essential protobuf-compiler
sudo apt-get install -y libudev-dev
source "$HOME/.cargo/env"
# common packages
sudo apt-get install git build-essential pkg-config autoconf automake libtool bison flex libpq-dev libunwind-dev parallel sed perl postgresql-common postgresql postgresql-contrib
# if using clang
sudo apt-get install clang-18
# clang with libstdc++
sudo apt-get install gcc-10
# if using g++ or building with libstdc++
# sudo apt-get install gcc-10 g++-10 cpp-10
sudo apt-get install clang-format-18
Terminal window
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to PATH
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
# Update Homebrew
brew update
# Install essential packages
brew install make git pkg-config llvm protobuf libpq parallel
# Install additional development tools
brew install autoconf automake libtool bison flex sed perl
# Install PostgreSQL
brew install postgresql
brew services start postgresql
# Install
brew install llvm
brew link --force llvm
brew install gcc
# Install clang-format
brew install clang-format
# Configure environment variables (add to ~/.zprofile or ~/.bash_profile)
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zprofile
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> ~/.zprofile
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> ~/.zprofile
source ~/.zprofile

Soroban-RPC requires an instance of stellar-core binary on the same host. This is referred to as the Captive Core. Since, we are building RPC from source, we recommend considering two approaches to get the stellar-core binary:

Install the latest versions for the network accordingly stellar core latest release tag and Stelar latest release tag

Terminal window
# These are examples - check their docs and release page to opt for the right version
STELLAR_RELEASE=v22.0.0
SOROBAN_RELEASE=v22.0.0
Terminal window
git clone https://github.com/stellar/stellar-core.git
cd stellar-core
git checkout $STELLAR_RELEASE
git submodule init
git submodule update
./autogen.sh
./configure
make
make check
sudo make install
sudo mv stellar-core /usr/bin/
Terminal window
git clone https://github.com/stellar/stellar-core.git
cd stellar-core
git checkout $STELLAR_RELEASE
git submodule init
git submodule update
./autogen.sh
./configure
make
make check
sudo make install
sudo mv stellar-core /usr/bin/
Terminal window
git clone https://github.com/stellar/soroban-rpc.git
cd soroban-rpc
git checkout $SOROBAN_RELEASE
make build-soroban-rpc
sudo mv soroban-rpc /usr/bin/
Terminal window
git clone https://github.com/stellar/soroban-rpc.git
cd soroban-rpc
git checkout $SOROBAN_RELEASE
make build-soroban-rpc
sudo mv soroban-rpc /usr/bin/
Terminal window
soroban-rpc version
stellar-core version
Terminal window
mkdir -p ~/.stellar/config
mkdir -p ~/.soroban/config

Create ~/.stellar/config/core.toml and add

Terminal window
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false
NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"
DATABASE="sqlite3://stellar.db"
# Stellar Pubnet Validators
[[HOME_DOMAINS]]
HOME_DOMAIN="stellar.org"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="satoshipay.io"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="lobstr.co"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="www.coinqvest.com"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="publicnode.org"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="stellar.blockdaemon.com"
QUALITY="HIGH"
[[HOME_DOMAINS]]
HOME_DOMAIN="www.franklintempleton.com"
QUALITY="HIGH"
[[VALIDATORS]]
NAME="sdf_1"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH"
ADDRESS="core-live-a.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"
[[VALIDATORS]]
NAME="sdf_2"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK"
ADDRESS="core-live-b.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}"
[[VALIDATORS]]
NAME="sdf_3"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ"
ADDRESS="core-live-c.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}"
[[VALIDATORS]]
NAME="satoshipay_singapore"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GBJQUIXUO4XSNPAUT6ODLZUJRV2NPXYASKUBY4G5MYP3M47PCVI55MNT"
ADDRESS="stellar-sg-sin.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-sg-sin.satoshipay.io/{0} -o {1}"
[[VALIDATORS]]
NAME="satoshipay_iowa"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GAK6Z5UVGUVSEK6PEOCAYJISTT5EJBB34PN3NOLEQG2SUKXRVV2F6HZY"
ADDRESS="stellar-us-iowa.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-us-iowa.satoshipay.io/{0} -o {1}"
[[VALIDATORS]]
NAME="satoshipay_frankfurt"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GC5SXLNAM3C4NMGK2PXK4R34B5GNZ47FYQ24ZIBFDFOCU6D4KBN4POAE"
ADDRESS="stellar-de-fra.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-de-fra.satoshipay.io/{0} -o {1}"
[[VALIDATORS]]
NAME="coinqvest_hong_kong"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GAZ437J46SCFPZEDLVGDMKZPLFO77XJ4QVAURSJVRZK2T5S7XUFHXI2Z"
ADDRESS="hongkong.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://hongkong.stellar.coinqvest.com/history/{0} -o {1}"
[[VALIDATORS]]
NAME="coinqvest_germany"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GD6SZQV3WEJUH352NTVLKEV2JM2RH266VPEM7EH5QLLI7ZZAALMLNUVN"
ADDRESS="germany.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://germany.stellar.coinqvest.com/history/{0} -o {1}"
[[VALIDATORS]]
NAME="coinqvest_finland"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GADLA6BJK6VK33EM2IDQM37L5KGVCY5MSHSHVJA4SCNGNUIEOTCR6J5T"
ADDRESS="finland.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://finland.stellar.coinqvest.com/history/{0} -o {1}"
[[VALIDATORS]]
NAME="bootes"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GCVJ4Z6TI6Z2SOGENSPXDQ2U4RKH3CNQKYUHNSSPYFPNWTLGS6EBH7I2"
ADDRESS="bootes.publicnode.org"
HISTORY="curl -sf https://bootes-history.publicnode.org/{0} -o {1}"
[[VALIDATORS]]
NAME="hercules"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GBLJNN3AVZZPG2FYAYTYQKECNWTQYYUUY2KVFN2OUKZKBULXIXBZ4FCT"
ADDRESS="hercules.publicnode.org"
HISTORY="curl -sf https://hercules-history.publicnode.org/{0} -o {1}"
[[VALIDATORS]]
NAME="lyra"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GCIXVKNFPKWVMKJKVK2V4NK7D4TC6W3BUMXSIJ365QUAXWBRPPJXIR2Z"
ADDRESS="lyra.publicnode.org"
HISTORY="curl -sf https://lyra-history.publicnode.org/{0} -o {1}"
[[VALIDATORS]]
NAME="Blockdaemon_Validator_1"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAAV2GCVFLNN522ORUYFV33E76VPC22E72S75AQ6MBR5V45Z5DWVPWEU"
ADDRESS="stellar-full-validator1.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history1.bdnodes.net/{0} -o {1}"
[[VALIDATORS]]
NAME="Blockdaemon_Validator_2"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAVXB7SBJRYHSG6KSQHY74N7JAFRL4PFVZCNWW2ARI6ZEKNBJSMSKW7C"
ADDRESS="stellar-full-validator2.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history2.bdnodes.net/{0} -o {1}"
[[VALIDATORS]]
NAME="Blockdaemon_Validator_3"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAYXZ4PZ7P6QOX7EBHPIZXNWY4KCOBYWJCA4WKWRKC7XIUS3UJPT6EZ4"
ADDRESS="stellar-full-validator3.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history3.bdnodes.net/{0} -o {1}"
[[VALIDATORS]]
NAME = "FT_SCV_1"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GARYGQ5F2IJEBCZJCBNPWNWVDOFK7IBOHLJKKSG2TMHDQKEEC6P4PE4V"
ADDRESS = "stellar1.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-usw.franklintempleton.com/azuswshf401/{0} -o {1}"
[[VALIDATORS]]
NAME = "FT_SCV_2"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GCMSM2VFZGRPTZKPH5OABHGH4F3AVS6XTNJXDGCZ3MKCOSUBH3FL6DOB"
ADDRESS = "stellar2.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-usc.franklintempleton.com/azuscshf401/{0} -o {1}"
[[VALIDATORS]]
NAME = "FT_SCV_3"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GA7DV63PBUUWNUFAF4GAZVXU2OZMYRATDLKTC7VTCG7AU4XUPN5VRX4A"
ADDRESS = "stellar3.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-ins.franklintempleton.com/azinsshf401/{0} -o {1}"
Terminal window
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
DATABASE="sqlite3://stellar.db"
# Stellar Testnet validators
[[HOME_DOMAINS]]
HOME_DOMAIN="testnet.stellar.org"
QUALITY="HIGH"
[[VALIDATORS]]
NAME="sdftest1"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y"
ADDRESS="core-testnet1.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}"
[[VALIDATORS]]
NAME="sdftest2"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP"
ADDRESS="core-testnet2.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}"
[[VALIDATORS]]
NAME="sdftest3"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z"
ADDRESS="core-testnet3.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}"
Terminal window
cd ~/.soroban/config/
soroban-rpc gen-config-file >> config.toml
Terminal window
# edit ~/.soroban/config/config.toml and uncomment and set to
NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"
# update to ~/.stellar/config/core.toml (should be an absolute path)
CAPTIVE_CORE_CONFIG_PATH="<HOME>/.stellar/config/core.toml"
# update to ~/.stellar
CAPTIVE_CORE_STORAGE_PATH = "<HOME>/.stellar"
HISTORY_ARCHIVE_URLS = ["https://history.stellar.org/prd/core-live/core_live_001"]
STELLAR_CORE_BINARY_PATH = "/usr/local/bin/stellar-core"
Terminal window
# edit ~/.soroban/config.toml and uncomment and set to
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# update to ~/.stellar/config/core.toml (should be an absolute path)
CAPTIVE_CORE_CONFIG_PATH="<HOME>/.stellar/config/core.toml"
# update to ~/.stellar
CAPTIVE_CORE_STORAGE_PATH = "<HOME>/.stellar"
HISTORY_ARCHIVE_URLS = ["http://history.stellar.org/prd/core-testnet/core_testnet_001"]
STELLAR_CORE_BINARY_PATH = "/usr/local/bin/stellar-core"

Run the node

Terminal window
BINARY_NAME=soroban-rpc
CONFIG_PATH=$HOME/.soroban/config/config.toml
sudo tee <<EOF >/dev/null /etc/systemd/system/$BINARY_NAME.service
[Unit]
Description=$BINARY_NAME daemon
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.soroban/
ExecStart=$(which $BINARY_NAME) --config-path $CONFIG_PATH
Restart=always
RestartSec=3
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
EOF
cat /etc/systemd/system/$BINARY_NAME.service
Terminal window
sudo systemctl enable soroban-rpc
sudo systemctl daemon-reload
sudo systemctl restart soroban-rpc

On macOS, you’ll can use a LaunchAgent in ~/Library/LaunchAgents/. For example, create ~/Library/LaunchAgents/com.soroban.rpc.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.soroban.rpc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/soroban-rpc</string>
<string>--config-path</string>
<string>/Users/username/.soroban/config/config.toml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<!-- If you use a relative DB_PATH, set the WorkingDirectory: -->
<key>WorkingDirectory</key>
<string>/Users/username/.soroban/data</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<!-- Add other necessary environment variables here -->
</dict>
<!-- Soroban logs to stderr by default, so it ends up here. -->
<key>StandardOutPath</key>
<string>/tmp/com.soroban.rpc.out</string>
<key>StandardErrorPath</key>
<string>/tmp/com.soroban.rpc.err</string>
</dict>
</plist>

Once the LaunchAgent has been setup you can run the service by running

Terminal window
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.soroban.rpc.plist
launchctl list | grep com.soroban.rpc
# If it appears with a PID, it's running!

To stop the service run:

Terminal window
launchctl remove com.soroban.rpc
Terminal window
journalctl -u soroban-rpc.service -n 100 -f -o cat

Once your Stellar node is fully synced, you can run a cURL request to see the status of your node:

Terminal window
curl --location 'http://localhost:8000' --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0",
"id":2,
"method":"getHealth"
}' | jq

If the node is successfully synced, the output from above will print

{
"jsonrpc": "2.0",
"id": 2,
"result": {
"status": "healthy",
"latestLedger": 52909103,
"oldestLedger": 52908928,
"ledgerRetentionWindow": 17280
}
}

If your node is still syncing it may return a response as follows:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 190 100 145 100 45 71888 22310 --:--:-- --:--:-- --:--:-- 185k
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32603,
"message": "[-32603] latency (288h35m28s) since last known ledger closed is too high (>30s)"
}
}

Tips & Common Pitfalls

  1. Absolute DB path: On macOS, either set <key>WorkingDirectory</key> in your plist or use DB_PATH="/Users/USERNAME/.soroban/data/soroban_rpc.sqlite".
  2. Logs default to stderr: That’s why StandardErrorPath is where you see everything.
  3. To see real-time logs: either run Soroban in the foreground (not via launchd/systemd) or tail -f the logs.
  4. “Bootstrap failed: 5: Input/output error” (macOS) often just means Soroban had a brief exit or stale job. If Soroban is actually running (PID > 0) and syncing, you can ignore it or use a wrapper script that ensures a zero exit code.

Edit on GitHub