Back to Apps
yourls

Deploy yourls on Your Own Server

YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener.

πŸ“¦ Other

Want to deploy yourls on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.

Get Started

What is yourls?

YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener.

Self-Host yourls

Follow these steps to deploy on your own server.

1

Install Docker

Skip this step if Docker is already installed on your server.

curl -fsSL https://get.docker.com | sh
2

Configure

Customize the settings below. Defaults work for most cases.

General
3

Deploy

Copy the configuration and run it on your server.

services:
  yourls:
    image: yourls:1.9.2
    environment:
      YOURLS_DB_HOST: yourls-db:3306
      YOURLS_DB_NAME: yourls
      YOURLS_DB_PASS: df2e63e0e9b1b067
      YOURLS_DB_USER: yourls
      YOURLS_PASS: ""
      YOURLS_SITE: ""
      YOURLS_USER: ""
    volumes:
      - yourls-plugins:/usr/src/yourls/plugins
    depends_on:
      - yourls-db
  yourls-db:
    image: mysql:5.7
    environment:
      MYSQL_DATABASE: yourls
      MYSQL_PASSWORD: df2e63e0e9b1b067
      MYSQL_ROOT_PASSWORD: df2e63e0e9b1b067
      MYSQL_USER: yourls
    volumes:
      - yourls-db-data:/var/lib/mysql
volumes:
  yourls-plugins: {}
  yourls-db-data: {}

Then run:

docker compose up -d
4

Access

Once started, access your app at http://localhost:80

Why Self-Host yourls?

Full Data Ownership

Your data stays on your servers. No third-party access.

No Monthly Fees

Pay only for your server. No per-seat or usage charges.

Complete Control

Customize, backup, and scale on your own terms.

Privacy & Compliance

Meet GDPR, HIPAA, or internal security requirements.

Technical Details

Docker Image

yourls:${yourls_version}

Want to go faster?

Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.

Install on any Linux server:

sh -c "$(curl -sSL https://get.senate.sh)"