selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

UrlHum logo

Self-host UrlHum

v0.2.1

Privacy-focused URL shortener with PHP and Laravel

BetaOpen SourceMIT
Updated3 years ago
LanguagePHP
Setup difficultyModerate
Stars
687
Port
8000 (HTTP application server)
Requires
MariaDB/MySQL, Redis
Install with Docker Compose

What is UrlHum?

UrlHum is a PHP and Laravel-based URL shortener focused on privacy protection. It includes IP hashing and anonymization, an admin panel for managing URL creation rules, and analytics showing clicks, geographic data, and referrers. Currently in beta with a warning against production use. Self-hosting options include Docker Compose with MariaDB and Redis, or a Dockerfile running on port 8000.

Should you self-host UrlHum?

UrlHum scores 44/100 on selfhost.directory (how scoring works) and ranks #14 of 23 in URL Shortener. It has 687 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in PHP.

Its closest alternative on selfhost.directory is dub-links (74/100, 24 961 stars). It scores higher overall, so compare the two before you pick. See UrlHum vs dub-links side by side.

Features

  • Admin Panel
  • Analytics Dashboard
  • Privacy-aware URL shortening
  • Short URL analytics via URL

UrlHum README

How to install UrlHum

Install UrlHum with Docker Compose

Environment variables
APP_KEY via URLHUM_APP_KEY environment variable

version: '3'

networks: urlhum: driver: bridge

services: urlhum: image: urlhum build: context: . networks: - urlhum volumes: - ./.env-docker:/app/.env depends_on: - mysql - redis environment: - APP_KEY=${URLHUM_APP_KEY}

mysql: image: mariadb networks: - urlhum volumes: - ./data/database:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=urlhum - MYSQL_USER=url - MYSQL_PASSWORD=hum

redis: image: redis:alpine networks: - urlhum

caddy: image: abiosoft/caddy ports: - "22443:443" - "2280:80" networks: - urlhum volumes: - ./Caddyfile:/etc/Caddyfile

Requires .env-docker file with APP_KEY set

How to configure UrlHum

  • APP_DEBUGfalseDebug mode

    Debug mode

  • APP_ENVproductionApplication environment

    Application environment

  • APP_KEYApplication encryption key

    Application encryption key

  • APP_LOCALEen_USApplication locale

    Application locale

  • APP_NAMEUrlHumApplication name

    Application name

  • APP_URLhttps://urlhum.comApplication URL

    Application URL

  • BROADCAST_DRIVERlogBroadcast driver

    Broadcast driver

  • CACHE_DRIVERfileCache driver

    Cache driver

  • DB_CONNECTIONmysqlDatabase connection type

    Database connection type

  • DB_DATABASEurlhumDatabase name

    Database name

  • DB_HOST127.0.0.1Database host

    Database host

  • DB_PASSWORDhumDatabase password

    Database password

  • DB_PORT3306Database port

    Database port

  • DB_USERNAMEurlDatabase username

    Database username

  • LOG_CHANNELstackLogging channel

    Logging channel

  • MAIL_DRIVERsmtpMail driver

    Mail driver

  • MAIL_FROM_ADDRESSMail from address

    Mail from address

  • MAIL_FROM_NAMEMail from name

    Mail from name

  • MAIL_HOSTMail host

    Mail host

  • MAIL_PASSWORDMail password

    Mail password

  • MAIL_PORT2525Mail port

    Mail port

  • MAIL_USERNAMEMail username

    Mail username

  • PUSHER_APP_CLUSTERmt1Pusher app cluster

    Pusher app cluster

  • PUSHER_APP_IDPusher app ID

    Pusher app ID

  • PUSHER_APP_KEYPusher app key

    Pusher app key

  • PUSHER_APP_SECRETPusher app secret

    Pusher app secret

  • QUEUE_CONNECTIONsyncQueue connection

    Queue connection

  • REDIS_HOST127.0.0.1Redis host

    Redis host

  • REDIS_PASSWORDRedis password

    Redis password

  • REDIS_PORT6379Redis port

    Redis port

  • SESSION_DRIVERfileSession driver

    Session driver

  • SESSION_LIFETIME120Session lifetime in minutes

    Session lifetime in minutes

UrlHum releases & version history

More in URL Shortener

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…