One shareable link to all your app market listings: it opens the App Store on iPhones and iPads, Google Play on Android, and a landing page everywhere else.
- π± Automatic device detection: sends users straight to the right store (Google Play or Apple App Store) based on their device, including iPads that identify as a Mac
- π₯οΈ Landing page fallback: desktop browsers and other devices get a clean page with your app icon, title, description and store badges
- π¬ Rich link previews: Open Graph and Twitter Card tags give your link a proper preview in messengers and social media
- ποΈ Many apps, one service: one YAML file per app, no database, no admin UI
- π³ Easy deployment: a single Docker image for
amd64andarm64that runs as non-root and has a health check - π Secure by default: strict Content Security Policy, escaped output and validated configuration, with caching headers that keep CDNs from mixing up devices
- Marketing campaigns: share a single link in emails, social media posts or ads
- Print materials: one QR code for brochures, posters and flyers that works on every phone
- In-app recommendations: let users share your app via messengers with a link that works for their friends, whatever phone they use
| Maintainer | GitHub | Social |
|---|---|---|
| Stefan Huber | stefanhuber |
Run the service with the example configuration from this repository:
git clone https://github.com/smartcompanion-app/applink.git && cd applink
docker run --rm -p 9080:80 -v "$(pwd)/docs/example_storage:/applink/storage:ro" ghcr.io/smartcompanion-app/applinkOpen http://localhost:9080/atlas-trails. A desktop browser shows the landing page; a phone is redirected to its app store.
The image is published to the GitHub Container Registry as ghcr.io/smartcompanion-app/applink. Tags follow the release version: 0.2.0 (exact), 0.2 (latest patch) and latest.
Moving from Docker Hub? The image
stefanhuber332/applinkis no longer updated. Replace it withghcr.io/smartcompanion-app/applink; the volume path, port and configuration format are unchanged.
Every image comes with a signed SLSA build provenance attestation, which proves that it was built from this repository by its release workflow, and an SBOM. Check it with the GitHub CLI before deploying:
gh attestation verify oci://ghcr.io/smartcompanion-app/applink:0.2 -R smartcompanion-app/applinkservices:
applink:
image: ghcr.io/smartcompanion-app/applink:0.2
ports:
- "9080:80"
volumes:
- ./storage:/applink/storage:ro
restart: unless-stoppedAll configuration lives in a storage directory that is mounted into the container at /applink/storage:
storage/
βββ configuration/
β βββ myapp.yml β https://applink.example.com/myapp
β βββ otherapp.yml β https://applink.example.com/otherapp
βββ icons/
βββ myapp.png β https://applink.example.com/icons/myapp.png
βββ otherapp.png
Each .yml file in configuration/ is one app, and its filename is the path of the link. Identifiers may contain letters, digits, - and _. The query form https://applink.example.com/?app=myapp works too. Images in icons/ are served as they are. Changes take effect immediately, without a restart.
A full example, the fictitious Atlas Trails app, is available in docs/example_storage:
links:
ios: https://apps.apple.com/app/atlas-trails/id6450123456
android: https://play.google.com/store/apps/details?id=app.atlastrails
page:
base-url: http://localhost:9080
title: Atlas Trails
description: Discover 20,000 hiking trails with offline maps, live navigation and summit stories.
background-color: 'radial-gradient(circle at 15% 20%, #34d399 0%, transparent 45%), radial-gradient(circle at 85% 85%, #0ea5e9 0%, transparent 50%), linear-gradient(135deg, #064e3b 0%, #0f172a 100%)'
app-icon: atlas-trails.png| Option | Required | Description |
|---|---|---|
links.ios |
one of both | App Store link. iPhones, iPads and iPods are redirected here. |
links.android |
one of both | Google Play link. Android devices are redirected here. |
page.title |
yes | App name, shown on the landing page and in link previews. |
page.description |
no | Short description for the landing page, search engines and link previews. |
page.app-icon |
no | Filename of the icon in icons/, used on the landing page, as favicon and as preview image. |
page.background-color |
no | Any CSS background value: a color, gradient or image, e.g. url(https://example.com/bg.jpg) center / cover. Images must be served over https (or from icons/). |
page.base-url |
no | Public URL of the service, e.g. https://applink.example.com. Link previews need absolute URLs, so set it if requests do not reach applink with the public host name. Without it, the URL is derived from the request (Host and X-Forwarded-Proto). |
Links have to be absolute https, http, itms-apps or market URLs. An invalid configuration is reported in the container log, and the link responds with an error page instead of a broken one.
| Variable | Default | Description |
|---|---|---|
APPLINK_STORAGE |
/applink/storage |
Path of the storage directory inside the container. |
| Request | Response |
|---|---|
iPhone, iPad (iOS β€ 12) or iPod with an ios link |
302 redirect to the App Store |
Android device with an android link |
302 redirect to Google Play |
| iPad on iPadOS 13+ | Landing page, which forwards to the App Store with JavaScript, since these iPads identify as a Mac and can only be detected by their touch screen |
| Anything else, or no link for the platform | 200 landing page with store badges |
| Unknown app | 404 error page |
| Invalid configuration | 500 error page, details in the container log |
/healthz |
200 ok, used by the Docker health check |
applink serves plain HTTP on port 80 and expects a reverse proxy or load balancer in front of it for TLS, for example Traefik, Caddy, nginx or a cloud load balancer. Forward the Host header and set X-Forwarded-Proto, or set page.base-url per app.
App responses send Vary: User-Agent and Cache-Control: no-store. If you put a CDN in front of applink, keep those headers intact. Otherwise the CDN may send every visitor to the store of whoever opened the link first.
Requires PHP 8.4+ and Composer:
composer install
composer serve # http://localhost:8080/atlas-trails with docs/example_storage
composer check # code style, PHPStan and testsSee CONTRIBUTING.md for the project layout, testing and the release process.
BSD 2-Clause Β© SmartCompanion
