Skip to main content

Logo YOURLS

About​

YOURLS is a URL Shortener.

User management​

When installed with Cloudron user management, users log in with the Log in with Cloudron button on the admin login page. Users that previously logged in via LDAP are migrated automatically. Their sessions and API signature tokens keep working.

Admin password​

If the app is installed without Cloudron user directory integration, the admin password can be changed using the File Manager and editing the file /app/data/user/config.php and set a new plain text password.

YOURLS will automatically encrypt this field if you refresh your browser as explained here.

config.php
$yourls_user_passwords = array(
'admin' => 'supersecret123' /* Password encrypted by YOURLS */
);

Custom index page​

By default, the home page redirects to the admin interface at /admin/.

You can edit /app/data/index.html using the File Manager to your liking to customize the home page. You can also add a /app/data/index.php to place a PHP script.

Public shortner​

You can make the URL shortner available to all users. Be aware that a public interface will attract spammers. YOURLS project comes with a public page that be used for this purpose.

  1. Use the Web terminal and set the sample public page as the default page:
Bash
cp /app/code/sample-public-front-page.txt /app/data/index.php
  1. fix the require_once path in /app/data/index.php from dirname(__FILE__).'/includes/load-yourls.php' to /app/code/includes/load-yourls.php. Like so:
index.php
    require_once( '/app/code/includes/load-yourls.php' );

Plugins​

YOURLS supports a wide variety of plugins. To install a plugin, use the Web terminal to unpack a plugin into /app/data/user/plugins/. For example,

Bash
cd /app/data/user/plugins
git clone https://github.com/apelly/YourlsBlacklistDomains.git
chown -R www-data:www-data YourlsBlacklistDomains

Then, activate the plugin using the Manage Plugins link in the admin dashboard.