-
Notifications
You must be signed in to change notification settings - Fork 43
Docker
This article explains how to use xud-docker
, a containerized xud environment for
This is where you start - private chains maintained by exchange union cloud instances, automatic opening of channels and allocation of coins & tokens, trading against bots
Status: live
| Setup time: ~15 mins
| Recommended available disk space: 5 GB
bitcoin testnet 3, litecoin testnet 4, ethereum ropsten. Faucets: t-BTC, t-LTC, t-ETH 1 & 2.
Status: live
| Setup time: ~5-10h
| Recommended available disk space: 120 GB
Put your #reckless hat on
Status: in development
| Setup time: ~1-3 days
| Recommended available disk space: 500 GB
Producing blocks locally, mainly for development
Status: not available
| Setup time: fast
| Recommended available disk space: 1 GB
-
Linux, macOS or Windows with WSL 2.
-
4GB RAM (we saw some weird container states with less)
-
docker >= 18.09
$ docker --version
Docker version 18.09.6, build 481bc77
- docker-compose >= 1.24
$ docker-compose --version
docker-compose version 1.24.0, build 0aa59064
- current user can run docker (without sudo)
$ docker run hello-world
If step 5 fails check these instructions. If you do not have docker installed yet, follow the official install instructions for docker and docker-compose.
Start the environment with
curl https://raw.githubusercontent.com/ExchangeUnion/xud-docker/master/xud.sh -o ~/xud.sh
bash ~/xud.sh
This guides you through a setup on first run, pulls all containers, starts syncing chains and opens
.___ __ .__
___ _____ __ __| _/ _____/ |_| |
\ \/ / | \/ __ | _/ ___\ __\ |
> <| | / /_/ | \ \___| | | |__
/__/\_ \____/\____ | \___ >__| |____/
\/ \/ \/
--------------------------------------------------------------
xud ctl
takes xucli
commands, like getinfo
or orderbook
.
The status
command shows status of underlying clients, which is useful to track the sync status for testnet/mainnet:
btc Ready
lndbtc Ready
ltc Syncing 2.40% (26887/1116528)
lndltc Waiting for sync
parity Syncing 42.61% (2489756/5842588)
raiden Waiting for sync
xud Waiting for sync
Raiden currently requires direct channels with trading partners to swap reliably. We have a temporary check in place, that discards raiden-related orders (all pairs which include WETH, DAI...), if xud
can't find a direct channel to the trading partner. You can switch this check off by setting raidenDirectChannelChecks=false
in your xud.conf
. Before you do that, read this explainer of the issue.
- We recommend to open ports 8885 (
xud
), 9735 (lndbtc
) & 10735 (lndltc
) to enable other peers to open channels to you. Simnet does not necessarily need this. -
xud ctl
allows to use an underlying client's cli:
#Simnet
ltcctl --help
#Testnet/Mainnet
bitcoin-cli --help
lndbtc-lncli --help
litecoin-cli --help
lndltc-lncli --help
parity --help
raiden --help
xucli --help
- Once everything is up and running, you can check existing orders of your connected peers with
xucli orderbook
and issue e.g. a buy order of 1 ltc withbuy 1 ltc/btc 0.01
. - Permanently set xud alias to launch
xud ctl
from anywhere: Add the linealias xud="bash ~/xud.sh"
to the end of~/.bashrc
, then runsource ~/.bashrc
. - To inspect logs (use
logs -f
if you want to follow the log live):
#Simnet
logs ltcd/geth/lndbtc/lndltc/raiden/xud
#Testnet/Mainnet
logs bitcoind/litecoind/parity/lndbtc/lndltc/raiden/xud
- Blockchain & wallet data is stored in
#Simnet
~/.xud-docker/simnet/data
#Testnet
~/.xud-docker/testnet/data
#Mainnet
~/.xud-docker/mainnet/data
- Shutdown environment & remove all data
docker-compose down
# Use with caution: this step removes all `xud` blockchain and wallet data from your system. If you still have channels open or lost your seed mnemonic, you are risking to loose funds.
rm -rf ~/.xud-docker/
rm -rf ~/xud.sh
- Check known issues
- bitcoind config options
- litecoind config options
- parity config options
- lnd config options
- raiden config options
- xud config options
xud
is in alpha stage, as well as this wiki. Please help us to improve by opening issues (or even better PRs) for xud, xud-docker, xud-simnet and this wiki.
Feel like talking? Chat with us on Discord!