{"id":37202067,"url":"https://github.com/clever/shorty","last_synced_at":"2026-01-14T23:18:13.847Z","repository":{"id":37430996,"uuid":"41757144","full_name":"Clever/shorty","owner":"Clever","description":"shorten your urls, deploy simply, keep things organized","archived":false,"fork":true,"pushed_at":"2025-07-25T04:57:29.000Z","size":623,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-07-25T09:45:29.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"schimmy/shorty","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clever.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-01T18:54:25.000Z","updated_at":"2025-06-09T19:52:57.000Z","dependencies_parsed_at":"2023-01-21T11:46:01.334Z","dependency_job_id":null,"html_url":"https://github.com/Clever/shorty","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Clever/shorty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fshorty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fshorty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fshorty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fshorty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clever","download_url":"https://codeload.github.com/Clever/shorty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fshorty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T23:18:13.084Z","updated_at":"2026-01-14T23:18:13.792Z","avatar_url":"https://github.com/Clever.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shorty: A Simple, Self-Hosted URL Shortener\n\n[![GoDoc](https://godoc.org/github.com/Clever/shorty?status.svg)](http://godoc.org/github.com/Clever/shorty)\n\nWhat, you need more information than the title?\n\nI looked around and found a bunch of toy examples of backend URL shorteners in Go, or PHP/MySQL solutions which seemed complicated and less-than-fully-featured.\nI wanted to make something that spins up with super-simple configuration and has a pluggable backend. Please contribute!\n\nIf you don't like what you see, you can also check out the other alternatives:\n- [YOURLS](yourls.org)\n- [Google Apps](http://www.makeuseof.com/tag/use-your-google-apps-domain-to-make-short-urls/)\n- [Other \"shorty\" repos on Github](https://github.com/search?q=shorty)\n\n## Goals For The Project\n- Optimized for simple deployment\n- Designed for internal network use\n- Clear ownership of URLs\n- Expiry of URLs unless explicitly set (TODO: flash warning if URL is about to expire)\n- Tags to allow grouping / organization\n\n## Deployment\nAfter a few simple steps, I promise you will be up and running and won't need to touch it again.\n\n### Pick a backend database.\nCurrently the only two options are:\n- PostgreSQL\n- Redis\n\n*If you have a favorite backend you don't see here, please help me by creating a pull request!*\nI recommend a persistent storage - your users are not going to be happy if they lose these URLs!\n\n### Edit the database creation script\nFind the script corresponding to your database and open it in a text editor. If there are TODOs, follow the instructions.\nYou may modify this as you wish (for instance, perhaps you may want to use a different Postgres `schema` than '`shortener`'), however this means that you'll likely have to be more careful setting other environment variables later.\n- [PostgreSQL](https://github.com/schimmy/shorty/blob/master/pg_schema.sql)\n\n### Run the database creation script\n\n#### PostgreSQL\nEnter your admin-user's password when prompted.\n```bash\npsql -p 5432 -U YOUR_ADMIN_USER -d YOUR_DATABASE -f ./scripts/postgres.sql\n```\nYou also might want to change the default password for the `shortener` user:\n```bash\npsql -p 5432 -U YOUR_ADMIN_USER -d YOUR_DATABASE -c \"ALTER ROLE shortener WITH PASSWORD 'TODO'\"\n```\n\n### Pick a deployment method\n\n#### Docker\nThe latest published image at: [schimmy/easy-url-shortener](dockerhub TODO). Run this Docker container with the relevant environment variables for your database.\n\n#### Standalone Server (Windows, Linux)\nWe also release binaries for Windows and Linux, available at [github.com/schimmy/shorty/releases](https://github.com/schimmy/shorty/releases).\nAfter setting the relevant environment variables, simply execute the binary.\nLikely you'll want to ensure that it restarts on reboot, etc, and I've included an [init script](TODO) to help you out.\n\nLinux example:\n```bash\nPG_HOST=my-postgres.colinschimmelfing.com PG_PASS=super_secret ./shorty --read-only=false\n```\n\n## That's it, you're done!\n\nIf you'd like other methods of deploying, please create a pull request with support and documentation.\n\n### Advanced Usage\n\n#### Readonly / External Facing\n\nYou might want to expose and use these redirects outside of your VPN, but there's a problem: you need to ensure that *your organization* has control over the URLs. While we will add an authentication gateway in the future, you can also use the `read-only` mode to solve this issue.\n\nTo do this, run one instance in `read-only` mode, and point your external DNS (in this example: `colinshorty.com`) at that instance:\n```bash\nPG_HOST=my-postgres.colinschimmelfing.com PG_PASS=super_secret ./shorty --read-only=true --domain=colinshorty.com --protocol=https\n```\nThen, run one private instance pointing to the same backend. This is your admin interface.\nSet all parameters except `read-only` to the same values as the external instance so that it's easier to copy-paste the submitted URLs\n```bash\nPG_HOST=my-postgres.colinschimmelfing.com PG_PASS=super_secret ./shorty --read-only=false --domain=colinshorty.com --protocol=https\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclever%2Fshorty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclever%2Fshorty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclever%2Fshorty/lists"}