#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 ?
Login to reply
Replies (39)
Keep me posted on this
👀
Raspberry pi or something like it. Http server:
python -m SimpleHTTPServer or python3 -m http
Docker tunnel to cloudflare to hide your ip.
Thanks vlady! There’s no way getting around the pi in your opinion?
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 ?
I will add to that, if you’re willing to use docker, PicSur is really excellent for self hosting images to share.
Should run on just about anything.

GitHub
GitHub - CaramelFur/Picsur: An easy to use, selfhostable image sharing service like Imgur with built in converting
An easy to use, selfhostable image sharing service like Imgur with built in converting - CaramelFur/Picsur
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 ?
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.
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. 

Thanks for the info! 🫂
Is docker relatively easy to use and to install ?
Hdd will do, even sdcard will do for image hosting.
If anyone is looking for down and dirty solution.
Seems to work fine as I suggested.
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 &
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 &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.
If I run it on a mini pc (just used for hosting media) like suggested, how much ram do you think I would need ?
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.
Max. Always max.
32gb future proofing is worth the money. 8 works, 16 is better
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.
Oh I agree. My iMac has 72GB. 🤣
But if minimizing costs, 8, 16 is better, 32 is 🔥 is a good way to put it.
Learning docker for few hours saves countless weeks of reinstalling an configuring.
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
1) Bret Fisher
2)
3) look for popular repos on Github for Dockerfile and docker-compose.yml examples
Docker Documentation
Home
Docker Documentation is the official Docker library of resources, manuals, and guides to help you containerize applications.
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.
Definitely. Looking forward to trying
Happy to help. DM if you run into any issues.
Thanks fren 🫂🫂
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 ?
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)
So docker->caprover->cloudflare proxy -> one click install picsur from capsur ?
From caprover I mean
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.
The rest of the flow you described is correct.
Would you have some time for the 🪺 today ?
Hopefully this evening. 👍