Overview
This AMI runs LibreChat, the open-source chat interface for AI models, on Ubuntu 24.04 LTS with MongoDB. The official LibreChat container image (ghcr.io/danny-avila/librechat, version 0.8.7) and MongoDB 7.0.45 are pinned and baked into the AMI, so first start does not depend on a registry. LibreChat is an independent open-source project and Perimattic is not affiliated with it; product names are trademarks of their respective owners.
Why LibreChat?
LibreChat gives you a ChatGPT-style web interface that works with several AI providers from one place, with conversation history, presets, file uploads and multi-user accounts. This image enables the OpenAI, Anthropic and Google endpoints; each user pastes their own API key in the chat UI. Other providers and OpenAI-compatible endpoints can be added in a librechat.yaml file, as described in the LibreChat documentation.
What Perimattic adds
Secure by default: LibreChat normally lets anyone register. Here registration is closed from the first start. At first login the AMI generates a random 24-character admin password, a MongoDB password and the JWT and encryption keys on your server, creates the administrator with LibreChat's own create-user script, and checks that the password works, that a wrong password and anonymous requests are refused and that registration is refused, before the site is published. There are no default or shared credentials or keys in the image.
No AI provider key is installed: you bring your own after you sign in. Provider usage is billed by the provider, not by this AMI.
MongoDB runs with authentication on and is reachable only inside the Docker network. Apache is the HTTPS reverse proxy, with a free Let's Encrypt certificate requested for your domain by certbot.
What is not included
The optional Meilisearch search service and the RAG file-embedding API (with its pgvector database) are not part of this image, so message search and retrieval over uploaded files are not available. Password reset by email needs an SMTP server and is switched off; the setup notes show how to reset a password on the server.
Sizing
LibreChat and MongoDB used about 0.9 GB of memory when idle in our tests. A t3.medium (4 GB) is the recommended starting size; size up for many concurrent users.
Licences
LibreChat is released under the MIT licence. The MongoDB Community Server in the mongo container is licensed under the Server Side Public License v1 (SSPL); it is used unmodified and only by LibreChat inside the instance, not offered to others as a service.
Getting Started Launch the AMI and open ports 22, 80 and 443 in the security group SSH in and answer the setup prompts (domain and admin email) Copy the admin password printed at the end of setup Sign in at https://your-domain and add your provider key
A domain name with an A record pointing at the instance is required, because LibreChat is served over HTTPS.
Book a free setup consultation at https://cal.com/gaurav-pareek-perimattic/marketplace-setup-consultations or email us at aws-support@perimattic.com .
Support Managed and supported by Perimattic, a cloud infrastructure company with 13+ years of experience serving global clients. We offer free setup assistance, custom integrations, infrastructure consulting, and 24/7 support.
Highlights
- LibreChat 0.8.7 (MIT) with MongoDB, pinned and pre-installed: one chat interface for OpenAI, Anthropic and Google models using your own API keys.
- Secure first login: registration is closed, the admin is created and checked during setup, keys and passwords are generated per instance, and MongoDB is private with authentication on.
- Built on patched Ubuntu 24.04 LTS and supported by Perimattic: free setup assistance at aws-support@perimattic.com.
Details
Introducing multi-product solutions
You can now purchase comprehensive solutions tailored to use cases and industries.
Features and programs
Financing for AWS Marketplace purchases
Pricing
- ...
Dimension | Cost/hour |
|---|---|
t3.medium Recommended | $0.03 |
t3.micro | $0.03 |
c3.2xlarge | $0.03 |
c3.4xlarge | $0.03 |
c3.8xlarge | $0.03 |
c3.large | $0.03 |
c3.xlarge | $0.03 |
c4.2xlarge | $0.03 |
c4.4xlarge | $0.03 |
c4.8xlarge | $0.03 |
Vendor refund policy
For any questions or concerns, please contact: Perimattic.com Email: aws-support@perimattic.com
How can we make this page better?
Legal
Vendor terms and conditions
Content disclaimer
Delivery details
64-bit (x86) Amazon Machine Image (AMI)
Amazon Machine Image (AMI)
An AMI is a virtual image that provides the information required to launch an instance. Amazon EC2 (Elastic Compute Cloud) instances are virtual servers on which you can run your applications and workloads, offering varying combinations of CPU, memory, storage, and networking resources. You can launch as many instances from as many different AMIs as you need.
Version release notes
Initial release.
- Application: LibreChat 0.8.7 (container image pinned, baked into the AMI).
- Base: Ubuntu 24.04 LTS, fully patched at build time, built by an automated EC2 Image Builder pipeline.
- TLS: Apache reverse proxy with a Let's Encrypt certificate requested by certbot at first login.
- Credentials are generated on the instance at first login; none are present in the image.
- A random admin password is generated at first login and the administrator is created with LibreChat's create-user script; registration is closed from the first start, and setup verifies that a wrong password, anonymous requests and registration are refused before the site is published.
- Application: LibreChat 0.8.7 (MIT, unmodified official image) with MongoDB 7.0.45 (SSPL v1, authentication on, not reachable from outside the Docker network), both pinned. No AI provider key is installed; the optional Meilisearch and RAG services are not included.
- JWT secrets and the credentials encryption key and IV are generated per instance.
Additional details
Usage instructions
-
Launch an Instance
From AWS Marketplace, click Continue to Subscribe and then Continue to Configuration to launch the AMI.
-
Choose the Recommended Instance Type
t3.medium (4 GB of memory) is the recommended starting size: LibreChat and MongoDB used about 0.9 GB when idle in our tests, and more with many active users. Choose t3.large or larger for large teams.
-
Configure Security Group
Allow inbound traffic on the following ports:
- 22 (SSH) - terminal access for setup
- 80 (HTTP) - needed to validate your domain for the TLS certificate
- 443 (HTTPS) - access to LibreChat
-
Point a domain at the instance
Create a DNS A record (for example chat.example.com) pointing to the instance's public IP before you log in.
-
Connect to the Instance
ssh -i <your-key.pem> ubuntu@<public-ip>
-
First-Login Setup
The first SSH login runs a guided setup:
- Prompts for your domain and admin email and checks the DNS A record
- Generates a random 24-character admin password and MongoDB password, and the JWT and encryption keys, on your server
- Starts LibreChat and MongoDB (authentication on) with registration closed, and creates the administrator with LibreChat's own create-user script
- Checks that the password works, that a wrong password, anonymous requests and registration are refused, and that MongoDB demands a login
- Configures Apache as an HTTPS reverse proxy and requests a Let's Encrypt certificate
- Prints the URL and the admin credentials; they are also stored in /opt/app/access.txt (root only)
If a step fails, fix the problem shown and log in again: the setup resumes where it stopped.
-
Access LibreChat
Open https://<your-domain> and sign in with your admin email and the generated password (view it again with: sudo cat /opt/app/access.txt). Open a model endpoint (OpenAI, Anthropic or Google) and paste your own API key when asked: no provider key is included. Registration is closed; add users on the server with: cd /opt/app && sudo docker compose exec librechat npm run create-user
-
Credentials
Generated on your server, never shared between customers. View them again with:
sudo cat /opt/app/access.txt
-
Manage the Services
cd /opt/app sudo docker compose ps sudo docker compose restart
Conversations are in MongoDB (/opt/app/mongodb) and uploads in /opt/app/uploads: back up all of /opt/app or snapshot the volume before upgrades. Provider API keys entered in the UI are stored encrypted with the CREDS_KEY in /opt/app/.env: keep it with your backups. LibreChat limits sign-in attempts per address, so repeated failed logins are temporarily blocked.
Thank you for subscribing.
Need Support or Customization? Perimattic's team can help with setup issues, custom features and integrations:
Email us: aws-support@perimattic.com WhatsApp: +91-92142 66896 Learn more: <www.perimattic.com >
We offer free setup assistance, custom development and integrations, and infrastructure consulting.
Resources
Support
Vendor support
Support by Perimattic
Perimattic provides 24/7 support for all AWS Marketplace products. Our team has 13+ years of cloud infrastructure expertise serving global clients.
Contact Channels: Email: aws-support@perimattic.com WhatsApp: +91-92142 66896 Website: <www.perimattic.com >
What We Help With: Initial setup and configuration assistance (free) Troubleshooting connectivity, performance, and backup issues Custom development and integrations Infrastructure consulting and architecture review Migration planning from other solutions Automation solutions and scaling guidance
Instance Sizing Guidance: t2.medium or t3.medium: Development environments, small applications m5.large: Production workloads with moderate traffic m5.xlarge: High-traffic production deployments and larger datasets
For workload-specific sizing recommendations, contact our team for a free consultation.
Refunds and Issues: If you experience any issues or need to request a refund, contact us at aws-support@perimattic.com and we will respond promptly.
AWS infrastructure support
AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.