Hosting Config

exoSwap White Label Hosting Configuration

When using a whitelabel product you are using a common core of our exoSwap platform. When we build improvements and deploy updates to the platform it deploys to your individual hosting location.

We currently have deployment pipelines for both CLOUDFLARE and NETLIFY.

See the instructions below for how to setup and configure hosting for your customized front-end for exoSwap.

Only proceed with these configuration steps after you have a signed whitelabel agreement and have had a technical onboarding session with EXO operations staff.

CLOUDFLARE

For us to push code updates to your whitelabel instance in Clourflare, we need the following details:

  • CLOUDFLARE_PROJECT_NAME = (e.g. exoswap-frontend-prod)

  • CLOUDFLARE_ACCOUNT_ID = (e.g. 2dxx9998x9x921408585449224394bee)

  • CLOUDFLARE_API_TOKEN = ()

Cloudflare Deployment

To setup the deployment you can follow these instructions:

  1. Log in to Cloudflare, click on Workers on the left-hand navigation panel

  2. On the right hand side, collect the Account ID. It should look something like 2dxx9998x9x921408585449224394bee.

  3. Click on Pages on the left-hand navigation panel.

  4. Click Create a project > Direct Upload

  5. For the project name use the suggested name above and click Create Project

  6. You can ignore the next page, the Pages project is now set up.

  7. Note down the Pages deployment URL for your DNS settings later. It will be the project name + pages.dev (e.g. exoswap-frontend-prod.pages.dev)

  8. Click the user icon in the top right and choose My Profile

  9. Click API Tokens and Create Token

  10. Click Get Started next to Create Custom Token

  11. For the token name, use EXO_CICD

  12. Add 2 permissions:

    • Account, Cloudflare Pages, Read

    • Account, Cloudflare Pages, Edit

  13. Select the Account

  14. Click continue to summary and Create Token

  15. Send us the project name, account ID, and API token details.

We will deploy the front end pages.

In anticipation you can now take that deployment URL (e.g. exoswap-frontend-prod.pages.dev)and go to your DNS and setup a friendly domain name (e.g. swap.exo.fi) by pointing your subdomain at the deployment URL.

See the DNS setup and how to do DNS name replication checking instructions at the bottom of this page.

Once you have the subdomain assigned in your DNS, you also need to configure it in Cloudflare.

Cloudflare Custom Domain

To add the custom domain in Cloudflare follow these instructions:

  1. Log in to Cloudflare, click Pages on the left-hand menu

  2. Select the deployment (e.g. exoswap-frontend-prod)

  3. On the third tab to the right select "Custom domains"

  4. Select the "Set up a custom domain"

  5. Type in the friendly subdomain (e.g. swap.exo.fi) and click continue

  6. If you are using Cloudflare DNS then follow those instructions, if you are using your own DNS like Namechaep or Godaddy click "Begin CNAME setup"

  7. See instructions below for generic instructions on setting up CNAME in your DNS provider.

  8. Use the DNSChecker instructions below to check that the subdomain is pointing at the Pages deployment URL

  9. In Cloudflare, select the "Check DNS records"

  10. It says this could take a while and you will be emailed when its completed. If you setup the subdomain in DNS earlier then its likely ready right away.

NETLIFY SETUP

For us to push code updates to your whitelabel instance in Netlify, we need the following details:

  • NETILFY_API_TOKEN = (e.g.kmicN7xK1QoZUlx3IQX5YuLuFdQ1xxCVW3Sk91rN1-x)

Netlify Deployment

To setup the deployment you can follow these instructions:

  1. Log in to netlify.com, create a project but skip deploying anything.

  2. Click the user icon, top right, and select users settings.

  3. On the left menu, select Applications

  4. Under Personal access tokens, push the "New access token" button.

  5. For the token name, use EXO_CICD and generate token.

  6. Copy the token to send to EXO Operations for the deployment pipeline.

We will deploy the front end pages.

In anticipation you can now take that deployment URL (e.g. exoswap-frontend-prod.pages.dev)and go to your DNS and setup a friendly domain name (e.g. swap.exo.fi) by pointing your subdomain at the deployment URL.

See the DNS setup and how to do DNS name replication checking instructions at the bottom of this page.

Once you have the subdomain assigned in your DNS, you also need to configure it in Cloudflare.

Netlify Custom Domain

To asssign a subdomain in Netlify and configure an SSL certificate follow these instructions:

  1. Select the Netlify site and select Site Settings

  2. On the meny in the left select Domain Management

  3. Select "Add custom domain"

  4. Select "Add subdomain" and give it the same URL you put in DNS.

  5. At the bottom in the SSL section, select the DNS Validation

If you are having issues, please don't hesitate to reach out to your onboarding team in the Discord Channel that has been setup for your support.

DNS Configuration

Generic DNS subdomain setup

How Change DNS to add a subdomain for a root domain you already have. (e.g. swap.exo.fi)

  1. Log into your DNS provider (e.g. Namecheap, Godaddy)

  2. Go to the DNS management

  3. New CNAME Record

  4. Host = add your subdomain host name (e.g. swap)

  5. Value = paste in the value from your Cloudflare Pages deployment (e.g. exofi -frontend-prod.pages.dev)

  6. Set the TTL to 4 hours and Submit

DNS Replication Checking

  1. Go to https://dnschecker.org

  2. Paste in your project deployment URL (e.g. exoswap-frontend-prod.pages.dev.)

  3. Select A and Search

  4. Note the IP address (this is the server that Cloudflare or Netlify use to host your deployment)

  5. Now paste in your friendly subdomain (e.g. swap.exo.fi)

  6. Select A and Search

  7. check that the IP address for the subdomain is the same as the project deployment

  8. Change the A to CNAME and Search

  9. Check that the results show the subdomain pointing to the URL for the project deployment

Last updated