Overview
This AMI runs Keycloak, the open-source identity and access management server, with a PostgreSQL 17 database on Ubuntu 24.04 LTS. The container images are pinned to Keycloak 26.8.1 and PostgreSQL 17.11 and baked into the AMI, so first start does not depend on a registry. Keycloak is a Cloud Native Computing Foundation project; Perimattic is not affiliated with it.
Why Keycloak?
Keycloak provides single sign-on, user management and identity brokering for your applications, using standards such as OpenID Connect, OAuth 2.0 and SAML 2.0.
What Perimattic adds
Pinned, tested versions: Keycloak and PostgreSQL are fixed to exact tags, not 'latest', so a rebuild never changes the server behind your back.
Production mode behind a proxy: Keycloak runs with its public hostname fixed to your domain, TLS ended by Apache, and plain HTTP accepted only from Apache (the Keycloak port is bound to the server's loopback interface). Its health and metrics endpoints are not published. The PostgreSQL database is reachable only inside the Docker network.
Administrator created for you: Keycloak has no setup page; its initial administrator is created from bootstrap settings on the first start. During first-login setup a random 24-character password is generated on your server for that account, and the setup checks that it can sign in and that self-registration is off in the master realm, before the site is published. There are no default or shared credentials in the image.
HTTPS: a free Let's Encrypt certificate is requested for your domain with certbot.
Patched base: Ubuntu 24.04 LTS built through an automated EC2 Image Builder pipeline, with security updates applied at build time.
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) Open https://your-domain/admin and sign in as admin with the password printed at the end of setup Keycloak marks this initial account as temporary: create your own administrator and remove it
A domain name with an A record pointing at the instance is required, because Keycloak is served over HTTPS. Keycloak uses over 1 GB of memory, so a t3.medium (4 GB) is recommended.
This AMI is built and supported by Perimattic. Keycloak is open source under the Apache License 2.0; PostgreSQL is under the PostgreSQL licence.
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
- Keycloak 26.8.1 with PostgreSQL 17.11, both pinned and pre-installed: single sign-on and user management with OpenID Connect, OAuth 2.0 and SAML 2.0.
- Secure first login: random 24-character administrator password, production mode with a fixed hostname behind Apache, health and metrics endpoints and database not exposed, HTTPS through Let's Encrypt.
- 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: Keycloak 26.8.1 (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.
- The initial administrator is created from Keycloak's bootstrap settings on first start with a generated password; setup verifies it before the site is published. Keycloak flags it as temporary.
- Production mode behind the proxy: fixed hostname, HTTP accepted from Apache only, health and metrics endpoints not published.
- Database: PostgreSQL 17.11 (pinned), reachable only inside the Docker network.
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 size. Keycloak's Java process alone uses over 1 GB.
-
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 Keycloak
-
Point a domain at the instance
Create a DNS A record (for example sso.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 random 24-character passwords for the Keycloak administrator and the database
- Starts Keycloak in production mode and PostgreSQL (the first start takes a minute or two), then checks that the administrator can sign in and that self-registration is off
- Configures Apache as an HTTPS reverse proxy and requests a Let's Encrypt certificate
- Prints the URL, username and password; 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 Keycloak
Open https://<your-domain>/admin and sign in as the user admin with the password printed at the end of setup (view it again with: sudo cat /opt/app/access.txt). Keycloak marks this initial administrator as temporary: create your own permanent administrator in the master realm and delete this one when ready.
-
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
Create your own realms for your applications and users; the master realm is for administration. Data is kept in /opt/app/postgres; back it up or snapshot the volume before upgrades.
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.