
Shlink
An easy to use, open-source, link shortener web app and API
Shlink Web Client
MykalMachon/shlink-on-railway
Just deployed
Shlink
shlinkio/shlink:stable
Just deployed
Postgres
railwayapp-templates/postgres-ssl:latest
Just deployed
/var/lib/postgresql/data
What is this template?
Shlink is a self-hosted URL shortener that enables you to create, and track the usage of "short" URLs that redirect to other, longer, URLs. Shlink also provides analytics on URL usage, such as visit counts and geographic location of the visitors.
This template spins up:
- Shlink the official shlink application. This handles short links and serves an authenticated API for management.
- Shlink Web Client the official Shlink web client used for managing and monitoring your short links + HTTP basic-authentication via NGINX.
This template makes deploying Shlink extremely easy; It can be setup in less than 5 minutes.
Quick start guide
- Click the "Deploy on Railway" button above
- Follow the setup steps on Railway
- Enter a username for the shlink web client.
- Enter a password for the shlink web client.
- Click "deploy!"
- Monitor your services as the come up; wait until everyting is up with a green checkmark.
- You're good to go!
- You can access the web client using your username and password.
- You can access shlink directly via the API using the API key generated by Railway.
Optional: configuring your own domains
You'll probably want your shlink service to have a custom domain so the generated shortlinks are shorter than the links you're redirecting to.
See this guide on Railway for configuring a custom domain.
Optional: configuring app sleeping
If you want your services to scale down when not in use, you can setup app sleeping on Railway.
See this guide on Railway for configuring app sleeping.
Project structure & services
This template is made up of three railway services:
- Shlink: primary short link application
- The primary short link application.
- Serves a REST API that allows users to manage short links.
- All your generated short links will be at this service's URL.
- Shlink Web Client: web app for managing Shlink
- Web UI for handling your short URLs, creating new ones or monitoring visit stats.
- The Web UI hooks into the Shlink service's API on template generation and requires no extra setup.
- This template bolts on HTTP basic-authentication to the web client making it safe to expose to the internet.
- PostgreSQL Database: primary database used by Shlink
Additional resources
Feedback
If you have feedback on this template, please submit a GitHub issue with as much detail as possible.
Known issues
- Shlink cannot connect to the database via private networking: this is due to the fact that shlink appears to not support IPV6 networking (which Railway uses for it's private networking features). If you can see a way around this, feel free to leave an explanation in the open issue or file a pull request.
Template Content
Shlink Web Client
MykalMachon/shlink-on-railwayUSERNAME
Username for the web client via HTTP basic auth
Shlink
shlinkio/shlink:stable