Amazon Elastic Beanstalk ​
Hosting Tradeboard in the Cloud using Amazon AWS Elastic Beanstalk ​
Tradeboard is an open-source algo trading platform, offering a wide range of features for both beginners and experienced traders. This tutorial guides you through the process of hosting Tradeboard in the cloud using Amazon AWS Elastic Beanstalk.
Prerequisites:
- An Amazon AWS account
- VS Code (or any code editor with Git installed)
- A hosting account with DNS management and custom domain(Cloudflare is recommended)
Steps by Step Instruction to host Tradeboard in Amazon Cloud with custom domain
Clone the Tradeboard Repository:
- Go to the Tradeboard GitHub repository.
- Copy the repository link.
- Open your VS Code and navigate to your project folder.
- Open a new terminal in VS Code and type git clone **https://github.com/wesoftcorp/tradeboard-docs and press enter.
- This will download the Tradeboard application locally in your VS Code.
Configure the .env File
Copy the
.sample.envfile in the Tradeboard project to.env(cp .sample.env .env).Update the REDIRECT_URL to your custom domain.
For example, if your custom domain for angel trading account is opendash.app, update it to https://opendash.app/angel/callback.
If you’re not using HTTPS, use http://tradeboard.app/angel/callback.
Make sure to update the HOST_SERVER to your custom domain as well as shown in the video.
You might also want to update the BROKER_API_KEY and BROKER_API_SECRET according to your broker credentials.
Generate APP_KEY, API_KEY_PEPPER and FERNET_SALT before you zip the bundle, and put the generated values in
.env:bashpython -c "import secrets; print(secrets.token_hex(32))"Run it three times and paste one value into each key, replacing the
TRADEBOARD_PLACEHOLDER_...text. On a normal install Tradeboard generates these itself on first start, but an Elastic Beanstalk deploy replaces the whole application bundle each time, so a value generated on the instance would be lost on the next deploy. RotatingAPI_KEY_PEPPERorFERNET_SALTinvalidates every stored password hash and every encrypted broker token, so they must be fixed in the bundle and kept identical across deploys.Save the changes.
Create the Elastic Beanstalk Application
- Go to the AWS Management Console and sign in.
- Select the desired region (e.g., Asia Pacific (Mumbai) ap-south-1).
- Search for “Elastic Beanstalk”.
- Click on “Create application”.
- Provide an application name (e.g., tradeboard) and an environment name (e.g., tradeboard-env).
- Ensure the domain name is available (e.g., tradeboard.ap-south-1.elasticbeanstalk.com).
- Provide a description for your environment (optional).
- Select a Python platform branch that provides Python 3.12 or newer.
- Select “4.1.0 (Recommended)” as the platform version.
- For “Application code”, choose “Upload your code”.
- Give a version label (e.g., 1.0.0.1).
- Choose “Local file” for “Source code origin”.
- Select the zipped Tradeboard project file you created earlier.
- Choose “Single instance (free tier eligible)” as the configuration preset (or choose “Custom configuration” for more options).
- Click on “Next” to proceed.
.t5Shrzgd.png)
Configure Service Access:
- Select the existing service role you created earlier.
- If you don’t have one, click on “Create and use new service role”.
- Select your EC2 key pair (e.g., test).
- If you don’t have an EC2 key pair, click on “Choose an EC2 key pair” and create a new one.
- Select the existing EC2 instance profile (e.g., “aws-elasticbeanstalk-ec2-role-flaskenv”).
- If you don’t have one, click on “View permission details” and create a new instance profile.
- Click on “Next”.
.BvRZQ6bi.png)
Configure VPC Settings
- Select the default VPC. You can create a new VPC, if needed.
- This is the virtual network where your Elastic Beanstalk environment will be deployed.
Activate Public IP Address and Instance Subnet:
- Ensure the Public IP address is enabled for your instance. This allows your application to be accessible from the internet.
- Choose an instance subnet from your VPC.
.C3l9la_v.png)
Configure Security Group:
- By default, select the default security group.
- This will allow your application to connect to the internet.
- If you want to restrict access, you can create a new security group and add rules to control incoming and outgoing traffic.
- Click on “Next”.
.DB9OCWoK.png)
Configure Instance Type, Load Balancer, and CloudWatch Logs:
- Choose an instance type (e.g., T3 micro, T3 Small).
- If you are looking for a free tier option, use T3 micro.
- Select “Single instance” if you don’t need a load balancer.
- Choose “Enhanced” for health reporting (optional).
- Choose the default settings for CloudWatch logs (optional).
- Click on “Next”.
.C4HQYJft.png)
Review and Submit:
- Review all the configuration steps.
- Make sure all the settings are correct.
- Click on “Submit”.
- This will initiate the automated provisioning of the servers in the backend.
.zRD6mXYk.png)
After deploying your Tradeboard application on Elastic Beanstalk, you need to configure your custom domain to point to the Elastic Beanstalk environment. This involves creating a CNAME record in your DNS settings. Here’s how to do it:
Access Your DNS Provider:
- Log in to your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap, etc.)
- Find your domain’s DNS management section.
Create a CNAME Record:
- Click on “Add record” or similar to create a new record.
- Name: Enter the subdomain you want to use (e.g., trade). This will be the part of your custom domain that will point to your Elastic Beanstalk application (e.g., trade.tradeboard.app).
- Type: Select “CNAME”.
- Value: Copy the Elastic Beanstalk domain generated by AWS. It will look something like this: tradeboard.ap-south-1.elasticbeanstalk.com.
Save and Verify:
- Save the CNAME record you just created.
- Wait for the DNS propagation to complete, which may take some time (usually 24-48 hours).
- Test your custom domain by entering it into your web browser. You should be redirected to your Tradeboard application on Elastic Beanstalk.

Example:
- Let’s say your custom domain is tradeboard.app.
- You want to use the subdomain trade to access your Tradeboard application.
- In your DNS settings, create a CNAME record with the following:
- Name: trade
- Type: CNAME
- Value: tradeboard.ap-south-1.elasticbeanstalk.com (replace with your Elastic Beanstalk domain)
Once the DNS propagation completes, you’ll be able to access your Tradeboard application at trade.tradeboard.app.
SSL Configuration in Cloudflare
If you are using Cloudflare for DNS Management ensure to enable the flexible mode to access the tradeboard domain with https SSL certificate.

By following these steps, you can successfully deploy Tradeboard in the cloud using Amazon AWS Elastic Beanstalk. You can then start configuring your trading strategies and begin your algorithmic trading journey.
