Say I want to share with a small number of people (about 20) my small web apps, for as cheap as possible. The backend is in Python, frontend is plain HTML and some JS files. Those web apps I would like to be usable 24/7 for the next 10 years. Should I invest in a RaspberryPi and self host? What options do I have?
For fully static sites it is hard to compete with "upload files to S3 and host via CloudFront" with the caveat that it costs about 10 cents per gig*month to store data and 10 cents to send a gig out.<p>If your usage will be small enough that those prices aren't painful then you get true 24/7 availability, reasonable performance and a lot of convenience.<p>Add the python server and your costs might go up. For applications that are mostly static but have an occasional form (say email newsletter subscribe/verify/unsubscribe script) the economics of the lambda functions and the web service gateway are great. If you are going to have a python script called for every html page (e.g. conventional CMS) you might not like the economics.<p>You could run a small cloud server with the dynamic parts, you will always feel some tradeoff between "throw a lot of resources at it and be delighted with performance" and "try to save resources and find your server upside down with the casters up occasionally"<p>As for the rasp pi that was a fantasy that I remember internet anarchists being into back in the days of Hakim Bey and Falun Gong. It seemed "liberating" to people to have the 23/6 availability and inconsistent performance of running a low-price server at home. It might feel good to you but the users won't appreciate it.<p>Today it seems something a conservative politician would do: host the web server to get welfare benefits on a rasp pi behind a slow connection.
Sounds like "free" may be even better than cheap, given the small number of people you mention.<p>For instance, an always-free f1-micro instance from Google Compute Engine would work well.<p>Or Vercel <a href="https://vercel.com/pricing" rel="nofollow">https://vercel.com/pricing</a> (formerly Zeit, I believe) may also fit your needs, assuming you can adapt your Python where needed.<p>Another option that might require modest refactoring of the Python: host the site as a static site on Github pages or Netlify. Then make the backend (still in Python) using AWS Lambda or Azure Functions or Google Cloud Functions.
I use DigitalOcean to host and deliver web apps. You can get a "VPS" (virtual private server) for as low as $5 a month, which is probably less than you can run a server from home on a Raspberry Pi.<p>Another option is to create a disk image for a Raspberry Pi that has your web apps installed and let them download it or purchase an SD card from you so they can run the app on their own Raspberry Pi.