"I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free."
I felt exactly the same way and did, in fact, build one.[1]
It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no tracking or cookies or third party connections, which I find pleasing.
The disappointing part is seeing the malicious spam and phishing URLs that get shortened. We have had to manually flag-hold-approve a lot of strings and IIRC we outright block anything with 'paypal' in it.
We also gave a kill-function to our upstream ISP so that they could immediately act on phishing complaints without our having to be involved in real-time.
[1] https://0x.co
[2] https://0x.co/hnfaq.html