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=VALUE

Specification

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
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.

ServiceImageTagPortsVolumes
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.

ServiceVariableValue
dbMARIADB_DATABASEPreset by the template
dbMARIADB_PASSWORDGenerated at deploy
dbMARIADB_ROOT_PASSWORDGenerated at deploy
dbMARIADB_USERPreset by the template
yourlsYOURLS_DB_HOSTPreset by the template
yourlsYOURLS_DB_NAMEPreset by the template
yourlsYOURLS_DB_PASSGenerated at deploy
yourlsYOURLS_DB_USERPreset by the template
yourlsYOURLS_PASSYou must set this
yourlsYOURLS_SITEPreset by the template
yourlsYOURLS_USERPreset by the template

First run

  1. Open /admin/install.php on the app address and click Install YOURLS once.
  2. Sign in at /admin/ with the user and password from the install form.

Install YOURLS on a VPS

  1. 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
  2. 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 | sh if the machine does not have it. See Getting started.

    levelrail-cli login --device
  3. Read the template

    Shows the entry, including its full compose.yaml.

    levelrail-cli templates get yourls
  4. 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=VALUE

    To 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.

More in Applications

All Applications templates