Self-host YOURLS on a VPS
A self-hosted URL shortener with custom keywords, click statistics and a plugin system. Runs with a bundled MariaDB database. The admin login is the user and password you set in the install form.
Needs configuration: set YOURLS_PASS before the first start.
levelrail-cli templates install yourls --name my-yourls --env YOURLS_PASS=VALUESpecification
- Status
- Listed
- Category
- Applications
- Services
- db, yourls
- Ports
- 8080
- Volumes
- 1
- Memory
- about 256 MiB
- arm64
- image published
- amd64
- image published
- Settings to fill in
- 1
- License
- Permissive license, MIT
- Listing
- Community template
About YOURLS
A self-hosted URL shortener with custom keywords, click statistics and a plugin system. Runs with a bundled MariaDB database. The admin login is the user and password you set in the install form.
What it deploys
YOURLS runs as 2 services in a single Compose app, listening on port 8080, with 1 named volume mount.
| Service | Image | Tag | Ports | Volumes |
|---|---|---|---|---|
| db | mariadb | 11.8.9 | none | dbdata -> /var/lib/mysql |
| yourls | yourls | 1.10.6 | 8080 | none |
Before you install
- CPU architecture. arm64 listed. Every image lists linux/arm64 in its registry manifest. That is a manifest fact, not proof the app runs on Arm.
- Listed. It is in the catalog. Back up the data volume before changing an image tag.
Settings and environment
You must set YOURLS_PASS. 3 secrets are generated at deploy and stored encrypted. Values are never shown here.
| Service | Variable | Value |
|---|---|---|
| db | MARIADB_DATABASE | Preset by the template |
| db | MARIADB_PASSWORD | Generated at deploy |
| db | MARIADB_ROOT_PASSWORD | Generated at deploy |
| db | MARIADB_USER | Preset by the template |
| yourls | YOURLS_DB_HOST | Preset by the template |
| yourls | YOURLS_DB_NAME | Preset by the template |
| yourls | YOURLS_DB_PASS | Generated at deploy |
| yourls | YOURLS_DB_USER | Preset by the template |
| yourls | YOURLS_PASS | You must set this |
| yourls | YOURLS_SITE | Preset by the template |
| yourls | YOURLS_USER | Preset by the template |
First run
- Open /admin/install.php on the app address and click Install YOURLS once.
- Sign in at /admin/ with the user and password from the install form.
Install YOURLS on a VPS
-
Install Levelrail on a fresh VPS
Run this as root on a Linux server (amd64 or arm64) with ports 80 and 443 reachable. The installer prints a setup link.
curl -fsSL https://levelrail.com/install.sh | sudo sh -
Sign in
Open the setup link, choose a password, then log the CLI in. The CLI install command is
curl -fsSL https://levelrail.com/install-cli.sh | shif the machine does not have it. See Getting started.levelrail-cli login --device -
Read the template
Shows the entry, including its full compose.yaml.
levelrail-cli templates get yourls -
Install it
This template has an install form, so the CLI fills each setting from --env, a generated secret or its default. Replace VALUE with your own YOURLS_PASS.
levelrail-cli templates install yourls --name my-yourls --env YOURLS_PASS=VALUETo put a service behind a domain at install, add
--domain SERVICE=HOST:levelrail-cli templates install yourls --name my-yourls --domain db=yourls.example.com
Without a domain the app gets an sslip.io address. You can also deploy it from the dashboard: Apps, New app, Browse templates, then YOURLS.
Docs and upstream
More in Applications
- Z-Wave JS UIA control panel and MQTT gateway for Z-Wave networks that pairs with Home Assistant.
- WordPressThe world's most widely used content management system, self-hosted with its own database.
- WizarrAn invitation and onboarding manager for Jellyfin, Plex and Emby servers. MIT licensed. On first open, create the admin account, then connect your media server.
- WebtopA full Linux desktop in your browser, running as a container with a login.
- Vvveb CMSA CMS for building websites, blogs, and ecommerce stores.
- ThingsBoardAn IoT platform to collect, store and visualise device data, in one container with its own PostgreSQL.