This guide will get you up and running with the Xian blockchain stack as quickly as possible. For advanced details, see the Reference section at the end.
- Mac: Docker Desktop for Mac
- Linux: Docker Engine and Docker Compose
Note: Docker Desktop (Mac) includes Docker Compose. On Linux, install Docker Compose separately after Docker Engine.
make setup CORE_BRANCH=mainnet CONTRACTING_BRANCH=mainnetThis will pull all required Xian repositories.
make core-buildmake core-upmake initmake configure CONFIGURE_ARGS='--moniker "<your node name>" --genesis-file-name "genesis-mainnet.json" --validator-privkey "<your validator privatekey>" --seed-node-address "c3861ffd16cf6708aef6683d3d0471b6dedb3116@152.53.18.220" --copy-genesis'make core-shellmake uppm2 logs --lines 1000exitmake core-downmake core-bds-buildmake core-bds-upmake initmake configure CONFIGURE_ARGS='--moniker "<your node name>" --genesis-file-name "genesis-mainnet.json" --validator-privkey "<your validator privatekey>" --seed-node-address "c3861ffd16cf6708aef6683d3d0471b6dedb3116@152.53.18.220" --copy-genesis --service-node'make core-bds-shellmake up-bdspm2 logs --lines 1000exitmake core-bds-downmake core-dev-buildmake core-dev-upmake initmake configure CONFIGURE_ARGS='--moniker "<your node name>" --genesis-file-name "genesis-mainnet.json" --validator-privkey "<your validator privatekey>" --seed-node-address "c3861ffd16cf6708aef6683d3d0471b6dedb3116@152.53.18.220" --copy-genesis --service-node'make core-dev-shellmake uppm2 logs --lines 1000exitmake core-dev-downgit clone https://github.com/xian-network/contracting
cd contracting
# (Optional) Create a new feature branch
# git checkout -b <new-branch-name>make contracting-dev-buildmake contracting-dev-uppytest contracting/exitmake core-dev-shellpytest xian-core/tests/exit| Action | Command |
|---|---|
| Start node (core only) | make core-up |
| Start node with BDS | make core-bds-up |
| Start dev environment with BDS | make core-dev-up |
| Stop node | make down |
| Stop container | make core-dev-down |
If you are running on Ubuntu/Debian, you may want to secure your node with UFW:
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp comment 'SSH'
sudo ufw allow 26656/tcp comment 'Tendermint P2P'
sudo ufw allow 26657/tcp comment 'Tendermint RPC'
sudo ufw allow 26660/tcp comment 'Tendermint Prometheus'
sudo ufw allow 80/tcp comment 'HTTP'
sudo ufw allow 443/tcp comment 'HTTPS'
sudo ufw enable
sudo ufw status numberedWarning: Always allow SSH before enabling UFW to avoid locking yourself out.
- Docker permission errors: Try running with
sudoor add your user to thedockergroup. - Ports already in use: Make sure no other services are using the required ports (26656, 26657, 26660, 5000).
- Containers not starting: Run
docker-compose psordocker psto check status. Usedocker-compose logsfor details. - Database connection issues: Ensure the
xian-dbnetwork is running and not blocked by firewall.
xian-net: Main network for service communication and internet access. Exposes ports 26657, 26656, 26660, 5000.xian-db: Isolated network for database access (PostgreSQL only accessible within this network).
docker-compose-core.yml: Base config for Xian nodedocker-compose-core-dev.yml: Adds dev settingsdocker-compose-core-bds.yml: Adds BDS with PostgreSQL
Combine with -f flag, e.g.:
docker-compose -f docker-compose-core.yml -f docker-compose-core-bds.yml upmake up— Start node without BDSmake up-bds— Start node with BDSmake core-up— Start node (core only)make core-bds-up— Start node with BDSmake core-dev-up— Start dev environment with BDSmake down— Stop nodemake core-dev-down— Stop container
If you need to initialize CometBFT manually:
make core-dev-shell
make initFor more details, see the comments in each Docker Compose file or the Makefile.