Self-hosted app·Websites and CMS
Shlink hosting
on a Panama VPS.
Shlink hosting in PTY1, Panama City: Docker Compose with PostgreSQL and Caddy on a $6.99 VPS, with sizing, cost and abuse rules.
- PHP
- PostgreSQL
- Caddy
- Docker
PTY1·Panama City
In stockRecommended for this use case
- 1 Gbps port10 TB of transfer a monthIncluded
- Debian 13preinstalled with the orderIncluded
- DDoS protection, 1 IPv4VNC console and full rootIncluded
Optional: daily backups +20% · extra IPv4 $2 · priority support $10
Pay yearly: $62.99 a year, about 25% less
- No KYC
- Crypto only
- Panama jurisdiction
- 2 vCPU, 2 GB RAM
- 80 GB NVMe local storage
- 10 TB transfer on a 1 Gbps port
- DDoS protection included
- Panamanian law
01/07
Short answer.
Yes. Shlink runs on our Cloud VPS Starter plan in PTY1, Panama City: 2 vCPU, 2 GB RAM, 80 GB NVMe and 10 TB of monthly transfer for $6.99 a month, with Shlink, PostgreSQL and Caddy as three containers on Debian 13. You can deploy Cloud VPS Starter with Debian 13 here and paste the Compose file further down.
The hardware question is the easy one. The decision that matters is who can create links. A shortener that strangers can use turns into a relay for phishing, and a phishing relay on our network is handled under our abuse procedure, which can end in suspension. Shlink's default is the safe one, since only holders of an API key can shorten anything; keep it that way unless you are prepared to run the guardrails described under acceptable use.
02/07
What Shlink is.
Shlink is an open-source URL shortener written in PHP by Alejandro Celaya and released under the MIT licence. The server has no admin screen of its own. You manage it through a REST API, through a command-line tool inside the container, or through a separate front end: the Shlink Web Client, a browser application you can use at app.shlink.io or host yourself, or Shlink Dashboard, a newer self-hosted UI with its own backend, several users and per-user permissions. Every click is stored as a visit with referrer, user agent and, if you supply a MaxMind GeoLite2 licence key, an approximate location. One instance can serve several short domains, and redirects can branch on device, language, query parameters, date (since 5.0) and browser (since 5.1).
When we checked on 5 November 2026, the current release was 5.1.8, published on 21 October 2026, which moved the Docker images to Alpine 3.24 to pick up PHP security fixes. Since 5.1.0 the official image runs PHP 8.5 on RoadRunner, an application server that keeps Shlink loaded between requests, and since 4.0 it runs as a non-root user.
The people who run it want two things a SaaS shortener rents back to them: their own short domain and their own click data. Think of an agency in Panama City sending campaign links for clients in Colombia and Costa Rica, a newsroom (The Markup built a WordPress plugin, Smol Links, on top of Shlink), or a developer who wants short links in transactional mail without a third party seeing every click.
Our servers are in Panama City and answer to Panamanian law. A US DMCA notice has no legal effect here, and we act only on valid orders from competent Panamanian authorities.
03/07
Requirements and sizing.
Shlink listens on port 8080 inside its container. Only Caddy publishes ports, 80 and 443; it fetches a Let's Encrypt certificate and forwards the Host header and the visitor's address. With a single proxy in front, Shlink reads the client IP correctly as it is; the TRUSTED_PROXIES variable exists for chains of more than one proxy. PostgreSQL stays on the internal Docker network.
Memory is where the defaults deserve a second look. The image starts one persistent web worker and one background task worker per CPU, and each Shlink process may grow to 512 MB (MEMORY_LIMIT). On a 2-vCPU Starter that is four processes with a combined ceiling of 2 GB, which is the whole machine before PostgreSQL gets a byte.
A redirect is cheap: one indexed lookup of the short code, one insert into the visits table. Bots probing the bare domain for /wp-login.php and the like are recorded as "orphan visits" by default; unless you want them, switch that off and the table only grows with real clicks.
Transfer is not the constraint. A 302 response is a few hundred bytes, and a cold click that includes a full TLS handshake and certificate chain costs roughly 5 to 7 KB.
| What you run | Plan | vCPU / RAM / NVMe / transfer | Price |
|---|---|---|---|
| Shlink, PostgreSQL and Caddy | Cloud VPS Starter | 2 / 2 GB / 80 GB / 10 TB | $6.99/mo |
| The same plus self-hosted Shlink Dashboard or Web Client, Redis, heavy use of stats | Cloud VPS Standard | 4 / 4 GB / 160 GB / 15 TB | $12.99/mo |
| High-volume campaign traffic with years of visit history | Cloud VPS Pro | 6 / 8 GB / 320 GB / 20 TB | $22.99/mo |
Redis is only needed when several Shlink instances share locks; on one VPS, leave it out.
04/07
Deploying it
on our VPS.
Order the Starter with Debian 13 from the deploy link, then point an A record for your short domain (we use lnk.example.com below) at the VPS's IPv4 address. Do the DNS first: Caddy requests its certificate on first start and fails if the name does not resolve to the server yet.
Install Docker Engine and the Compose plugin from Docker's own Debian repository:
apt update && apt install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian trixie stable" > /etc/apt/sources.list.d/docker.list
apt update && apt install -y docker-ce docker-ce-cli containerd.io docker-compose-pluginCreate the project directory and an .env file with a generated database password:
mkdir -p /opt/shlink/backups && cd /opt/shlink
printf 'SHORT_DOMAIN=lnk.example.com\nMAIN_SITE=https://www.example.com\nDB_PASSWORD=%s\n' "$(openssl rand -hex 32)" > .env
chmod 600 .env/opt/shlink/compose.yaml:
services:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
depends_on:
- shlink
shlink:
image: shlinkio/shlink:5.1 # latest 5.1.x patch
restart: unless-stopped
environment:
DEFAULT_DOMAIN: ${SHORT_DOMAIN}
IS_HTTPS_ENABLED: "true"
DB_DRIVER: postgres
DB_HOST: db
DB_NAME: shlink
DB_USER: shlink
DB_PASSWORD: ${DB_PASSWORD}
WEB_WORKER_NUM: "2"
TASK_WORKER_NUM: "1"
MEMORY_LIMIT: 256M
TRACK_ORPHAN_VISITS: "false"
DEFAULT_BASE_URL_REDIRECT: ${MAIN_SITE}
# GEOLITE_LICENSE_KEY: ${GEOLITE_LICENSE_KEY} # uncomment once you have a MaxMind key
depends_on:
db:
condition: service_healthy
db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_DB: shlink
POSTGRES_USER: shlink
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U shlink -d shlink"]
interval: 5s
timeout: 3s
retries: 20
volumes:
pgdata:
caddy_data:/opt/shlink/Caddyfile:
lnk.example.com {
reverse_proxy shlink:8080
}Start the stack, wait for the database migrations to finish in the log, then create your first API key and a test link:
docker compose up -d
docker compose logs -f shlink
docker compose exec shlink shlink api-key:generate
docker compose exec shlink shlink short-url:create https://www.example.com/campaigns/november
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' https://lnk.example.com/<short-code>The API key is printed once, so store it before closing the terminal. The curl line should answer 302 with your long URL, and it shows up as the first recorded visit. Add the instance to the Web Client with the URL and key; the hosted client runs in your browser and talks to your server directly, and if you would rather not load it from someone else's domain, it is a static site you can serve as a second Caddy site.
Postgres is pinned to major version 17 deliberately: the postgres:18 image changed where it keeps its data directory, and a volume mounted at the old path is the kind of surprise you do not want during an upgrade. Docker also writes its own firewall rules for published ports, which bypass ufw, so never add a ports: line to shlink or db "just for debugging".
For backups, dump the database every night and copy the dumps to an object storage bucket through its S3 API:
docker compose exec -T db pg_dump -U shlink -Fc shlink > /opt/shlink/backups/shlink-$(date +%F).dump
restic -r s3:https://<endpoint>/<bucket> backup /opt/shlink/backups # access keys in AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEYThe bucket holds dump files, not a live database; do not mount it under PostgreSQL.
05/07
Cost.
| Item | Monthly | Note |
|---|---|---|
| Cloud VPS Starter: 2 vCPU, 2 GB, 80 GB NVMe, 10 TB transfer, 1 Gbps | $6.99 | full root, PTY1 |
| Daily VPS backups (+20 %) | +$1.40 | optional |
| 250 GB bucket: 250 GB S3 bucket for off-site dumps | $1.99 | unlimited traffic, no request fees |
| Extra IPv4 | $2.00 | rarely needed for Shlink |
| Starter plus a 250 GB bucket | $8.98 | what we would run |
| Starter billed yearly (≈ −25 %) | ≈ $5.25 | $62.99 a year |
VPS transfer is metered: the Starter includes 10 TB a month, which a shortener will not touch, but it is not unmetered. Every price is on our pricing page. Payment is in crypto only (AVAX, BCH, BNB, BTC, DOGE, ETH, LTC, SOL, TRX, USDC, USDT or XMR), with balances in US dollars. Top-ups start at $25, which covers about three and a half months of Starter; bonuses begin at 5 % from $50, and the unused paid part of a top-up is refundable within 14 days. Ordering is no-KYC: an email address is enough. The GeoLite2 key is a separate matter, because MaxMind runs its own sign-up. If you skip it, Shlink records visits without a location and everything else works.
06/07
Acceptable use
a shortener on our network.
Short links are a standard phishing tool because they hide the destination until the click, which makes a shortener the most abuse-prone application you can put on a $6.99 VPS. The damage lands on your domain first. Once a short domain appears on browser and mail blocklists, every link on it stops working for everyone, your legitimate campaigns included.
If you open link creation to the public or to customers you do not know, the guardrails are not optional. Check each destination against anti-phishing lists before the link goes live (Google Safe Browsing and abuse.ch's URLhaus both offer lookups). Give visitors a one-click way to report a link, for instance on the page your base URL redirects to. Shlink can also scope API keys to one domain or to the links their holder created, which keeps a leaked key from touching the rest. With AUTO_RESOLVE_TITLES left on, your server fetches every destination when a link is created, so a malicious URL gets a visit from your IP; turn it off on a public instance.
Phishing and malware distribution are manifestly unlawful, and we act on those directly. Copyright complaints are different: a DMCA notice has no legal effect on servers in Panama. We forward copyright complaints to the customer and act on a decision of a competent Panamanian authority, or where the content is manifestly unlawful.
07/07
Where the click
data sits.
Each visit row holds the visitor's IP in obfuscated form (the default; upstream warns that turning ANONYMIZE_REMOTE_ADDR off takes you out of GDPR compliance), plus user agent and referrer. On a VPS in PTY1 that data falls under Panama's Law 81 of 2019 on personal data protection, implemented by Executive Decree 285 of 2021. Article 29 of the Constitution allows private communications to be intercepted only on a judicial order, and private documents to be examined only on the order of a competent authority for specific purposes. Foreign requests travel through treaty channels such as the Panama–US mutual legal assistance treaty, in force since 6 September 1995; as of 31 October 2026 the US Department of Justice lists CLOUD Act executive agreements only with the United Kingdom and Australia. Law 51 of 2009 requires telecommunications companies and other communication networks to keep certain user data for six months, and whether that reaches a hosting provider is a question for Panamanian counsel. If you are an EU controller shortening links for EU visitors, Panama has no adequacy decision, so the transfer needs safeguards such as the 2021 standard contractual clauses.
Catalogue·Options
Every configuration, every option, every price.
Six cloud VPS plans on AMD EPYC with local NVMe. Transfer is included on every plan, from 10 TB to 100 TB a month.
| Plan | vCPU | Memory | NVMe | Transfer | Port | Price | Deploy |
|---|---|---|---|---|---|---|---|
| StarterRecommendedStaging, dev | 2 | 2 GB | 80 GB | 10 TB / month | 1 Gbps | $6.99/mo | Deploy Starter |
| StandardSmall apps | 4 | 4 GB | 160 GB | 15 TB / month | 1 Gbps | $12.99/mo | Deploy Standard |
| ProProduction | 6 | 8 GB | 320 GB | 20 TB / month | 1 Gbps | $22.99/mo | Deploy Pro |
| PowerHeavy workloads | 12 | 16 GB | 640 GB | 40 TB / month | 2 Gbps | $42.99/mo | Deploy Power |
| UltraDatabases | 16 | 32 GB | 1000 GB | 60 TB / month | 2 Gbps | $65.99/mo | Deploy Ultra |
| TitanDense hosts | 32 | 64 GB | 2000 GB | 100 TB / month | 5 Gbps | $119.99/mo | Deploy Titan |
Every plan runs on AMD EPYC with local NVMe. Yearly billing costs about 25% less.
Every plan
- AMD EPYCon every host
- Local NVMenot network storage
- DDoS protectionalways on
- 1 IPv4 addressmore at $2 each
- VNC consoleand full root access
FAQ
Questions
people ask first.
Short answers about running this in PTY1. If yours is not here, open a ticket from your panel.
Can I skip PostgreSQL and use the built-in SQLite database?
For a test, yes. For anything you intend to keep, no: upstream does not support SQLite in production, warns against it on Docker volumes in particular, and notes that updates may break it. The Starter is sized with PostgreSQL included, so there is nothing to save.
How many clicks can the Starter plan handle?
Transfer allows about 1.6 billion redirects a month in theory. If the stats pages slow down before the redirects do, move to the Standard plan for the extra RAM.
Can one Shlink instance serve several short domains?
Yes. Point each domain's A record at the VPS, add it as another site block in the Caddyfile, and Shlink accepts it; DEFAULT_DOMAIN is only the one used when you do not name a domain. Each domain can have its own redirect for the bare URL and for unknown codes.
How do I upgrade Shlink?
Take a pg_dump, change the image tag if you are moving to a new minor version, then run docker compose pull && docker compose up -d; migrations run when the container starts. The move to 5.1 added an indexed hash of every long URL and backfills it, so on a large table the first start takes longer than usual.
Does the hosted Web Client send my API key to a third party?
The client at app.shlink.io runs in your browser and keeps the server list there; requests go from your browser to your instance. If you do not want to load the code from shlink.io at all, host the Web Client yourself, or run Shlink Dashboard, which keeps the API keys on its own backend.
Sources
Every fact on this page, with its source
Checked 5 Nov 2026 unless noted.
Panamanian law and authorities
- Law 81 of 26 March 2019, implemented by Executive Decree 285 of 28 May 2021Gaceta Oficial 28743-A
- Law 51 of 2009, six-month retention (art. 6)Gaceta Oficial 26374
- Article 29 of the ConstitutionGaceta Oficial 25176, Legispan
EU and other countries
- CLOUD Act executive agreements limited to the UK and Australiajustice.gov · verified 31 Oct 2026
- Transfers without an adequacy decisionGDPR, Article 46
Industry, providers and software
Other references
- Docker image tags, default SQLite database, api-key:generate, RoadRunner-only images since 4.0, non-root since 4.0Shlink docs, Install Docker image
- MEMORY_LIMIT default 512M, worker counts per CPU, TRUSTED_PROXIES, TRACK_ORPHAN_VISITS, ANONYMIZE_REMOTE_ADDR, AUTO_RESOLVE_TITLES, redirect codesShlink docs, Environment variables
- SQLite not supported in productionShlink docs, Supported database engines
- RoadRunner as the recommended runtimeShlink docs, Supported runtimes
- Forwarding client IP and Host through a proxyShlink docs, Using a reverse proxy
- No geolocation without a key; MaxMind account requiredShlink docs, GeoLite2 licence key
- Obfuscated IP storage and orphan visitsShlink docs, Tracking visits
- Shlink Dashboard, Web Client, Smol LinksShlink apps
- Panama–US mutual legal assistance treaty, signed 1991, in force 6 September 1995US Department of State
Your server in Panama,
ready when you are.
Cloud VPS start at $6.99 a month and are ready 60 to 120 seconds after you order.