---
title: Deploy Shlink with AI on Blossom
url: "/deploy/shlink/"
canonical_url: https://blossom88.com/deploy/shlink/
markdown_url: https://blossom88.com/deploy/shlink.md
summary: Self-host Shlink on Blossom to create short links, track visits, and manage
  them in a private Web Client.
categories:
- deployment
- links
- analytics
stack:
- PHP
- React
- PostgreSQL
---

# Deploy Shlink with AI on Blossom

[Shlink](https://shlink.io/) turns long URLs into short links and tracks
visits. The Web Client lets you manage links and see their activity.

![A saved short link in the Shlink Web Client.](/deploy/assets/images/shlink/short-links.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy Shlink on Blossom and help me create my first short link.
>
> Follow this guide: https://blossom88.com/deploy/shlink/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Give Your First Link a Name

Create a short link to a page you own. Open it and view the visit in
Shlink so you can see how the redirect and reporting work.

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Use the [official Shlink images](https://shlink.io/documentation/install-docker-image/).
Deploy the backend on port 8080 and link [managed PostgreSQL](/docs/data/).
Pass the linked credentials to Shlink’s database settings and use the
public HTTPS hostname as its short-link domain.

Keep the Web Client behind Blossom Account access in a separate
Environment. Connect it to the backend with a private Shlink API key.
Enter the key in the browser’s connection form.

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data links.yml
    blossom environment:create --data web-client.yml
    blossom database_instance:create --data postgres.yml
    blossom environment_link:create --data database-link.yml
    blossom service:create --data links-service.yml
    blossom service:create --data client-service.yml
    blossom environment:deploy --id environment-100 --follow
    blossom environment:deploy --id environment-200 --follow

</details>

## What You Get

- Public short links with a private management dashboard
- Links and visit history stored in managed PostgreSQL
