Deploy Campaign Short Link API with Shlink
Campaign short-link API with a generated API key and private Postgres.
Postgres
Just deployed
Just deployed
Deploy and Host Campaign Short Link API with Shlink on Railway
Campaign short-link API with a generated API key and private Postgres.
About Hosting Campaign Short Link API with Shlink
Small marketing teams managing short links from their own tools.
Retrieve INITIAL_API_KEY from Railway variables. Use it as the X-Api-Key header for POST /rest/v3/short-urls with a longUrl JSON field, then open the resulting short URL. Set a custom domain and update DEFAULT_DOMAIN before creating production links.
Included services and storage
| Service | Persistent storage | Public access |
|---|---|---|
| App | None; container state is disposable | HTTPS domain |
| Postgres | /var/lib/postgresql/data | Private network only |
First deployment
- Review required inputs in the deploy form and supply your own administrator email where requested.
- Deploy the services and wait for the application and any database migrations to finish.
- Open the generated HTTPS domain and follow the workflow above.
Why Deploy Campaign Short Link API with Shlink on Railway
The definition supplies an HTTPS endpoint, generated credentials where supported and explicit storage paths. PostgreSQL, when present, stays private. Public upstream image manifests are locked to immutable digests so an upstream tag change does not silently replace a running version.
Common Use Cases
- Create campaign-specific short URLs.
- Tag link cohorts for reporting.
- Build short-link creation into an internal workflow.
Dependencies for Campaign Short Link API with Shlink
- Upstream application and its documentation. The upstream authors own the application and its license. This recipe does not claim application authorship or official endorsement.
- Private PostgreSQL 17 database and its persistent volume.
- A Railway plan with resources sufficient for these services. Hosting, storage and outbound traffic are billed by Railway; no software subscription, bank connection, SMTP account or provider credit is included.
Operational limits and backups
The REST API and public redirects are included; a management dashboard is not. GeoIP enrichment needs your own MaxMind license and is optional. Normal visitor analytics can involve personal data; configure retention and tracking choices for your use. Rotating INITIAL_API_KEY alone does not revoke previously created keys.
Run one replica for volume-backed applications. Schedule volume backups and export important application data; a persistent volume is not a backup. Keep generated secrets with the backups and review upstream migration notes before changing the pinned image. Credentials cannot all be rotated by changing first-run environment variables after accounts already exist.
Validation status
Prepared on 2026-10-18 from upstream installation documentation and public image manifests. Railway schema, variable references and publication metadata are checked before publication. Application runtime boot checks were not performed. This is an independently authored deployment recipe for existing software, not a claim of novel software, audited security or Railway partner verification.
Deploy this recipe
Review the required inputs and hosting resource costs before deploying.
Related deployment recipes
- Twenty CRM with Worker & Shared S3 — CRM with Postgres, Redis, background worker and shared S3 file storage.
- Ubuntu Browser Terminal Starter — Password-protected Ubuntu web terminal with a persistent workspace volume.
- Ubuntu SSH and AI CLI Starter — SSH development container with generated credentials and durable workspace.
These are separate deployments; no preconfigured integration between the applications is implied.
Disclosure: this template is maintained independently. Its maintainer may earn Railway usage kickbacks when other people deploy it. Railway bills hosting separately; no paid software subscription or provider credits are included.
Template Content
Postgres
postgres