Help! I need a really simple image hosting solution
from SpatchyIsOnline@lemmy.world to selfhosted@lemmy.world on 04 Jul 18:25
https://lemmy.world/post/49034037

For my Masters thesis project, I’m required to keep a blog documenting my progress, and being the open source/self hosting guy that I am, I decided to host my own WriteFreely instance on my VPS.

The problem is, WriteFreely doesn’t support direct image uploads, only embeds. I’d of course like to self host my images for the blog too, so I’m in need of a really lightweight image hosting solution. Things like Immich or Nextcloud are far too much for what I need, I basically just need a password-protected upload interface and the ability to grab the direct links to the images to embed them. I don’t need analytics or account management or anything like that.

I know I could transfer images to my server directly via scp or rsync or ftp and host them behind nginx directly, but that’s a faff and I’d rather just deploy a container once and be done with it.

Does anyone have any recommendations?

#selfhosted

threaded - newest

Technoguyfication@sh.itjust.works on 04 Jul 18:36 next collapse

You could throw Garage or Minio in a container and upload the images to a public bucket.

ChaosMonkey@lemmy.dbzer0.com on 05 Jul 12:47 collapse

Yes, you can expose a bucket as a website for easy access.

Shadow@lemmy.ca on 04 Jul 18:38 next collapse

github.com/mdshack/shotshare maybe?

perishthethought@piefed.social on 04 Jul 18:53 collapse

Yah, or Slink maybe.

https://docs.slinkapp.io/

darcmage@lemmy.dbzer0.com on 04 Jul 18:43 next collapse

github.com/andrii-kryvoviaz/slink from selfh.st/apps/?tag=Image+Sharing

github.com/mtlynch/picoshare from selfh.st/apps/?tag=File+Sharing

Seems like these could fit the bill.

SpatchyIsOnline@lemmy.world on 04 Jul 19:43 collapse

Thanks, I decided to go with Slink. It looks lightweight enough, easy to set up and while not quite as minimal as I was imagining, that image resize ability when generating shared links could come in useful

bhushan_lilapra@mastodon.social on 04 Jul 22:30 collapse

@SpatchyIsOnline @darcmage that’s a great choice. Any plan how will you deploy it on your server and keep watch for CPU?

SpatchyIsOnline@lemmy.world on 04 Jul 22:43 collapse

I already have it up and running! They have a good docker-compose example on their site.

As for monitoring, my approach is to use it and if it works, then there’s nothing to worry about 😅

bhushan_lilapra@mastodon.social on 05 Jul 08:39 collapse

@SpatchyIsOnline you can try ‪https://kubeara.dev‬ I found it easy to deploy/manage services and keep watch on CPUs.

Pixel@lemmy.ca on 04 Jul 19:01 next collapse

I personally do ShareX, with an SFTP destination for an nginx webserver. It has an image editor built in as part of the workflow if you enable it, and it can automatically copy the clipboard URL.

You could certainly go the extra mile and setup an image sharing manager or a more complicated solution if you wanted to though, if that makes overall administration easier.

mkwarman@lemmy.world on 04 Jul 19:06 next collapse

Just curious, what about scp-ing to your server is less than ideal for you? I would think a static server with nginx or similar would be an easy one time setup and then you do a single command to scp to it whenever you want to add images. No redeploy necessary. I would almost consider that easier than other bespoke solutions that you would have to learn

SpatchyIsOnline@lemmy.world on 04 Jul 19:41 collapse

I would like the option to be able to upload images from a multitude of devices like my phone or even a university PC if necessary. I don’t want to have to worry about setting up public key access on every device I might reasonably want to use.

I’m a developer and have daily driven Linux for nearly 3 years, so I’m beyond familiar with terminal usage, but scp isn’t exactly what I’d call a pleasent or convenient command. Every time I have to use it my immediate mood is ugh >:( not yippee :)

queerlilhayseed@piefed.blahaj.zone on 04 Jul 20:05 next collapse

I have a similar relationship with iptables. Like, I can do it, but it’s the boring stuff I gotta get out of the way to make the interesting stuff work.

edit: thought of another one. Any time I’ve ever opened xorg.conf, I was having a bad time.

PlexSheep@infosec.pub on 04 Jul 20:16 collapse

You can make a new user on the server with password login, and just access it with SFTP. Most graphical file explorers can do SFTP.

RamRabbit@lemmy.world on 04 Jul 20:53 collapse

Yep, you could also put any portable SFTP program on a thumb drive and SFTP it to your box from any computer you are at.

nykula@piefed.social on 04 Jul 19:41 next collapse

Yep) My program for that purpose: https://codeberg.org/nykula/imgie - resurrected three months ago because another person on PieFed reminded me of it. Should just work. Ping me if it doesn’t.

corsicanguppy@lemmy.ca on 05 Jul 02:21 collapse

Doood. npm in production is a bad pattern in this age of supply-chain sploits. Best vendor that into the artifact when ya ship … Nevermind.

nykula@piefed.social on 05 Jul 09:32 collapse

I can make a Docker image, like the one I made for Lanquiz. It’s not high on my to do list, though. Before that, I want to update integration tests (working draft still not committed), and store data under system-specific paths not in repo subdirectories (breaking change).

Alfredolin@sopuli.xyz on 04 Jul 22:44 next collapse

There is also copyparty. Spin up the docker container, upload your images, copy/paste the links, boom.

bhushan_lilapra@mastodon.social on 05 Jul 08:46 collapse

@Alfredolin @SpatchyIsOnline cool. Please DM if you wanted to list your service on ‪https://kubeara.dev‬ . We are one click deployment solution for self hosted servers.

rimu@piefed.social on 05 Jul 01:40 next collapse

You could use apache to create a webdav share. I bet there’s a pre built container for it.

Webdav is really underrated, imo.

atzanteol@sh.itjust.works on 05 Jul 12:35 next collapse

Things like Immich or Nextcloud are far too much for what I need, I basically just need a password-protected upload interface and the ability to grab the direct links to the images to embed them.

Why do you care that they do things you don’t need if they also do what you need?

Because these do just what you need and do it well.

SpatchyIsOnline@lemmy.world on 05 Jul 17:36 collapse

On my homelab I don’t mind so much as I have 64gb of ram and and 8tb of storage, but on my vps I want everything to be relatively lightweight

duskybeacon64373@lemmy.1095.me on 05 Jul 16:04 next collapse

@SpatchyIsOnline — have you looked at Coppice or Zipline? Both are purpose-built for exactly this use case: drop a file, get a direct link, done. No analytics bloat, no user management unless you want it, just containerized and ready. Zipline especially is Docker-native and the config is a single YAML. Since you’re already running WriteFreely on a VPS, spinning up another lightweight container shouldn’t hurt your resource budget. More minimal stack examples at cxgo.ai/l/D0MLVun if you’re comparing options.

nitroemdash@lemmy.wtf on 05 Jul 17:39 collapse

Can you encode them as base64 URL?

SpatchyIsOnline@lemmy.world on 05 Jul 17:45 collapse

Wait, that’s actually a very good point. I didn’t think of that!