-
Notifications
You must be signed in to change notification settings - Fork 139
Server Installation
- Linux or MacOS
- Go >= 1.23
- PostgreSQL 11+, tuned and running.
- Decred (dcrd) and Bitcoin (bitcoind) full nodes, and any other assets' full nodes, both with
txindexenabled.
In a PostgreSQL psql terminal, run
CREATE USER dcrdex WITH PASSWORD 'dexpass';
CREATE DATABASE dcrdex_testnet OWNER dcrdex;The master public key is used for collecting registration fees. Using dcrctl and dcrwallet, create a new account.
dcrctl --wallet --testnet createnewaccount fees
Get the master public key for the account.
dcrctl --wallet --testnet getmasterpubkey fees
Master public keys are network-specific, so make sure to specify the network
to both dcrwallet and dcrctl, if not using mainnet.
Place the pubkey string into a new DEX configuration file.
# Testnet extended pubkey
regfeexpub=tpubVWHTkHRefqHptAnBdNcDJ...
# PostgreSQL Credentials
pgpass=dexpassOr supply the dcrdex executable with the pubkey using:
./dcrdex --{network} --regfeexpub={network specific value}Note: You can specify configurations for different networks in a separate config file e.g ~/.dcrdex/dcrdex-{network}.conf and provide it to the dcrdex executable using the -C flag:
./dcrdex -C ~/.dcrdex/dcrdex-{network}.conf~/.dcrdex/ is the default app data directory location used by the
DEX server, but can be customized with the --appdata command-line argument.
Only the full node software listed in the client configuration
section are supported for the server. The txindex configuration options must
be set. Be sure to specify the correct network if not using mainnet.
A sample is given at sample-markets.json. See the market json section of the wiki for more information on individual options.
From a command prompt, navigate to server/cmd/dcrdex. Build the executable
by running go build. The generated executable will be named dcrdex. Run
./dcrdex --help to see configuration options that can be set either as a
command line argument or in the dcrdex.conf file. The
Exchange Variables section of the specification has
additional information on a few key options.
./dcrdex --testnet
from server/cmd/dcrdex.