this post was submitted on 09 Mar 2025
73 points (95.1% liked)

Selfhosted

43815 readers
449 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

A self-hosted URL shortener: Shlink - Keep control over all your shortened URLs, by serving them under your own domains, using this simple yet powerful tool. https://shlink.io/

I was very surprised to find this mature, full-featured URL shortener. It's written in PHP and includes Geoblocking so your shortener isn't abused.

A Docker quick-start guide: https://lnk.clifmo.com/ljk13

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 22 hours ago (2 children)

This maybe isn't for everyone but I de-dockerified Shlink pretty quickly. Moving it to two nginx vhosts (server and admin) on a Shlink LXC and a centralized Postgres server made dealing with it a lot easier.

E.g., the initial API key shenanigans were less fiddly after I took more direct control.

[–] [email protected] 2 points 21 hours ago (1 children)

Interesting. I deploy to my homelab with Docker so it was a fit for me. But I do want to tinker on the API to disable everything but GET. Can you share anything more about breaking it up?

[–] [email protected] 2 points 17 hours ago

It was mostly uneventful, to be honest. I downloaded the two apps (static admin and the php app), tossed them into /opt/www, and set up nginx to serve PHP. The config in the main app had a section for my Postgres settings and the docs gave the instructions on putting the default server configuration into the static site.

The only challenge was actually rather silly: I don't use PHP so it took me a bit to understand why apt install php installed Apache when I had already installed nginx. Once I found php-fpm it was smooth sailing from there.