The Rocket.Chat Server Amazon Machine Image (AMI) allows you to easily deploy a Rocket.Chat workspace on an EC2 instance. This AMI runs Rocket.Chat using Docker, simplifying the deployment process. This guide covers the steps to launch the Rocket.Chat instance with the AMI, access your Rocket.Chat workspace, and configure it for use.
The EC2 AMI is not recommended for large-scale production. The other recommended deployment methods are Docker and Kubernetes.
Preparation steps
Before you begin, make sure you have the following:
An active AWS account.
A domain name (optional). You can use the EC2 instance’s public IP, but a domain name (e.g., chat.example.com) is recommended for production deployments.
Step 1: Launch the EC2 AMI
Log in to your AWS account and continue with these steps:
Go to the Rocket.Chat Server AMI on the AWS marketplace.
Click View purchase options to see the Rocket.Chat server software offer. Click Accept Terms to subscribe to the software.
After the subscription is complete, click Continue to configuration.
Select 64-bit (x86) AMI as the Fulfillment version. Set your preferred Rocket.Chat release as the Software version.
Select your preferred region and click Continue to Launch.
Set the EC2 Instance Type. Modify the VPC and Subnet settings if you need to.
For testing, a low-cost EC2 instance with 2GB RAM and a single to dual-core CPU is sufficient.
Set the Security Group and Key Pair. Verify that your defined security group settings allows the following ports:
22
3000 – for Rocket.Chat
443 – required if setting up HTTPS for secure access to Rocket.Chat.
Click Launch. An instance of this software is successfully deployed on EC2. You can view the launch configuration details or navigate to the newly created instance on your EC2 console.
Step 2: Access your Rocket.chat workspace
Connect to the instance using the EC2 Instance Connect. Alternatively, SSH using the command below:
ssh -i <path_to_key_file.pem> ubuntu@<public_ip_address>
Once you’re connected, you’ll see the following message:
##################################################################################################################################################################
Rocket.Chat is the leading open source team chat software solution. Free, unlimited and completely customizable with on-premises and SaaS cloud hosting.
Replace email, HipChat & Slack with the ultimate team chat software solution.
This Rocket.Chat image uses docker under the hood. To learn more, please read our docker documentation - https://docs.rocket.chat/deploy/prepare-for-your-deployment/rapid-deployment-methods/docker-and-docker-compose
You can find the compose project in $HOME/rocketchat directory.
Looking for how to use Rocket.Chat? Be sure to check our docs: https://docs.rocket.chat
Need some help? Join our community forums https://forums.rocket.chat and https://open.rocket.chat
This deployment is shipped using our Docker deployment method. To learn more, refer to Deploy with Docker & Docker Compose.
Run
docker compose logs -f rocketchat
to verify that your Rocket.Chat server is running. You should see a response similar to the image below:
Now you can access your workspace by visiting http://<public -ip-address>:3000
. The first user needs to create an account using the setup wizard, and this user will be automatically set as the workspace administrator.
Next steps
Great! You’ve successfully created your Rocket.Chat workspace with the EC2 AMI and logged into your account. Next, check out the following documents to get started:
User Guides: Learn the basics of your Rocket.Chat account, the types of rooms, and how to communicate with your workspace users.
Workspace Administration: Administrators and owners can set and manage various configurations.
Marketplace: Explore the available apps to enhance your workspace.
Configuring a domain and enabling HTTPS with Traefik
To make your Rocket.Chat workspace accessible via a domain, you need to set up a reverse proxy. This section covers routing your workspace to a domain and enabling HTTPS using Traefik.
Set an A record for your domain to your IP address. To verify that the domain is resolving correctly, run:
nslookup <domain>
It should return your instance IP address.
Go back to your instance and run
cd /home/ubuntu
. Create a.env
file with these variables:LETSENCRYPT_EMAIL
: Your required email for the TLS certificates.DOMAIN
: Your domain or subdomain name only. Avoid adding https:// or any trailing slashes. Confirm that this domain resolves to the server IP address.RELEASE
: Your preferred Rocket.Chat release. See the releases page to know more about our releases.ROOT_URL
: Set the value to " https://your-domain.com," replacing "your-domain.com" with the domain name you want to use.BIND_IP
: Set to127.0.0.1
LETSENCRYPT_EMAIL= # your email, required for the tls certificates DOMAIN= # set this to your domain name or subdomain, not trailing slashes or https://, just the domain RELEASE= # set the rocketchat release ROOT_URL= # set this to https://${DOMAIN} replace ${DOMAIN} with the actual domain BIND_IP=127.0.0.1
Download the Traefik template by running the following command:
curl -LO \ https://raw.githubusercontent.com/RocketChat/Docker.Official.Image/master/traefik.yml
Recreate the existing Rocket.Chat container:
docker compose up -d rocketchat --force-recreate
Start traefik:
docker compose -f traefik.yml up -d
Wait for the TLS certificates to generate and Rocket.Chat to restart. After a while, you can access your workspace via https://<your-domain.com>
, using the actual domain name you configured.
Update Rocket.Chat on the EC2 AMI
It’s important to keep your workspaces updated to enjoy the benefits of new features and fixes.
Read the general guidelines for updating Rocket.Chat and continue with these steps to update your workspace version on the EC2 AMI:
Add the
RELEASE
variable to your.env
file and set it to the Docker image tag of your preferred Rocket.Chat release.RELEASE=7.0.0
Run the following commands to restart your workspace with the updated configurations.
docker compose down rocketchat docker compose up -d rocketchat
Access your workspace and verify the updated version on the Subscription page. If you have any questions or issues when updating Rocket.Chat, refer to the Updating Rocket.Chat FAQ. For information on supported MongoDB versions, see the MongoDB version support document.