> ## Documentation Index
> Fetch the complete documentation index at: https://docs.airys.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Marketplace AMI Deployment

> Deploy AirysChat on AWS using the marketplace AMI listing

# AWS AirysChat Deployment Guide

The following is the guide for deploying AirysChat on AWS using the marketplace listing. Use our helm charts with AWS Elastic Kubernetes Service(EKS) for a cloud-native deployment.

## Prerequisites

* AWS account

## Install AirysChat via AWS Marketplace AMI

### Step 1: Subscribe to AirysChat

1. Go to [AirysChat AWS marketplace listing](https://aws.amazon.com/marketplace/pp/prodview-tolblk4kmdqd4) and click on **Subscribe**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-01-subscribe.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=84b6d064f58194586614168fb10da707" alt="Subscribe to AirysChat" width="2784" height="952" data-path="self-hosted/images/aws-ami/awsmp-01-subscribe.png" />

### Step 2: Sign In

2. Sign in with your AWS account.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-02-signin.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=2588dbd3fc31bd907543dbfbfecbf67d" alt="AWS Sign In" width="442" height="571" data-path="self-hosted/images/aws-ami/awsmp-02-signin.png" />

### Step 3: Continue to Configuration

3. Click on **Continue to Configuration**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-03-continue.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=9f72f35d69d04dd1a23afc4c2a91416b" alt="Continue to Configuration" width="1250" height="358" data-path="self-hosted/images/aws-ami/awsmp-03-continue.png" />

### Step 4: Configure Software

4. Select the latest version in **Software Version** and pick your AWS **region**. Click **Continue to Launch**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-04-configure.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=0e4514c146ebcc1e60dda19d45722af7" alt="Configure Software" width="889" height="830" data-path="self-hosted/images/aws-ami/awsmp-04-configure.png" />

### Step 5: Launch Configuration

5. Review the launch configuration. Leave the **Choose Action** field with the default value **Launch from Website**. Choose a VPC and subnet as per your AWS region preference.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-05-launch.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=1c7ec847d15f3ac227860ba0666010c9" alt="Launch Configuration" width="912" height="876" data-path="self-hosted/images/aws-ami/awsmp-05-launch.png" />

### Step 6: Create Security Group

6. Scroll down to the **Security Group** section and click **Create New Based On Seller Settings**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-06-sg.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=8f6ac0b071b753ec2b2be6353c92502a" alt="Create Security Group" width="796" height="266" data-path="self-hosted/images/aws-ami/awsmp-06-sg.png" />

### Step 7: Save Security Group

7. Save the new security group and choose it after creation.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-07-sg.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=54985f29fc527b53abb682918bab16c3" alt="Save Security Group" width="924" height="646" data-path="self-hosted/images/aws-ami/awsmp-07-sg.png" />

### Step 8: Configure Key Pair

8. Pick a key pair you already have or create a new one in the region you are deploying. Click **Launch**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-08-keypair.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=043b6b621ea05f45f2fbe1e74acc3f6f" alt="Configure Key Pair" width="931" height="538" data-path="self-hosted/images/aws-ami/awsmp-08-keypair.png" />

### Step 9: Launch Confirmation

9. AWS should now display a congratulations screen confirming that AirysChat instance is launched successfully. Click on the **EC2 Console** link.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-09-launch.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=2229e99f65ca16787316bc4449756dea" alt="Launch Confirmation" width="924" height="306" data-path="self-hosted/images/aws-ami/awsmp-09-launch.png" />

### Step 10: Wait for Instance

10. Wait for a few minutes to let the instance come up.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-10-ec2.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=859f8e80fc10cdae0b6f1b90b07a8c3e" alt="Wait for Instance" width="1886" height="249" data-path="self-hosted/images/aws-ami/awsmp-10-ec2.png" />

### Step 11: Get Public IP

11. Select the instance and copy the public IP.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-11-public-ip.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=0965688da1749cb238ccf6c6c3587f41" alt="Get Public IP" width="1112" height="253" data-path="self-hosted/images/aws-ami/awsmp-11-public-ip.png" />

### Step 12: Access AirysChat

12. Visit `http://<your-public-ip>:3000`. This should bring up the AirysChat UI. Congratulations. Woot! Woot!!

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-12-airyschat.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=4f8af389fec8573f883ce549d24539e8" alt="Access AirysChat" width="1327" height="1017" data-path="self-hosted/images/aws-ami/awsmp-12-airyschat.png" />

## Configuring AirysChat

To configure AirysChat, we need to SSH into the instance. We will use **AWS Console Connect** for this.

### Step 1: Connect to Instance

1. Select the instance and click on **Connect**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-13-connect.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=617fae310700058cdc7238dac33a4e24" alt="Connect to Instance" width="1272" height="412" data-path="self-hosted/images/aws-ami/awsmp-13-connect.png" />

### Step 2: Use Ubuntu User

2. Change the username from `root` to `ubuntu` and click **Connect**.

<img src="https://mintcdn.com/airys/1FWn-RJM-8Ky_sbQ/self-hosted/images/aws-ami/awsmp-14-connect.png?fit=max&auto=format&n=1FWn-RJM-8Ky_sbQ&q=85&s=8621ea36d9b5b7d78155fbbad019d52a" alt="Use Ubuntu User" width="1182" height="783" data-path="self-hosted/images/aws-ami/awsmp-14-connect.png" />

### Step 3: Configure Environment Variables

3. Switch to the `airyschat` user and configure the necessary environment variables. Refer to [Environment variables](/self-hosted/configuration/environment-variables) document for the complete list.

```bash theme={null}
sudo -i -u airyschat
cd airyschat
vi .env
```

<Note>
  It is recommended to configure a proxy server like Nginx and set up SSL. Make sure to modify the security group created in step 6 accordingly.
</Note>

## Updating the Instance

Please follow the AirysChat update process in the standard [Linux VM setup](/self-hosted/deployment/linux-vm).

## Security Recommendations

### SSL Configuration

* Set up SSL certificates using Let's Encrypt or AWS Certificate Manager
* Configure Nginx as a reverse proxy
* Update security group rules to allow HTTPS traffic (port 443)

### Access Control

* Restrict SSH access to specific IP addresses
* Use IAM roles for EC2 instances where possible
* Enable AWS CloudTrail for audit logging

### Backup Strategy

* Set up automated EBS snapshots
* Configure database backups
* Store backups in S3 with appropriate lifecycle policies

## Troubleshooting

### Common Issues

<Accordion title="Instance not accessible">
  **Problem**: Cannot access AirysChat on port 3000

  **Solutions**:

  * Check security group allows inbound traffic on port 3000
  * Verify instance is running and healthy
  * Check if AirysChat service is running: `sudo systemctl status airyschat`
</Accordion>

<Accordion title="Application not starting">
  **Problem**: AirysChat service fails to start

  **Solutions**:

  * Check logs: `sudo journalctl -u airyschat -f`
  * Verify environment variables are correctly set
  * Ensure database connection is working
  * Check disk space and memory usage
</Accordion>

### Support Resources

* [AWS Support](https://aws.amazon.com/support/)
* [AirysChat Community Discord](https://discord.com/invite/cJXdrwS)
* [GitHub Issues](https://github.com/airyschat/airyschat/issues)

***

The AWS Marketplace AMI provides a quick way to deploy AirysChat with pre-configured settings. For production use, ensure you implement proper security measures and backup strategies.
