#asknostr I want to self host some media (pictures, gifs) that I could share on nostr. How should I proceed ? Is there a good way to do so without using my node’s personal server ? Any suggestions ?

Replies (39)

In your initial post you want to self host but not on your node. For that you need a level of separation. That is physical server like pi, or a virtual like a vm or container. I would run it all in a docker container with http via python and smb or nfs.
I guess I can’t get around the physical server. If I run a vm, it would use ressources of my desktop and have to always be on for the files to be available. Or on a pi if I don’t want to use up the ressources of my node's personal server. That’s good to know. Thank you! Do you know if I’m better off with an SSD for hosting of media or HDD is ok ?
Good know! Thank you! Do you know of any alternatives to the pi? I remember seeing notes about mini computers. Maybe intel but I forget. Do you have any recommendations ?
Default avatar
nobody 2 years ago
Dell OptiPlex mini pc’s can be had off lease for cheap, and often have better specs. #[1] might be a contact to buy one for sats as well.
thanks for the info! Looking at some refurbished listings online. Very cheap! Comes with an ssd.
Dimi's avatar
Dimi 2 years ago
Shortly! Fucking networking problems. I have a big ass post drafted, & I’m on demon time working on other shit at the moment, so can’t handhold today, but ebay deals are plentiful. image
If anyone is looking for down and dirty solution. Seems to work fine as I suggested. image I started with this: docker run -p 137-139:137-139 -p 445:445 -p 4568:80 -v /home/user/share/:/shared --name samba pwntr/samba-alpine 4568 is the port to access shared container data over http, only port 4568 should be exposed via tunnel. smb share works in anonymus mode. Change config if needs to be more secure on local network. current container is missing this as a last step in Dockerfile. Can be done by changing entry point to CMD to run start.sh that will contain: supervisord" "-c" "/config/supervisord.conf & python3 -m http.server 80 &
Default avatar
nobody 2 years ago
Yes. For simple setups it’s very easy. It can get more complex as you go, but I found it was never too much at once.
Default avatar
nobody 2 years ago
I have six services running on a 4GB ram instance. RAM usage will depend on the apps in the containers, and whether they are built on light images. PicSur is very light. I’d get 8-16GB for future expansion. But my entire setup, across all services including a relay, is using less than 4 atm. You need headroom for the OS, so I’d say 8GB.
Default avatar
nobody 2 years ago
RAM maximalist detected. 🤣
Solution I posted above takes 36mb of ram. But I would suggest to buy with 8gb or more ram. I always regret that I bought 4gb pi and eventually had to get something more powerful.
Default avatar
nobody 2 years ago
Oh I agree. My iMac has 72GB. 🤣 But if minimizing costs, 8, 16 is better, 32 is 🔥 is a good way to put it.
Makes sense. Do you know any good ressources on docker that I could read/watch ? And how complicated is it to do docker to cloudflare to mask the ip address ? Is it pretty straightforward ?
Look for cloudflare tunnel. It basically adds an extra container to your stack that is on the same vlan as the other one, but connected to cloudflare. In cloudflare admin wgui you specify what port and container name to bridge to. This sounds like a fun project to learn docker.
Default avatar
nobody 2 years ago
Tbh you might ought to look at caprover. Or perhaps we could open a nest this evening and chat? I’ll dig you up some links when I’m back at the desk either way. ❤️
Do you need docker to be installed for caprover to work? From what I’ve read briefly it seems to be very easy to use. Does it also help with masking the ip address ?
Default avatar
nobody 2 years ago
It can, because you should be able to put it behind cloudflare proxy. You only have to install docker to use caprover. It does the rest. But you can still deploy docker images as you get more powerful moving forward. Caprover also has many one click install stuff (mostly docker itself, but automated)
Default avatar
nobody 2 years ago
I don’t think PicSur is on there. There are others such as Immich, etc. But it would be easy to deploy PicSur on caprover using the web interface. I would plan plenty of tinker time, but everything you’re wanting to do is very achievable. I’d want a weekend or a couple of evenings if I was doing it for the first time again.
Default avatar
nobody 2 years ago
The rest of the flow you described is correct.
Default avatar
nobody 2 years ago
Hopefully this evening. 👍