I have a Samba mount at home (behind NAT, accessible via wireguard VPN), which works very well when accessing my home files when traveling (I travel a lot for work).
The only detail missing from this solution is sharing individual files with friends. I could give them access to my VPN, but that gives them access to everything, not just one thing I want to share. Also not all my friends are that tech savvy to manage connecting to a VPN.
What would be really great is to have a link-generator that punches a hole in the NAT to give them access to specific files. Are there any self-hosted solutions for that?
An ordinary sftp server. No reason for this to be web based.
Try nextcloud. It can generate links to files like this.
100% this. I have one running in a lxc, and I expose it to the world through a CloudFlare tunnel so I needn’t worry about dyndns or people probing my public IP.
Mind if u ask how much that cloudflare front end costs you a month for how many hits?
I’m on their free tier. If you don’t have a domain you need to get one, but CloudFlare does offer domain registration basically at-cost.
Because I’m on free, I can’t break down my analytics like a paid account can. i can say though that for the past 30 days my account has generated 886k requests and 47.56GB of bandwidth. I can’t tell you how much of that is nextcloud and how much is other stuff, like audiobookshelf, but hopefully this helps answer you.
https://xkcd.com/949/ has a few good hints.
I think this summarises all the other answers here
Are both parties online at the same time?
Maybe something like this is a good solution: https://github.com/magic-wormhole/magic-wormhole
It will figure out the fastest p2p connection and send even very large files without hassle.
Copyparty is amazing
Just make sure not to shorten the name of that using the linux command for copy
Copyparty is easy, but if you can both set up syncthing, that makes it a breeze. I have a sibling that lives across the Pacific and last time they visited I set up syncthing on their laptop and when either of us wants to share something, we just drop it in that folder and wait a minute or two.
I use ownclowd
https://file.pizza/ just because the pizza toppings URLs are fun and nasty
not self-hosted
It’s not quite self hosted, but Soulseek allows you to share share private directories with buddies. Soulseek might require a port forward.
Other than that, there are the many pasteboard solutions that have been mentioned. They’ll either require a port forward or reverse proxy (nginx etc.) to access outside the network though.
Just run a web server and expose the specific files you want to share through that?
Yea just draw the rest of the owl duh! 🙄

python3 -m http.server
If you have Docker hand you can use my project Directory Lister to do just this quick and easily (Docker docs).
deleted by creator
Another vote for Syncthing. Might be a little too complicated for some though
Do you have a domain? If you do, maybe try Nginx Proxy Manager and SFTPGo. I previously used File Browser but the developers made some fairly large breaking changes and I never went back. SFTPGo lets you add accounts easily and I have specific folder setup for sharing with friends. It has a clean interface too. If you don’t have a domain, maybe try Tailscale?
I use Warpinator in combination with tailscale
Does this require the recipient to install and sign up for Tailscale?
Any particular reason why you can’t do something like host a Send instance instead? Better to treat “filesystem behind the network” and “files to share” as two different things: one is imanent, the other is punctual and sporadic.






