# Deploy to Cloud (AWS)

![](https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FfYswjuDti9ig8wRKsBEa%2FScreenshot%202025-12-05%20at%201.47.17%E2%80%AFPM.png?alt=media\&token=2431287d-c54d-4a91-a685-616894d12c20)

**Typical Platform Deployment Time : 10 \~15 minutes**

Deploy the platform to AWS using our provided script. The script simplifies the process and provides the platform URL upon completion. With this, your platform will be hosted on the cloud and accessible from anywhere in the world.

#### Security Credentials

* AWS Access key - Obtain your AWS access and secret keys from the AWS IAM console. Log in to your AWS account and follow the official [AWS documentation](https://docs.aws.amazon.com/keyspaces/latest/devguide/create.keypair.html) to generate these keys.

#### Software Prerequisites

If any of the packages listed below are missing on your machine, you can use our automated script to install them.

* [Git](https://git-scm.com/)
* [Make](https://www.gnu.org/software/make/)
* [Terraform](https://developer.hashicorp.com/terraform)
* [AWS CLI](https://aws.amazon.com/cli/)

1. On your local machine, open a terminal and download the dependencies

   ```bash
   curl -L -O https://raw.githubusercontent.com/tokamak-network/trh-platform/main/install.sh

   ```
2. Change permission of the dependency script

   ```bash
   chmod +x install.sh
   ```
3. Install the dependencies

   ```bash
   ./install.sh 
   ```
4. After successful installation, you will see the below message.

![](https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FBibpX5AZkgx2iStRZxe0%2FScreenshot%202025-12-05%20at%201.47.58%E2%80%AFPM.png?alt=media\&token=d635891f-0ae3-4361-a859-266db3881cf3)

#### Deploy Tokamak Rollup Hub Platform

1. On your local machine, open a terminal and clone the TRH-Platform repository.<br>

   ```bash
   # clone the trh-platform repository
   git clone https://github.com/tokamak-network/trh-platform
   # change directory to trh-platform
   cd trh-platform

   ```
2. Run the below command in your terminal for the configuration.<br>

   ```bash
   # setup for ec2 deployment
   make ec2-setup
   ```

   \
   You will be asked to put the following parameters. You can use default values for some of them.&#x20;

   * Key credentials: AWS access key & AWS secret access key (If you don’t have any AWS access key, please refer [this guide](https://repost.aws/knowledge-center/create-access-key) and create new one.)
   * AWS region (default: ap-northeast-2): The region where the ec2 instance for platform is installed
   * SSH key pai&#x72;**:** *The key pair name for SSH access. Please keep this noted so you can use it when you try to access EC2 instance via SSH. The key is generated to `~/.ssh`*

   \
   Note: Terraform will automatically generate and store a new key pair on AWS and your machine (`~/.ssh`). Do not create this manually - just provide a name (e.g., "my-ec2-key").<br>
3. Run the below command in your terminal. This will launch an EC2 instance and deploy the platform on it. After deployment, a success message will appear along with the platform URL for access.<br>

   ```bash
   # deploy ec2
   make ec2-deploy
   ```

   * Instance Type (default: t2.large): *The T-shirt size of EC2 instance*
   * Instance Nam&#x65;**:** *The name of your EC2 instance*

   Platform Auth configuration (The below credentials will help you to login to the platform)

   * Admin Email (default: ***<admin@gmail.com>***): The email which will be used for platform login
   * Admin Password (default: ***admin***)**:** The password which will be used for platform login

   \
   After deployment, you will receive the instance hostname as shown in the below screenshot, along with the platform dashboard URL. \ <br>

   ![](https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FDzSk7d2sfy34haGsBhyT%2FDeployed%20Logs.png?alt=media\&token=b7be865b-824e-491b-9443-eedb1084d401)
4. Get AWS EC2 information<br>

   ```bash
   make ec2-status
   ```
5. Destroy AWS EC2 instance

   \
   Note : Terminating the EC2 instance will not remove any deployed chains. Chains must be deleted directly from the platform. Destroying the EC2 instance only removes the instance itself along with the platform running on it.<br>

   ```bash
   make ec2-destroy
   ```
