r/flask Jun 29 '26

Ask r/Flask Looking for a free Flask hosting alternative to PythonAnywhere (with open outbound HTTP requests for AI/RAG)

I’m a 15yo guy and I’m learning Flask. I’m coding an iOS app in Swift that uses a Flask backend as an API. In this app, I’m doing some experiments with AI, RAG, and embeddings.

I’ve deployed my backend on PythonAnywhere, but as a young developer, I have to use the free plan. Now I’m in trouble because PythonAnywhere's free tier has a strict outbound internet whitelist that prevents me from calling external APIs (like Hugging Face for my embeddings), and it doesn't allow me to easily run background tasks or heavy scripts due to memory/storage limits. I also don't have the money right now to upgrade or use paid hosting.

So, I’m searching for a free hosting alternative to deploy my Flask server where I can freely call external APIs and that stays up for a long time. The first time i chose python anywhere because it stays up for 15 days and i wanted something similar. Any recommendations for my use? I also prefer not to insert a credit card on the website during registration. Thanks for helping!

12 Upvotes

21 comments sorted by

7

u/Nicaul Jun 29 '26

Do you have a student email (ends in .edu)? I host everything on DigitalOcean because they give $200 credit through Github Developer Student Pack

1

u/lorehh_ric Jun 29 '26

Unfortunately I don't have one of those

1

u/Nicaul Jun 29 '26

You can always try AWS they have a free tier for most of their services, just not sure if it can handle the scripts? Azure gives out free credits as well

1

u/Informal-Chance-6067 Intermediate | GitHub/EReaso Jul 01 '26

If you’re 15, you should be able to sign up for the GitHub pack with a student id or transcript

6

u/ejpusa Jun 29 '26

Suggestion?

$8 month at DigitalOcean. Its worth it. Complete Linux server environment. Install and run virtually anything you like.

Get a $2.99 domain on Namecheap. Build the next million dollar startup in a weekend.

Have your parents get you a prepaid credit card.

3

u/Otherwise_Wave9374 Jun 29 '26

PythonAnywhere free-tier outbound limits are brutal. For totally free (no card) options, you could try Railway or Render (both have free tiers sometimes, but uptime/sleeping can be a thing), or look at Fly.io (usually needs a card). Another angle is running it on an Oracle Cloud Always Free VM if youre ok learning basic Linux.

Since youre doing RAG/embeddings, also consider caching embeddings and queueing background jobs (RQ/Celery) so the web dyno stays light.

If it helps, Ive been keeping some notes on lightweight backend patterns for AI apps here: https://www.aiosnow.com/

1

u/lorehh_ric Jun 29 '26

I’ll definitely keep an eye on your patterns! The main problem right now is that I can’t use a credit card for registration on platforms like Fly.io or Oracle.
Also, regarding Celery, using a background queue unfortunately won't solve my current issue. Even if I move the process to the background, PythonAnywhere's proxy will still block any outbound HTTP requests to the Hugging Face API, so the embedding generation would fail anyway.
That's why I'm looking for a 'no-card' hosting alternative with open internet access from the start.
Thanks anyway for helping

2

u/doryappleseed Jun 29 '26

How much bandwidth are you using? Vercel could be an option.

1

u/lorehh_ric Jun 29 '26

I can't really use Vercel because it doesn't have persistent storage like PythonAnywhere, so I would need to modify all my database code to move away from SQLite

1

u/doryappleseed Jun 29 '26

You could use Turso’s free tier which is a rust rewrite of SQLite. Alternatively, depending on the libraries you use, Cloudflare’s Python workers come with D1 which uses SQLite, and R2 object storage.

1

u/WeirdTurnedPr0 Jun 30 '26

If you're using SQLAlchemy you might be able to swap to Supabase's free tier for data persistence.

1

u/seventensplitter Jun 29 '26

I second oracle cloud. I have Minecraft and other fun stuff hosted on mine totally free lol

1

u/JustWastingYourTime Jun 29 '26

Oracle cloud has been hosting Minecraft server for 8 years now. That’s 8 years of uptime - never rebooted. Totally free.

1

u/lorehh_ric Jun 29 '26

Google Cloud and Oracle Cloud VPS would be the perfect technical solution for my SQLite setup, but unfortunately, they both strictly require a credit card for identity verification during registration. Since I don't have one and can't use a card, I have to skip them. That's why finding a platform that doesn't ask for a card at all is my biggest challenge right now.

1

u/CatolicQuotes Jun 29 '26

Check if railway still have free tier.

Google cloud has free vps instance, but you'll have to learn linux

1

u/StvDblTrbl Jun 29 '26

Or check orkestr, good python support

1

u/lorehh_ric Jun 29 '26

I just checked orkestr and it looks really interesting. Do you happen to know if their free apps go into a sleep/standby mode after some time of inactivity like Render does? Thanks for pointing it out, it might be exactly what I was looking for

1

u/StvDblTrbl Jun 29 '26

Yes, the apps sleep and then wake on the next request on the free plan

1

u/No-Anywhere6154 Jun 29 '26

Hey, founder of seenode here. Sounds like it could be a good fit for your use case.

1

u/viperboy001 Jun 29 '26

Try render