Back to all templates
YOURLS logo

YOURLS

Development256MB+ RAM

Your Own URL Shortener — self-hosted PHP link shortener with stats, plugins, and a private/public API

developmentdevtoolsyourlsopen-sourceself-hosteddocker

Deploy YOURLS in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select YOURLS

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy YOURLS on a VPS with Server Compass

Use the YOURLS template in Server Compass to deploy a self-hosted URL shortener on your VPS, then verify the install page in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a YOURLS app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for YOURLS

Use the template picker search to find YOURLS in the Server Compass template catalog.

Searching for YOURLS in the Server Compass template picker
4
Step 4

Select the YOURLS template

Choose the YOURLS template. Server Compass fills the PHP web app, MySQL service, install URL, admin user, database credentials, and web port.

YOURLS template selected in Server Compass
5
Step 5

Review the YOURLS settings

Confirm the app name and compose service. In this run, the app was named yourls-demo and used host port 4185.

Reviewing YOURLS project settings and compose services
6
Step 6

Deploy YOURLS

Review the generated compose settings, confirm the YOURLS public URL and web port are correct, and click Deploy.

Reviewing YOURLS environment variables and web port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the YOURLS and MySQL images, starts the containers, and verifies the stack.

Server Compass deploying the YOURLS template on the VPS
8
Step 8

Confirm YOURLS is running

After deployment finishes, return to the Apps tab and confirm the YOURLS app is marked Running with its application URL available.

YOURLS template running in the Server Compass Apps tab
9
Step 9

Open YOURLS in the browser

Open the application URL in a browser. The YOURLS admin install page confirms the PHP app, Apache, and MySQL services are reachable and ready for first-run setup.

The deployed YOURLS install page loaded in a browser

After YOURLS Opens

  • Complete the install if YOURLS redirects to `/admin/install.php`, then sign in with the generated admin credentials.
  • Confirm newly created short links use the YOURLS_SITE public URL instead of localhost.
  • Change the admin password after first sign-in and consider converting it to the bcrypt format recommended by YOURLS.
  • Back up the MySQL volume regularly because it stores all short links and click analytics.
  • Put YOURLS behind HTTPS before using it publicly.

Verified Result

The YOURLS install page loaded successfully from the deployed container.

YOURLS deployment questions

What does the YOURLS template deploy?

It deploys the YOURLS PHP/Apache web app plus a MySQL database with a persistent yourls_db volume.

Which port did the tutorial use?

The tutorial used host port 4185, which maps to Apache on container port 80.

Does YOURLS need setup after deployment?

Yes. On first run, YOURLS redirects to the install page, creates its database schema, and then lets you sign in to the admin dashboard.

Should this become a blog post?

No. The deployment guide should live on the YOURLS template detail page and be linked from the reusable template deployment docs page.

After Deployment

After deploying YOURLS with Server Compass, complete these steps to finish setup

1

Visit http://YOUR_SERVER_IP:{{PORT}}/admin/ and log in with YOURLS_USER / YOURLS_PASS

2

Update YOURLS_SITE to your real public URL (env var + redeploy) so generated short links use the correct hostname

3

Install any plugins under /var/www/html/user/plugins via volume mount or `docker compose exec`

4

(Optional) Put YOURLS behind Traefik/HTTPS and add a real domain via the Domains tab

Need help? Check out our documentation for detailed guides.

YOURLS FAQ

Common questions about self-hosting YOURLS

How do I deploy YOURLS with Server Compass?

Simply download Server Compass, connect to your VPS, and select YOURLS from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for YOURLS?

YOURLS requires a minimum of 256MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing YOURLS data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard YOURLS backup and restore procedures.

How do I update YOURLS to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest YOURLS image will be pulled and deployed with zero downtime.

Is YOURLS free to self-host?

YOURLS is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host YOURLS?

Download Server Compass and deploy YOURLS to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass