Overview
This AMI runs Shlink, the open-source URL shortener with a REST API and visit statistics, together with its web client and PostgreSQL 17, on Ubuntu 24.04 LTS. The official images shlinkio/shlink (5.1.8) and shlinkio/shlink-web-client (4.9.0) are pinned, with PostgreSQL 17.11, and baked into the AMI, so first start does not depend on a registry. Shlink is an independent open-source project and Perimattic is not affiliated with it; product names are trademarks of their respective owners.
Why Shlink?
Shlink creates short links on your own domain, with custom slugs, tags, expiry dates, redirect rules by device or language, and visit statistics. You manage it through the REST API or the web client, which also draws QR codes.
What Perimattic adds
API key generated for you: Shlink has no username and password. During first-login setup this AMI generates a random 24-character API key on your server and Shlink creates it on its first start, so the REST API is never open and no key is shipped in the image. Setup then checks that the key works, that a wrong key and a missing key are refused with 401, that the short-link redirect works and that the web client's own files contain no key. DEFAULT_DOMAIN is your domain and IS_HTTPS_ENABLED is true.
HTTPS: Apache is configured as a reverse proxy and a free Let's Encrypt certificate is requested for your domain with certbot. Shlink and its web client listen only on the loopback interface and PostgreSQL is reachable only inside the Docker network.
Patched base: Ubuntu 24.04 LTS built through an automated EC2 Image Builder pipeline, with security updates applied at build time.
What you should know
Short links are public by design: every short link (https://your-domain/ ) and the root redirect work for anyone, without a key. /rest/health is open and only reports that the server is up. The rest of /rest/v3 needs a valid X-Api-Key header.
Web client sign-in: the web client is a static single-page app served over HTTPS on port 8443 (it cannot be served from a sub-path), so the security group must also allow TCP 8443. It holds no key. Open https://your-domain:8443 , choose Add a server and enter any name, the URL https://your-domain and the API key printed at the end of setup (also in /opt/app/access.txt). The browser keeps the key in its local storage. Only the web client's origin is allowed to call the API from a browser (CORS).
Visitor locations need a free MaxMind GeoLite2 licence key, which you add to the compose file. Without it Shlink records visits but does not resolve country or city. Shlink sends no telemetry; the web client talks only to the Shlink servers you add.
Shlink is light: about 190 MB of memory for the server, 11 MB for the web client and 55 to 65 MB for PostgreSQL in our tests, so a t3.small (2 GB) is the recommended starting size.
Licence
Shlink and the Shlink web client are released under the MIT licence; this AMI runs the unmodified upstream images, whose source is at github.com/shlinkio/shlink and github.com/shlinkio/shlink-web-client. PostgreSQL is released under the PostgreSQL License.
Getting Started Launch the AMI and open ports 22, 80, 443 and 8443 in the security group SSH in and answer the setup prompts (domain and admin email) Open https://your-domain:8443 , add your server with the API key printed at the end of setup Create short links, or call the REST API with the X-Api-Key header
A domain name with an A record pointing at the instance is required, because the site is served over HTTPS.
This AMI is built and supported by Perimattic.
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
- Shlink 5.1.8 and web client 4.9.0 (MIT) with PostgreSQL 17.11, pinned and pre-installed: your own short-link domain. Short links are public by design; the REST API needs the key.
- Secure first login: a random 24-character API key is generated on your server, no key ships in the image; requests without a valid key get 401; HTTPS through Apache and Let's Encrypt. Web client on port 8443.
- 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.small 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: Shlink 5.1.8 (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 24-character REST API key is generated at first login and created by Shlink on its first start; setup verifies that the key works, that a wrong key and a missing key are refused (401), that short links redirect and that the web client's server list is empty (no key in any served file).
- Application: Shlink 5.1.8 and shlink-web-client 4.9.0 (MIT, unmodified official images) with PostgreSQL 17.11 (all pinned). DEFAULT_DOMAIN and IS_HTTPS_ENABLED are set for the buyer's domain.
- The web client is served on TCP 8443 (the buyer adds the server and API key in the browser). Short links are public by design. No GeoLite2 key is configured, so visitor country and city are not resolved.
- Database: 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.small (2 GB of memory) is the recommended starting size: Shlink used about 190 MB, its web client about 11 MB and PostgreSQL about 55 to 65 MB in our tests. Allow TCP 8443 for the web client.
-
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 Shlink
- 8443 - Shlink web client (HTTPS, same certificate)
-
Point a domain at the instance
Create a DNS A record (for example s.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 REST API key and a database password on your server
- Starts PostgreSQL, Shlink and the web client; Shlink creates the API key on its first start
- Checks that the key works, that a wrong key and a missing key are refused, that short links redirect and that the web client's files hold no key
- Configures Apache as an HTTPS reverse proxy (443 for Shlink, 8443 for the web client) and requests a Let's Encrypt certificate
- Prints the URLs and the API key; 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 Shlink
Open https://<your-domain>:8443 (the web client), choose Add a server and enter any name, the URL https://<your-domain> and the API key printed at the end of setup (view it again with: sudo cat /opt/app/access.txt).
-
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
Short links, tags and visit statistics are in the PostgreSQL database in /opt/app/postgres: back up all of /opt/app or snapshot the volume before upgrades. Shlink has no user accounts: access is by API key. Create more keys with 'sudo docker compose exec shlink shlink api-key:generate' in /opt/app. Short links are public by design. Add a GeoLite2 licence key to the compose file to resolve visitor locations.
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.