---
title: "Deploy YOURLS + plugins"
description: "The de facto standard self-hosted URL shortener with added plugins"
category: "Other"
url: https://railway.com/deploy/yourls-mysql-with-plugins
---

# Deploy YOURLS + plugins

The de facto standard self-hosted URL shortener with added plugins

**[Deploy YOURLS + plugins on Railway](https://railway.com/template/yourls-mysql-with-plugins)**

- **Creator:** fredovecino
- **Category:** Other
- **Total deploys:** 10

## Template content

### MySQL

- **Image:** mysql:9
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

### YOURLS

- **Image:** prismatechcorp/yourls-custom:latest
- **Public domain:** Yes

## Documentation


# Deploy and Host YOURLS-MySQL with plugins on Railway

YOURLS is a powerful set of PHP scripts that empowers you to run Your Own URL Shortener, on your server. With YOURLS, you have complete control over your links, detailed statistics, plugin support, and more, all wrapped in a free and open-source package.

This  **improved**  Docker image bundles YOURLS with the expiry plugin preinstalled.

## About Hosting YOURLS-MySQL with plugins

### Post deployment actions [IMPORTANT!]

Railway currently fails to identify the correct port of the application, to fix this issue wait until the YOURLS service is deployed, navigate to  **Settings > Network > Edit**  the public domain to redirect to port  **8080**.

After this you can navigate to your public domain + /admin to install the application.

The admin user and password are available as environment variables (`YOURLS_USER`,  `YOURLS_PASS`).

To use your own domain for link generation, set  `YOURLS_HOST`  to that domain and redeploy the service.

## Common Use Cases

-   Generate branded short URLs and track click analytics in real time.
-   Simplify complex, parameter-rich links for sharing in emails, social posts, or SMS campaigns.
-   Create time-limited or quota-limited promo links using the Expiry plugin.

## Dependencies for YOURLS-MySQL with plugins Hosting

-   [YOURLS Extended image](https://hub.docker.com/r/prismatechcorp/yourls-custom)
-   [MySQL 9 image](https://hub.docker.com/_/mysql)

### Deployment Dependencies

YOURLS Official Site:  [https://yourls.org/](https://yourls.org/)  
YOURLS Docker Hub:  [https://hub.docker.com/_/yourls/](https://hub.docker.com/_/yourls/)  
Expiry plugin by joshp23:  [https://github.com/joshp23/YOURLS-Expiry](https://github.com/joshp23/YOURLS-Expiry)

## Why Deploy YOURLS-MySQL with plugins on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying YOURLS-MySQL with plugins on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/yourls-mysql-with-plugins
