this post was submitted on 28 Mar 2025
119 points (94.7% liked)

Selfhosted

45453 readers
273 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 simple selfhosted URL shortener with no unnecessary features. Simplicity and speed are the main foci of this project. The docker image is ~6 MB (compressed), and it uses <5 MB of RAM under regular use.

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 16 points 6 days ago

It's neat that this exists, but not neat if someone hosts it for a year, a bunch of fed users rely on it and share a bunch of links using it, and then the hoster takes it down for whatever reason, and now there are a bunch of dead links littered all over the place.

Even less neat if some malicious group can then buy the lapsed domain and forward all those dead links to ads and viruses.

Please host responsibly, is all I'm saying.

[–] [email protected] 13 points 6 days ago (2 children)

I use this in my house, it's great. I chose this over others because it allows defining the url path specifically. (Domain.com/whatever)

I have all my pdf manuals and docs uploaded to Paperless ngx. From within Paperless I make them externally linkable.

I take those long nonsense links, shorten them using chhoto with meaningful paths (like /mitersaw) then convert all of those to qr codes that I print out and stick to whatever object is relevant.

Say if I'm working on my chainsaw or whatever and need the manual, point my phone at the qr code and open the manual from my network for my exact model.

[–] [email protected] 2 points 6 days ago

That’s pretty damn clever

[–] [email protected] 2 points 6 days ago

That's great to know. Btw, you don't actually need to specify the url path for it to work. That's just for convenience of copying the link from the UI. It'll just work as long as the server is reachable at that address.

[–] [email protected] 0 points 6 days ago (1 children)

Please don't use url shorteners, this hides any information the url gives you about where it is taking you. Also most things on the internet support the concept of a link where the url is hidden behind friendly text but still inspectable without clicking by mousing over it.

[–] [email protected] 4 points 6 days ago

You're only thinking of public use cases. For personal use, as I'm sure most people self-hosting would be using it for, it's very convenient. I use it for work for typing long urls into a new computer we don't yet have remote management of yet. At home, it makes it really easy to type any link with a TV remote or controller.

[–] [email protected] 4 points 1 week ago (1 children)

Looks awesome and very efficient, does it also run with read_only: true (with a db volume provided, of course!)? Many containers just need a /tmp, but not always

[–] [email protected] 3 points 6 days ago* (last edited 6 days ago) (1 children)

Thanks. I had never tested this before. Seems like it throws errors. Of course, adding and deleting links don't work. But that's to be expected. But also link resolution fails since it cannot update the hit count properly. If this is a legitimate use case for you, I might work on making it work.

[–] [email protected] 4 points 6 days ago* (last edited 6 days ago)

I try to slap anything I’d face the Internet with with the read_only to further restrict exploit possibilities, would be abs great if you could make it work! I just follow all reqs on the security cheat sheet, with read_only being one of them: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

With how simple it is I guessed that running as a userand restricting cap_drop: all wouldn’t be a problem.

For read_only many containers just need tmpfs: /tmp in addition to the volume for the db. I think many containers just try to contain temporary file writing to one directory to make applying read_only easier.

So again, I’d abs use it with read_only when you get the time to tune it!!

[–] [email protected] 1 points 1 week ago (3 children)

So why would this need docker at all?

[–] [email protected] 16 points 1 week ago

Makes it easier to distribute and set up

[–] [email protected] 9 points 1 week ago* (last edited 1 week ago)

Like the other guy said, it's not necessary. But docker makes it much easier to deploy. There are instructions to set it up without docker as well.

[–] [email protected] 5 points 1 week ago

I find dockerization tends to make things waaaay easier to bring up/take down with simple yet consistent configuration schemes. I distribute all my self hosted stuff across a small cluster of machines- if I want to move a service from one to another it's as easy as moving the config folder and the docker-compose. Don't need to have startup scripts, or remembering installation steps after a fresh install, or worry about python/package versions. Plus it helps keep track of what services are set up, soni don't have to worry about leaving anything unused but still installed and running. And updating is as easy as pulling the images and recreating the containers.