Skip to content

Xahau mainnet (network ID 21337) Docker container (x86_64)

Notifications You must be signed in to change notification settings

Xahau/mainnet-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xahaud Docker Container

Docker container to run a Xahau node on MAINNET.

The way this container should be used (like all Docker containers) is to map config files from the host to the container, so the container can be destroyed and re-created (build image) in case of updates, without losing config. See folder mapping examples in the ./up script in this repository.

Alternatively: install without Docker:

If you prefer not to run in a Docker container, simply fetch the install script (xahaud-install-update.sh) and run it on the host.

Live build:

https://build.xahau.tech/2024.4.21-release%2B858

IPv6 edition (!)

For Docker + IPv6 setup, see:

Updating

Either re-create the Docker container based on a new image, or keep the container running and update the xahaud binary inside the container.

Example Gist to do this: https://gist.github.com/WietseWind/2ed35d85dcd056d82645de2958934f86

⚠️ Warning regarding the pinned binary

All Xahau builds are available at https://build.xahau.tech.

The build script in this repository contains the right pinned build.

If you build the image yourself, without the build script, you will have to manually replace the right build version! If you don't, the binary will fail to sync and most likely crash during the sync process.


XAHAU MAINNET, NETWORK ID 21337

                   $$\                                 $$\ 
                   $$ |                                $$ |
$$\   $$\ $$$$$$\  $$$$$$$\   $$$$$$\  $$\   $$\  $$$$$$$ |
\$$\ $$  |\____$$\ $$  __$$\  \____$$\ $$ |  $$ |$$  __$$ |
 \$$$$  / $$$$$$$ |$$ |  $$ | $$$$$$$ |$$ |  $$ |$$ /  $$ |
 $$  $$< $$  __$$ |$$ |  $$ |$$  __$$ |$$ |  $$ |$$ |  $$ |
$$  /\$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |\$$$$$$  |\$$$$$$$ |
\__/  \__|\_______|\__|  \__| \_______| \______/  \_______|

Build:

WARNING!

  • This will remove any existing image with the same xahaud release tag
  • The container tag will xahaud-mainnet
./build

Run:

WARNING! This will remove any running container called xahaud-mainnet!

./up

Config & database

Config and database perist in ./store/etc and ./store/db. Logfiles in ./store/log.

Feel free to clean the db and log folder at your convenience, contents will be re-created.

Xahaud server identity

The xahaud server identity will perist as long as you keep the contents of wallet.db in the ./store/db folder.

You can stop, remove & re-create the container: as long as this file persists your server identity will be the same after a restart.

Remote access

This container runs ssh as well. You can SSH into the container, but for every build the SSH server identity will change. The user is root, so: ssh root@localhost -p 2222.

To allow SSH access (key only), add your pubkey(s) to ./store/ssh/authorized_keys

NOTE: not a hidden file, don't start with a dot). Make sure to chmod 400 the file. Make sure the file is owned by root (chown root:root).

Commands

To get the latest server status (or run another xahaud command):

# docker exec {container} {binary} {cliopts}
docker exec xahaud-mainnet xahaud server_info

To check the current sync status:

# docker exec {container} {binary} {cliargs} {cliopts} | grep {string to match}
docker exec xahaud-mainnet xahaud -q server_info | grep complete_ledgers

To check the peer connections:

# docker exec {container} {binary} {cliargs} {cliopts} | grep {string to match}
docker exec xahaud-mainnet xahaud -q peers|grep address

To check the live Xahaud logs:

# docker exec {container} {binary} {cliargs} {cliopts} | grep {string to match}
docker exec xahaud-mainnet tail -f /opt/xahaud/log/debug.log

To monitor sync status (exit with CTRL-C):

watch 'docker exec xahaud-mainnet xahaud -q server_info | grep complete_ledgers'

To start/stop/restart xahaud:

systemctl start xahaud
systemctl restart xahaud
systemctl stop xahaud

To prevent xahaud from auto-starting when the container starts:

systemctl disable xahaud

Enjoy!

About

Xahau mainnet (network ID 21337) Docker container (x86_64)

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •