Best for · Web hosting
Free Java web server hosting: the free options that run Java, and their limits
- Last checked
- 7 sources, linked below
- By the vectaai team
We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.
Verdict Our pick
The bar guide has a call.

- Render for a demo, portfolio or student project.
- Railway if you want something that feels like Heroku, free while tiny.
- Pick AWS credits to learn real cloud.
Compared here
- 01Render (free web service)
- 02Railway (Free plan)
- 03AWS Free Tier
- 04HelioHost (Tomcat beta)
- 05DigitalOcean
- 06Hostinger VPS
Short answer
Free Java hosting exists, but almost all of it is container hosting with sleep and memory limits, not a classic always-on Tomcat server. The most practical free option is Render: package your Spring Boot or other Java app in a Docker image, deploy it as a free web service with 512 MB RAM and 750 free instance hours a month; it spins down after 15 minutes without traffic and takes about a minute to wake. Railway's Free plan gives $5 of usage credit a month with services up to 0.5 GB that sleep when idle. AWS Free Tier gives new accounts up to $200 in credits for 6 months. HelioHost lists Apache Tomcat for servlets and JSP, but its Java server is still in beta with invites going to fundraiser donors first.
Pick Render for a demo, portfolio or student project. Pick Railway if you want something that feels like Heroku, free while tiny. Pick AWS credits to learn real cloud. For anything people rely on, pay a little: Render's cheapest paid instance is $7 a month, a DigitalOcean Droplet with 1 GiB is $6, and Hostinger's KVM 1 VPS gives 4 GB RAM for $6.49 a month on a 24-month term.
Sponsored links. We may earn a commission; it never changes the pick.
At a glance
| Option | Free allowance | Memory | Sleeps? | Best for |
|---|---|---|---|---|
| Render free web service | 750 instance hours a month per workspace | 512 MB | Yes, after 15 minutes idle; about 1 minute to wake | Demos, portfolios, student apps |
| Railway Free | $5 usage credit a month, no card | Up to 0.5 GB per service | Yes, after about 5 to 10 minutes without outbound traffic | Tiny apps and bots |
| Railway trial | $5 one-time credit for 30 days | Up to 1 GB per service | Not stated | Trying Railway properly |
| AWS Free Tier | $100 credit plus up to $100 more; account plan ends after 6 months or when credits run out | Depends on service | No | Learning AWS, short projects |
| HelioHost | Free account; Tomcat in beta | Not stated for Java | Not stated | Classic JSP and servlets, if you get in |
| Paid floor: Render | $7 a month | 512 MB | No | Same setup, always on |
| Paid floor: DigitalOcean | $6 a month Droplet | 1 GiB | No | Full server control |
| Paid floor: Hostinger KVM 1 | $6.49 a month on 24 months ($155.76 up front) | 4 GB | No | Most RAM for the money |
Money talk first. Hostinger and DigitalOcean run or may run referral programs, and our /go/ links can pay us. Render, Railway, AWS and HelioHost pay us nothing, and they lead this page because they are the free ones. We will tell you when free stops being worth it.
We did not deploy a Spring Boot app on six platforms for this page. We read Render's pricing page and free-tier docs, Railway's pricing, AWS's Free Tier page, HelioHost's homepage, DigitalOcean's Droplet pricing and Hostinger's VPS page on 4 December 2026. Oracle Cloud's free tier page refused our reader, and Google Cloud's free-tier and Cloud Run pricing pages came back truncated, so we quote nothing from them; both have free tiers worth checking on their own sites.
Why free Java hosting is harder than free PHP hosting
Old-school free hosts give you PHP and MySQL on a shared server. Java does not fit that model well: a Java web app runs as a long-lived process (Tomcat, Jetty, or an embedded server in Spring Boot, Quarkus or Micronaut) that holds memory the whole time. Shared hosts cannot hand that out for free to thousands of users.
So free Java hosting today mostly means:
- A container platform that runs your app in Docker and puts it to sleep when nobody visits.
- Cloud credits that run out after a few months.
- A rare community host that offers Tomcat.
Lists that promise "free Java hosting" from old free-PHP hosts usually mean PHP. Check for the words Tomcat, JSP, Docker or "Java runtime" before you sign up.
Render: the most practical free option
Render runs web services from Git or Docker, and its pricing page lists custom Docker containers on every workspace tier, so any Java framework works if you write a Dockerfile.
The free web service, from Render's free-tier docs and pricing page:
- 512 MB RAM on the Free compute plan.
- 750 free instance hours per workspace per calendar month. Sleeping services do not use hours. Unused hours do not roll over. Run out and all free web services pause until next month.
- Spins down after 15 minutes without inbound traffic. Waking "takes about one minute", and visitors see a loading page meanwhile.
- No persistent disk. Files written locally vanish on redeploy, restart or spin-down. Use a database.
- One instance only, no SSH shell, outbound mail ports blocked, and Render "may restart a Free web service at any time."
Paid: the cheapest always-on instance is $7 a month with 512 MB.
Pick Render if you need a public URL for a portfolio, a class project or a demo, and a one-minute cold start is acceptable.
Railway: free while tiny
Railway feels like the old Heroku: connect a repo, it builds and deploys. From its pricing page:
- Free trial: a one-time $5 credit for 30 days, no card, services up to 2 vCPU and 1 GB.
- Free plan: $0 a month with $5 of monthly usage credit, no card, services up to 1 vCPU and 0.5 GB, 1 project, 3 services, no custom domain. Services sleep after roughly 5 to 10 minutes without outbound traffic.
- Hobby: $5 a month, which includes $5 of usage; above that you pay the full usage, with services up to 48 vCPU and 48 GB and 2 custom domains.
A small Java service that sleeps most of the day can stay inside $5 of credit; one that runs all month with 0.5 GB may not. Railway's dashboard shows usage as you go.
Pick Railway if you want the smoothest developer experience and can live with 0.5 GB and no custom domain on Free.
AWS Free Tier: credits to learn on
AWS's Free Tier page today says new customers get $100 in credits immediately and can earn up to $100 more by exploring services. The free plan account closes 6 months after you open it or when credits run out, whichever comes first, and the page says 30+ services stay always free within monthly limits. EC2 is listed as available on both plans, without limits stated on that page.
You can run Java on EC2, Elastic Beanstalk, Lambda or a container service with those credits. It is the most "real world" option, and the most likely to surprise you with a bill if you forget to switch things off.
Pick AWS if you want to learn the cloud most employers use, and set a billing alert first. For a simpler AWS server, see Amazon Lightsail web hosting.
HelioHost: classic Tomcat, if you can get in
HelioHost is a long-running free community host. Its homepage says: "With Apache Tomcat users can deploy servlets applications or run stand-alone Java Server Pages." The catch is in its news: the Java server is moving from alpha to beta, invites to Java beta testers are going out, and they are going to people who "donated during our last fundraiser." Free accounts otherwise list up to 1000 MB storage and unlimited bandwidth, and HelioHost says it will not upsell you.
Pick HelioHost if you specifically need JSP or servlets on Tomcat without containers, and you are willing to wait or donate.
Google Cloud and Oracle Cloud
Both are often recommended for free Java hosting: Google Cloud for Cloud Run, which runs containers and scales to zero, and Oracle Cloud for its Always Free virtual machines. Their official free-tier pages did not load fully for us today, so we cannot quote limits. If you try them, read the current free-tier page carefully, especially the regions and which resources stay free after any trial credit ends.
When to stop chasing free
Free Java hosting costs you in cold starts, memory limits and surprise restarts. The step up is small:
| Option | Price | Memory | Why |
|---|---|---|---|
| Render paid instance | $7 a month | 512 MB | Same setup as free, no sleeping |
| DigitalOcean Droplet | $6 a month | 1 GiB | Your own server, any Java version, no term |
| DigitalOcean Droplet | $12 a month | 2 GiB | Comfortable for Spring Boot plus a small database |
| Hostinger KVM 1 VPS | $6.49 a month on 24 months ($155.76 up front), renews $11.99 | 4 GB | Most RAM per dollar if you commit |
Memory is what Java eats. If your app keeps crashing on a free 512 MB tier, a 1 to 4 GB server usually fixes it for less than the price of a lunch. Comparing those two providers? See DigitalOcean vs Hostinger, and for running your own server, unmanaged cloud hosting.
How to make a Java app fit a free tier
Practical habits, ours, not any provider's:
- Use a container. A Dockerfile makes you portable between Render, Railway and any VPS.
- Cap the heap. Set JVM memory options so the app stays under the container limit instead of being killed.
- Use a slim base image and keep dependencies lean.
- Keep state out of the container. Free tiers wipe local files; use a hosted database.
- Add a health check endpoint so the platform knows when the app is ready after a cold start.
- Expect the first request to be slow on sleeping tiers, and say so on your demo page.
- Set a billing alert on any platform that has your card.
Who should pick what
- Student project or portfolio: Render free web service.
- Hobby bot or tiny API: Railway Free.
- Learning AWS: AWS Free Tier credits, with a billing alert.
- Classic JSP or servlets course: HelioHost Tomcat beta, or a $6 Droplet with Tomcat installed.
- Anything with real users: a paid instance from $6 to $7 a month, or a 4 GB VPS for the long term.
- Month-to-month without commitment: see month-to-month web hosting.
Comparing Java platforms like Liferay with WordPress for a site? See Liferay vs WordPress.
Verdict
Free Java web server hosting is real but small. Render is the best free start: Docker, 512 MB, 750 hours a month, asleep after 15 minutes idle. Railway's Free plan covers tiny services with $5 of monthly credit, AWS gives up to $200 of credits for six months, and HelioHost offers Tomcat if you can get into its beta. The moment real people use your app, spend $6 to $7 a month on an always-on instance, or $6.49 on a 24-month Hostinger VPS for 4 GB, because Java runs on memory and free tiers ration it.
Questions people ask
Where can I host a Java web app for free?
Render is the most practical: deploy your app as a Docker container on a free web service with 512 MB RAM and 750 free hours a month, accepting that it sleeps after 15 minutes idle. Railway's Free plan gives $5 of monthly credit for small services. AWS gives new accounts up to $200 in credits for 6 months. HelioHost offers Tomcat in beta.
Can I run Tomcat on free hosting?
Rarely as a shared service. HelioHost lists Apache Tomcat for servlets and stand-alone JSP, but its Java server was in beta when we checked, with invites going to fundraiser donors first. Otherwise, run Tomcat or an embedded server inside a Docker container on Render or Railway, or on a cheap virtual server where you install it yourself.
Is 512 MB enough for a Spring Boot app?
For a small app with careful settings, it can be, but it is tight. The JVM often wants more memory than people expect, so limit the heap, avoid heavy dependencies and expect slower starts. If the app crashes for memory, a 1 GiB server at $6 or a 4 GB VPS is the cheap fix.
Why does my free Java app take so long to load?
Free services sleep. Render spins a free web service down after 15 minutes without inbound traffic and takes about a minute to start it again; Railway's free services sleep after a few minutes idle. Java's own startup time adds to that. For a demo, warn visitors; for real users, move to a paid always-on instance.
Is there a free Java hosting provider for production?
Not one we would trust with real users. Free tiers can sleep, restart at any time, lose local files on redeploy and suspend services that use too much traffic, which Render's free docs state plainly. Use free hosting for learning and demos, then move to a paid instance from about $6 to $7 a month.
Sources
Every fact above comes from these pages. Prices change, so each one carries the date we read it.
- Render pricing, checked 4 Dec 2026
- Render docs: Deploy for free, checked 4 Dec 2026
- Railway pricing, checked 4 Dec 2026
- AWS Free Tier, checked 4 Dec 2026
- HelioHost, checked 4 Dec 2026
- DigitalOcean Droplet pricing, checked 4 Dec 2026
- Hostinger VPS hosting, checked 4 Dec 2026