Links

Setup

This section requires a full exchange configuration through HollaEx Dashboard, HollaEx Kit folder as well as HollaEx CLI installed on your machine. Please check the Installation section if you haven't already done these.

Exchange Server Initialization

If you are looking for a way to deploy HollaEx on Kubernetes, Please checkout the Kubernetes docs available here.
You can initialize and setup your exchange by running the command below:
hollaex server --setup
The CLI will ask for the HollaEx Network selection.
By default, it selects the Mainnet HollaEx Network. You can also select the Testnet HollaEx Network in case you want to run an exchange just for testing purposes. If you have a private HollaEx Network, you need to select the Custom HollaEx Network option.
Please type in the valid option for you, and press the enter key to continue.
Once the network is selected, in case you are connecting to the Mainnet HollaEx Network, the next step is to create an account on HollaEx Dashboard. If you do not have an account type 'N' and proceed to create an account.
Once you are done with the account registration, you need to login and continue to set up your exchange through the setup wizard which takes a few minutes. You should specify your exchange name, region, and currencies/trading market that you want to support.
As the last part, you should select the DIY option at the bottom of the page.
Once you are done with this process, you can simply type 'Y' on the CLI and type in your existing account.
Please come back to the CLI once the registration procedure is done, and type 'C' to continue.
Now you can provide your registered account on the CLI.
Select the exchange number, and press 'Y' to proceed. (It should be 1 unless you have multiple exchanges)
The HollaEx CLI will then finalize the exchange initialization if all the values are valid.
The CLI then immediately proceeds to build a custom Docker image based on your HollaEx Kit configuration and code. All components at the local HollaEx Kit can be customized based on your needs.
It is possible to set a custom name for the built image. We recommend you push the image to your docker registry as a backup for future usage and history.
Note: For Kubernetes deployment, you must host your image on a docker registry.
The CLI will proceed to launch the image you just built on your machine. This process typically takes a few minutes so be patient!
Once the hollaex server --setup process is completed, you have to manually start the exchange. Simply run the command below to start the exchange.
hollaex server --start
You can see the exchange status briefly by using hollaex status command once the exchange is up.

Checking exchange

After starting your exchange, you can reach it through your web browser via the endpoints /v2/health and /v2/constant.
This API displays your exchange's name, HollaEx version number, host URL, base URL, and activation status.
This API shows the list of currencies and trading pairs that you have on your exchange. You will be able to see all currencies and trading pairs you selected. If you don't see a list of your currencies or trading pairs, restart the exchange by running the command hollaex server --restart. If that doesn't solve the issue, you can always bring it up to the forum.
You can view the API documentation for the exchange here and fork the API Docs and make your own.

Bringing up the Exchange website

HollaEx Kit provides a web client server as an open source project for a HollaEx Kit exchange. It's included in the /web directory of your HollaEx Kit. The default client contains everything needed for your exchange but feel free to customize it based on your needs. Check here to see more about web customization.
hollaex web --setup
This command will build the web client Docker image and do the initialization jobs for it. The build process could take longer than 5 minutes depending on your system resources. Hold tight with patience!
During the build, there could be warnings and errors printed by the npm package manager. Most of them will not affect the build process itself. You can ignore them unless the build procedure gets killed.
Once it gets all set, Simply start it by using the command below.
hollaex web --start
You'll be able to reach it by using the domain that you configured earlier through the HollaEx Dashboard. If you are running it locally, go to the localhost:8080 URL mentioned below.
If you are running the Kit on a remote server, accessing the web will not be available at this stage. You would face errors (or a blank page) if you go to the web with a plain IP address. To make it work, you should bind domains both for the web and the API server to make it accessible externally. Please follow the hollaex prod command instructions below.
Mostly done! All you need to do now is finalize the setup.
You need to create a new account that you are going to use for admin operation.
You should provide a VALID email address for this. The email address should be different from the HollaEx Dashboard account you've created. Again, this email will be used for the admin account of your exchange.
You will be able to see the main page of the exchange after you finalize all of those items above.
Hello Exchange!

Opening the exchange to the internet

Now it is time to open your exchange to the internet, making it accessible externally with your own domain address. There's a command we've built to help you to expose the exchange to the public world.
You should own and have control (DNS settings) of it to run the command.
hollaex prod
There are 2 domains required for the exchange. One is for the exchange web, the other one is for the exchange API server. Provide the domain for the exchange web first. The CLI will automatically set the API domain based on the provided web domain. You could type 'N' on this menu and set the custom domain for API too.
The CLI will attempt to resolve the domains both for the web and the API. Once the tests all get passed, You'll get the success message.
If either gets failed, the CLI will instruct about how to set up domain DNS. You can follow the guide from CLI to set up your domains and try the resolve tests again.
Once the CLI successfully resolves both domains, you can issue SSL certificates for HTTPS connection next. Type 'Y' to continue. If you are planning to use an external load balancer with external SSL, or just want to skip it for now, type 'N'.
It then runs hollaex toolbox --issue_ssl to start up the Let's Encrypt certbot. You'll see 2 domains both for the web and the API on the list. Select one of them to continue.
Since certbot only allows issuing a single SSL at a time, you should repeat the issuing process once again.
Your exchange will then be reachable with the domains you've added, with SSL. Before jumping into use, the web server should be rebuilt to prevent a communication issue between the API server.
Run the command below to rebuild the web server image.
hollaex web --build
Once the web image gets built successfully, you'll see the instruction like in the screenshot. Please run a hollaex web --apply command based on the printed instruction.
hollaex web --apply --registry <YOUR_IMAGE_REGISTRY> --tag <YOUR_IMAGE_TAG>

What to do next?

First of all, congrats! You just finished every step required to bootstrap your exchange. You can now freely look around your own exchange, get users, and start trading.
To get more instructions and use cases, please continue to read the How-tos section below.
We are glad that you have become a part of the HollaEx community. 😊