Set Up a Production Server
Once the test server is live and you have tested both deposit and withdraw flows, it's time to get started with the real deploy connected to real KYC and real banking rails providers. Before using any banking APIs, it's critical that you perform a full security audit on the system to make sure that there aren't any vulnerabilities.
Deploying a Secure Environment
Make sure to keep the test server up, and deploy the production (mainnet) system in a separate environment. Having two deploys allows you to validate new features on the testnet before moving them to the final production deploy. You can also have a third staging environment if there's a big team working on this codebase and/or there will be many pushes to be tested internally before sharing with other institutions.
To switch to Stellar's public (mainnet) network, all you have to do is change the network passphrase (for authenticating requests) and Horizon URL.
You can copy your existing development configs to create a production configuration.
First, you need to change your info file (stellar.toml
):
- TOML
# stellar.toml
NETWORK_PASSPHRASE = "Public Global Stellar Network ; September 2015"
Next, change your Anchor Platform configuration in production.env
file:
- bash
# production.env
STELLAR_NETWORK_NETWORK="Public"
STELLAR_NETWORK_HORIZON_URL=https://horizon.stellar.org