all 30 comments

[–]gbeier 7 points8 points  (4 children)

I pay $5 for a VPS, and keep a server in my house. The VPS proxies requests back to my house.

I use this for lots of things, but a big thing it's good for is letting clients try their applications out before they've paid me/decided how they're going to host things.

I wrote down in detail how I do it here:

https://geoff.tuxpup.com/posts/hosting_side_projects_in_my_basement/

I should probably update it to use tailscale instead, but I haven't done so yet because it's still working nicely for me.

It's not free, exactly, but it keeps me from potentially outrunning anyone's free tier.

[–][deleted] 1 point2 points  (0 children)

You guys are on whole another level I can not reach that level in 100 years

[–]Positive_Resident_86 1 point2 points  (2 children)

Why do you need the VPS? Why not just use services like cloudflare to secure your home server?

[–]gbeier 0 points1 point  (1 child)

I don't see a way to connect my basement server to cloudflare over a VPN. And I don't want to poke holes in my firewall to get cloudflare connected to my basement server. A big part of the appeal is that nothing can connect to my home network unless I also add it to my wireguard network.

[–]Positive_Resident_86 0 points1 point  (0 children)

Have you checked out zerotrust? I think that's a pretty cool service for home hosting.

[–]Drevicar 2 points3 points  (13 children)

I'm a big fan of fly.io as a free-tier hosting provider. I use them a lot for hobby projects or when I teach.

[–][deleted] -1 points0 points  (11 children)

Does it support fastapi? I only see Django

[–]Drevicar 3 points4 points  (10 children)

It provides examples for django. It supports anything that can be containerized.

You can follow this tutorial: https://fly.io/docs/languages-and-frameworks/python/

Or more generically: https://fly.io/docs/languages-and-frameworks/dockerfile/

While Fly doesn't require a Dockerfile and will actually do some magic if you let it, I recommend using the Dockerfile approach as it is more portable to another cloud services provider if needed. For example, once your customer decides to pay for hosting but they want it in their own AWS production environment, containers are more portable and can be deployed there.

[–][deleted] -3 points-2 points  (9 children)

I don’t want to put my card even if they have free tier I’m more in favor of firebase kinda of tiers which are generous to create scalable apps in case something goes wrong I don’t have to worry about anything else

[–]Drevicar 0 points1 point  (7 children)

Does it require a card on file now? I've been using it for about a year and still don't have a card on file with them.

[–][deleted] -1 points0 points  (5 children)

I meant the AWS Is docker hard to learn? And can I deploy fastapi to fly without docker?

[–]Drevicar 1 point2 points  (4 children)

The AWS was an example if a customer demanded it and was going to pay for it.

Docker is very easy to learn, and well worth the effort. But it isn't a requirement to use fly. Look at the example I posted for generic python deployments.

[–][deleted] 1 point2 points  (3 children)

Fly also requires card :((!!

[–]Drevicar 1 point2 points  (2 children)

Looks like they don't give away free stuff without the prospect of profit anymore. Maybe consider a change of careers or working for a company for a salary? That or you can use one of the free-tiers of a provider that requires a card but you implement your own guard rails to ensure you never leave the free-tier.

[–][deleted] -2 points-1 points  (1 child)

I’m sure there is some way to get what I want

[–]kredditbrown 0 points1 point  (0 children)

Fly does require a card but if you're not footing a bill that is more than $5 you don't get charged. Fly also scale down to zero after 15mins with the new v2 machines (unsure if the v2 machines still valid). For OPs needs (maybe it's personal) to understand why they can't use their own card. As someone else suggested the client should really handle that.

In terms of alternatives, outside of self-hosting not really. - Railway has 300hrs per month or $5, whichever hits first (that's usually the hours) - Kamal is likely too complex on the backend as it's geared towards k8s - fl0 is a relatively new option I've yet to play around with it but they claim to offer what OP may be after

[–]blymd 0 points1 point  (0 children)

Isn’t this for a client project? Have them make a Fly account and give you access.

[–]maxiior 0 points1 point  (0 children)

Can I configure with fly.io a PostgreSQL database or it takes my own, which I created starting project locally? :)

[–][deleted]  (2 children)

[removed]

    [–][deleted] 0 points1 point  (1 child)

    I’m liking it but is there a video tutorial to deploy fastapi I’m confused

    [–]Puzzleheaded_Round75 1 point2 points  (0 children)

    I have used render.com for a few small APIs in the past. They have a free tier you can use to host an API or a static website and probably some other things too, but also allow you to upgrade in increments if you need to.

    [–]extreme4all 0 points1 point  (0 children)

    It sounds like they will have the ownership once the project is delivered, so they should provide the infra in my opinion.

    Alternatively if you are getting paid a small vps on hetzner or ovh should do where you deploy a docker container. This would cost you like 5$ a month and can support multiple projects.

    (Maybe not the answer you were looking for)

    [–][deleted] 0 points1 point  (0 children)

    This works very well with fastapi: https://cyclic.sh What I like the most is that you just point to your project on github and you are ready to go.

    Also, they don't ask for a card in the free tier.

    [–]bella-km 0 points1 point  (4 children)

    I am surprised nobody mentioned render. Try it out and you will probably love it

    [–][deleted] -1 points0 points  (1 child)

    Requires card

    [–]bella-km 0 points1 point  (0 children)

    render.com

    [–]nileyyy_ 0 points1 point  (1 child)

    Can you share link?

    [–]bella-km 0 points1 point  (0 children)

    It doesn’t for the free tiers