# EC2

Deploy Quor on AWS EC2

import CustomDomain from "/snippets/custom-domain.mdx"
import InstallOnyx from "/snippets/install-onyx.mdx"
import DeploymentNextSteps from "/snippets/deployment-next-steps.mdx"

Using AWS EC2 is the recommended way of deploying Quor.
It is simple to set up and should meet the performance needs of 90% of organizations looking to use Quor!

## Guide

<Steps>
  <Step title="Create an EC2 instance">
    Create an EC2 instance with the appropriate resources. For this guide,
    we will use the recommended `m7g.xlarge` instance.

    <Note>
      Read our [Resourcing guide](/deployment/getting_started/resourcing) for more details.
    </Note>

    - Give your instance a descriptive name like `onyx-prod`
    - Select the `Amazon Linux 2023` AMI
    - Select the `64-bit (Arm)` architecture
    - Select the `m7g.xlarge` instance type
    - Select `Allow HTTPS traffic from the internet` in the *Network settings* section
    - Configure storage following the Resourcing Guide

    <img className="rounded-image" src="/assets/deployment/ec2_create_instance.png" alt="EC2 Instance Creation"/>

    <img className="rounded-image" src="/assets/deployment/ec2_https.png" alt="EC2 Security Group Configuration"/>
  </Step>

  <Step title="Create the instance">
    Click **Launch instance** and then view your instance details.

    <Tip>
      Save the **Public IPv4 address** of the instance!
    </Tip>

    <img className="rounded-image" src="/assets/deployment/ec2_ipv4.png" alt="EC2 Public IPv4 Address"/>
  </Step>

  <CustomDomain />

  <Step title="Install Quor requirements">
    Quor requires `git`, `docker`, and `docker compose`.

    To install these on Amazon Linux 2023, run the following:

    ```bash
    sudo yum update -y

    sudo yum install docker -y
    sudo service docker start

    sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose

    sudo yum install git
    ```
  </Step>

  <InstallOnyx />
</Steps>

<DeploymentNextSteps />
