Open-Source Cloud-Native Digital Asset & Cryptocurrency Exchange Platform
OpenDAX is an open-source cloud-native multi-service platform for building a Blockchain/FinTech exchange of digital assets, cryptocurrency and security tokens.
Minimum VM requirements for OpenDAX: * 8GB of RAM (12GB recommended) * 4 cores vCPU (6 cores recommended) * 300GB disk space (SSD recommended)
A VM from any cloud provider like DigitalOcean, Vultr, GCP, AWS as well as any dedicated server with Ubuntu, Debian or Centos would work
SSH using root user, then create new user for the application
bash useradd -g users -s `which bash` -m app
We highly recommend using docker and compose from docker.com install guide instead of the system provided package, which would most likely be deprecated.
su - app
git clone https://github.com/openware/opendax.git
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB curl -sSL https://get.rvm.io | bash -s stable cd opendax rvm install .
bundle install rake -T # To see if ruby and lib works
rake -Tyou can see all available commands, and can create new ones in
If using a VM you can point your domain name to the VM ip address before this stage. Recommended if you enabled SSL, for local development edit the
Insert in file
Note: Everything is persisted on the local filesystem, thus API keys and 2FA tokens are preserved between restarts. However, Vault needs to be unsealed after every stop/restart.
To set up Vault, go through the following steps: -
docker-compose up -d vault-
docker-compose exec vault sh-
vault operator init- Save the output to a file in a secure place - Unlock Vault with three different unlock keys -
vault operator unseal *unseal_key*-
vault login *root_token*-
vault secrets enable totp-
vault secrets enable transit-
vault secrets disable secret-
vault secrets enable -path=secret -version=1 kv
Add the Vault root token to
config/app.yml, render the configs and start the
appservices. Afterwards, Vault should be fully configured and ready to work with Peatio and Barong.
You can login on
www.app.localwith the following default users from seeds.yaml
Seeded users: Email: [email protected], password: [email protected] Email: [email protected], password: Am8icnzEI3d!
In order to accelerate customer interaction, reduce risks and simplify business processes you can use KYC Verification Service from KYCaid. KYC goal is to prevent fraud and to decline users that don’t fulfill certain standards of credibility. To learn more about KYCaid and pricing you can visit their website - kycaid.com
KYCAID is already integrated into our stack, to use it you'd need to create an account on kycaid.com, and set up authentification creds there.
After that all you have to do is to change several lines in
kyc: provider: kycaid authorization_token: changeme # your production API token from the 'Settings' section of kycaid.com sandbox_mode: true # 'true' for test environments - documents will be verified/rejected automatically, without payment for verification api_endpoint: https://api.kycaid.com/
BARONG_REQUIRED_DOCS_EXPIREENV value inside
falseif you want to include
addressverification in your KYC process. You can set it to
trueif you need the document check only.
All the OpenDAX deployment files have their confguration stored in
The following table lists the configurable parameters of the config/app.yml configuration file and its default values.
app.name| global application name |
app.domain| base domain name |
subdomain| subdomain |
render_protect| enable read-only mode for rendered files |
csrfEnabled| enable CSRF protection on Barong |
ssl.enabled| enable SSL certificate generation |
ssl.email| email address used for SSL certificate issuing |
images| Docker image tags per component
vendor.frontend| optional Git URL for a development frontend repo |
kyc.provider| KYC provider, can be
kyc.authorization_token| optional API token for KYCAID use |
kyc.sandbox| enable KYCAID test mode |
kyc.api_endpoint| API endpoint for KYCAID |
vault.token| Vault authentication token |
database.host| database host name |
database.port| database port |
database.user| database username |
database.password| database root password |
storage.provider| object storage provider |
storage.bucketname| storage bucket name |
storage.endpoint| S3-compatible storage API endpoint |
storage.region| storage region |
storage.signatureVersion| S3-compatible storage API signature version(2 or 4) |
storage.accesskey| storage access keys |
twilio| Twilio SMS provider configs
gaTrackerKey| Google Analytics tracker key inserted into the frontend app
smtp| SMTP configs used for sending platform emails
captcha| captcha configuration(Recaptcha or Geetest)
wallets| configs for wallets seeded during the initial deployment of Peatio
parity| Parity cryptonode configuration
bitcoind| Bitcoind cryptonode configuration
litecoind| Litecoind cryptonode configuration
terraform.credentials| local path to a GCP service account JSON key |
terraform.project| GCP project name |
The following table lists configurable parameters of the
|images||Docker image tags per component|
|superset||Superset BI tool configs|
|arke||Arke liquidity bot configs|
Once you're done with the configuration, render the files using
rake render:config. You can easily apply your changes at any time by running this command.
Note: be sure to append all the subdomains based on app.domain to your /etc/hosts file if you're running OpenDax locally
The OpenDAX stack can be brought up using two ways:
The components included in the stack are:
proxy- Traefik, a robust cloud-native edge router/reverse proxy written in Go
backend- Vault, MySQL, Redis and RabbitMQ grouped together
cryptonodes- cryptocurrency nodes such as parity [Optional]
daemons- Peatio and Ranger daemons [Optional]
setup- setup hooks for Peatio and Barong to run before the application starts (DB migration etc.)
app- Peatio is the crypto exchange software, Barong and the Ambassador API gateway
frontend- the frontend application located at
tower- the Tower admin panel application located at
monitoring- cAdvisor and Node Exporter monitoring tools [Optional]
For example, to start the
backendservices, you'll simply need to run
Note: all the components marked as [Optional] need to be installed using rake service:*component*[start] explicitly
Go ahead and try your own OpenDAX exchange deployment!
Any component from the stack can be easily stopped or restarted using
rake service:frontend[stop]would stop the frontend application container and
rake service:proxy[restart]would completely restart the reverse proxy container.
Each component has a config file (ex.
config/frontend/tower.js) and a compose file (ex.
All config files are mounted into respective component container, except from
config/app.yml- this file contains all the neccessary configuration of opendax deployment
Compose files contain component images, environment configuration etc.
These files get rendered from their respective templates that are located under
config/app.ymlwith correct image and run
rake service:allThis will rerender all the files from
templatesdirectory and restart all the running services.
Alternitavely you can update the following files: *
rake service:component[start], if you want the changes to be persistent, you also need to update
# Delete all generated files git clean -fdx
Re-generate config from config/app.yml values
Restart the container you need to reload config
docker-compose up frontend -Vd
source ./bin/set-env.sh rake vendor:clone docker-compose -f compose/vendor.yaml up -d
You can easily deploy OpenDAX from scratch on Google Cloud Platform using Terraform!
To do this, just follow these simple steps: - Fill
app.ymlwith correct values - Run
rake terraform:apply- Access your VM from the GCP Cloud Console
To destroy the provisioned infrastructure, just run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/openware/opendax/master/bin/install)"
If you have any comments, feedback and suggestions, we are happy to hear from you here at GitHub or here: crypto exchange software