Home

Provider comparison

Java hosting compared: free tiers, real prices, sleep rules and SLAs

Fifteen places to run a JVM app, side by side: what the free tier really gives you, what the first paid plan costs, and when your app goes to sleep.

Figures checked November 2026Sources linked on the page

Four amethyst glass server blades of rising height, lined up like plan tiers
512 MBTypical free-tier RAMRender, Koyeb and Heroku Eco all start here.
15 minRender free spin-downIdle time before a free service sleeps.
$5Lowest always-on priceDigitalOcean App Platform, 512 MiB, fixed.
12 GBOracle Always Free Arm2 OCPU and 12 GB RAM, card required.

Java hosting today splits into three camps: container platforms that run any JVM app from a Dockerfile, clouds with a Java or Tomcat stack built in, and plain virtual machines where you install the JDK yourself. Price is only part of the decision. The other parts are how much memory you get for the JVM, whether the app sleeps when nobody visits, and how you can pay. Figures checked in November 2026.

The short answer for most small projects: if you want zero server work, a 1 GB Fly.io machine at $6.70 a month is the cheapest managed, always-on home with enough memory for a Spring Boot app. If you are comfortable with Linux, a Hetzner CAX11 gives you 4 GB of RAM for less than most platforms charge for 1 GB. Everything else on this page explains why.

The full Java hosting comparison table

Provider Free tier Cheapest paid option Sleep / idle rule Payment methods EU region Uptime SLA
Render 512 MB, 750 instance hours/month $7/mo, 512 MB, under 1 CPU Free spins down after 15 min without traffic, about 1 min to wake - Frankfurt Enterprise only
Railway Free: $1/mo credit, 0.5 GB per service; Trial: $5 once, 30 days Hobby $5/mo incl. $5 usage - Credit card only Amsterdam Enterprise only, no figure
Fly.io None (trial: $1 credit, 7 days) 256 MB $2.19/mo; 512 MB $3.69; 1 GB $6.70 Billed per second while running Card or Stripe Link; prepaid credits from $25 Amsterdam, Frankfurt, Paris, Stockholm, London -
Heroku None Eco $5/mo 0.5 GB; Basic $7/mo 0.5 GB Eco sleeps after 30 min; Basic always on Credit card; no PayPal, ACH or prepaid cards eu region Not stated
Koyeb 1 instance: 512 MB, 0.1 vCPU eco-nano $1.61/mo (256 MB) Free scales to zero after 1 hour - Frankfurt 99.9% on Scale ($299/mo)
Google Cloud Run 180,000 vCPU-s, 360,000 GiB-s, 2M requests/month Pay per use, no plan Billed per 100 ms of use - 13 European locations 99.95%
AWS App Runner AWS Free plan credits $0.007/GB-hour provisioned - - Ireland -
AWS Elastic Beanstalk No own tier Price of the EC2 instances Always on - Yes -
AWS Lightsail Not stated on pricing page $5/mo, 0.5 GB, 2 vCPUs (IPv6-only $3.50) Always on - Yes -
Azure App Service F1: 1 GB RAM, 60 CPU min/day B1 Linux about $12.41/mo, 1.75 GB F1 capped at 60 CPU min/day - West Europe 99.95% paid tiers
Oracle Cloud Always Free: Arm up to 2 OCPUs, 12 GB Pay as you go above free amounts Idle instances may be reclaimed Card required at sign-up Home region -
DigitalOcean App Platform Static sites only $5/mo, 512 MiB Always on Cards, PayPal, ACH (US) - 99.95%
Hetzner Cloud None CAX11 EUR 6.49/mo, 4 GB, 2 Arm vCPUs Always on Card, SEPA, bank transfer, PayPal Nuremberg, Helsinki -
Northflank Sandbox: 2 services, up to $20/mo of resources 0.5 vCPU / 1 GB $12/mo Sandbox always on - Frankfurt, Netherlands -
Clever Cloud Sign-up credits, no card Java pico 256 MiB about EUR 4.56/mo Always on, billed per second Card, PayPal, SEPA Paris -

Each provider name links to the official page the figures come from. A dash means that page does not state it. Monthly figures for Azure B1 and Clever Cloud are hourly list prices multiplied by 730 hours. Hetzner's cheaper CX23 (EUR 5.99) showed as unavailable when checked, and both European providers price in euros excluding VAT.

Memory: the limit that decides everything

A JVM is not a PHP script. It reserves heap at start, the JIT compiler takes its own share, and frameworks like Spring Boot load hundreds of classes before serving the first request. That is why the RAM column matters more than the CPU column for Java web hosting.

At 512 MB, which is what Render's free and $7 tiers, Koyeb's free instance and Heroku's Eco and Basic dynos give you, a small app runs if you size the heap for the container and keep dependencies lean. By default the JVM gives the heap a quarter of the limit, 128 MB on a 512 MB plan; -XX:MaxRAMPercentage=70 or so uses the room better than a fixed -Xmx, and a heap larger than the plan ends in exit code 137. A typical Spring Boot service with a database driver and a few libraries is happier at 1 GB. Fly.io charges $6.70 a month for that, Railway's usage pricing works out to roughly $10 per GB per month, and Azure's B1 includes 1.75 GB for about $12.41.

The VM providers break the pattern. Hetzner's CAX11 has 4 GB, and Oracle's Always Free Arm allowance reaches 12 GB at no cost, although Oracle may reclaim an instance whose CPU, network and memory use stay under 20% for seven days. The other catch is that you install the JDK, configure a reverse proxy and patch the operating system yourself. The step-by-step deployment guide walks through both routes.

Sleep rules and cold starts

Free tiers save money by stopping your app. Render spins a free service down after 15 minutes without inbound traffic and needs about a minute to bring it back. Koyeb waits an hour. Heroku's paid Eco dyno sleeps after 30 minutes of inactivity.

For Java this hurts more than for Node or Go, because a cold JVM has to start, load classes and warm up before it responds quickly. A visitor who hits a sleeping app waits for all of it.

Azure F1 handles the problem differently: the app does not sleep on a timer, but it gets only 60 CPU minutes per day, and Microsoft says the free plan is not supported for production. Northflank's Sandbox is the odd one out, described as always on with no sleeping. The list of free Java hosting options compares these rules in more depth, including which tiers are gone.

Tomcat hosting and other stacks

Most platforms here run a fat JAR with an embedded server, which is how Spring Boot, Quarkus and Micronaut ship by default. If your app is a WAR file, you need a servlet container. Three providers offer one as a managed stack: AWS Elastic Beanstalk (Tomcat 11.0.27 on Corretto 25, among other platforms), Azure App Service (Java SE, Tomcat and JBoss EAP) and Clever Cloud (a dedicated WAR runtime). On the container platforms you build an image that starts from an official Tomcat base and copies your WAR in. Pick the branch by your imports: Tomcat 11 needs Java 17 and the jakarta.servlet packages, while javax apps stay on Tomcat 9, supported until 31 March 2027 for 9.0.x, with a 9.1.x branch planned to receive releases until 31 December 2030. The Tomcat hosting guide has the version details.

Heroku also deserves a mention for its Java buildpack, which now defaults new apps to the latest LTS release, OpenJDK 25. If you are unsure which release to target, the Java version timeline lists support end dates by vendor.

Payment methods and billing

This is the column most Java web hosting comparisons skip, and it can rule a provider out before you look at anything else. Railway accepts only credit cards for plan subscriptions. Heroku also wants a credit card and refuses PayPal, ACH and prepaid cards. Fly.io takes cards or Stripe Link and sells prepaid credits with a $25 minimum, but a prepaid card can only buy credits, not be saved as a payment method.

If you do not have a credit card, look at Hetzner (SEPA direct debit, bank transfer, PayPal), Clever Cloud (PayPal and SEPA alongside cards) or DigitalOcean (PayPal, and ACH direct debit for qualifying US customers). Oracle requires a card even for the Always Free tier, only to verify you. No provider in this table documents crypto payment on the pages checked.

Billing models differ too. Railway, Fly.io, Koyeb, Northflank and Clever Cloud bill per second of use, so a stopped app costs nothing. Render and Heroku charge a fixed monthly price per instance.

One provider to cross off

AWS App Runner stopped accepting new customers on April 30, 2026. Existing services keep running, but AWS plans no new features and points new users to Amazon ECS Express Mode. It stays in the table so you can compare prices, though for a new project the choice is Elastic Beanstalk, Lightsail or a container service elsewhere.

How this comparison was put together

Every figure comes from the provider's own pricing, documentation or SLA page, read in November 2026; two exceptions are marked. The Azure 99.95% SLA figure comes from Microsoft's Azure China SLA page, because the global page did not render the App Service text. Monthly prices for Azure B1 and Clever Cloud are computed from hourly list prices over 730 hours. Prices exclude VAT and sales tax. Free tier rules change often, so treat a missing value as "not stated on the checked page", not as "not offered". The data does not cover performance, support response times or real-world uptime; the comparison checks what each provider promises, not how it behaves under load. For licensing questions about the JDK itself, see the OpenJDK vs Oracle JDK comparison.

Sources

  1. tomcat.apache.org/tomcat-9.0.x-eos.html
  2. render.com/pricing
  3. render.com/docs/free
  4. render.com/docs/regions
  5. railway.com/pricing
  6. docs.railway.com/pricing/faqs
  7. docs.railway.com/reference/deployment-regions
  8. fly.io/docs/about/pricing
  9. fly.io/docs/about/billing
  10. heroku.com/pricing
  11. help.heroku.com/U1ZTRT21/does-heroku-accept-paypal-or-ach-as-a-payment-method-for-monthly-invoices
  12. koyeb.com/docs/reference/instances
  13. koyeb.com/pricing
  14. cloud.google.com/run/pricing
  15. cloud.google.com/run/sla
  16. aws.amazon.com/apprunner
  17. aws.amazon.com/elasticbeanstalk/pricing
  18. aws.amazon.com/lightsail/pricing
  19. aws.amazon.com/free
  20. azure.microsoft.com/en-us/pricing/details/app-service/linux
  21. azure.cn/en-us/support/sla/app-service
  22. docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm
  23. digitalocean.com/pricing/app-platform
  24. docs.digitalocean.com/products/app-platform/details/sla
  25. hetzner.com/cloud/cost-optimized
  26. docs.hetzner.com/general/billing-and-account-management/billing-at-hetzner/payment-overview
  27. northflank.com/pricing
  28. clever.cloud/pricing
  29. clever.cloud/developers/doc/billing/payments-invoicing

Filter the plans

Every plan in one table.

Filter by free tier, always-on or Europe, or use the plan finder on the tools page.

Open the plan finder ↗

Java hosting plans: memory, CPU, sleep rules, monthly price, payment methods, regions and uptime commitment.
Hosting planResourcesSleep rulesMonthly pricePaymentRegionsUptime SLADetails
Render FreeWeb service, Docker image
RAM512 MBCPU: Shared
Spins down after 15 min FreeSource ↗ Not stated EUUSAP Enterprise only ↗
Oracle Always FreeArm VM, install your own JDK
RAM12 GBCPU: 2 OCPU Arm
Idle VMs may be reclaimed FreeSource ↗ Card required EUUSAP Not stated ↗
Koyeb FreeOne free instance per org
RAM512 MBCPU: 0.1 vCPU
Scales to zero after 1 h FreeSource ↗ Not stated EUUS Scale plan only ↗
Azure App Service F1Java SE and Tomcat stacks
RAM1 GBCPU: 60 CPU min/day
Daily CPU quota FreeSource ↗ Not stated EUUSAP No SLA on free ↗
Fly.io shared-cpu-1xContainer, billed per second
RAM1 GBCPU: 1 shared
Runs while the Machine runs $6.70Source ↗ Card / Stripe Link EUUSAP Not stated ↗
Heroku EcoJava buildpack, personal accounts
RAM512 MBCPU: Shared
Sleeps after 30 min idle $5Source ↗ Card only EUUS Not stated ↗
Heroku BasicJava buildpack, always on
RAM512 MBCPU: Shared
Always on $7Source ↗ Card only EUUS Not stated ↗
Render StarterPaid web service
RAM512 MBCPU: < 1 CPU
Always on $7Source ↗ Not stated EUUSAP Enterprise only ↗
DigitalOcean App PlatformContainer or buildpack
RAM512 MBCPU: 1 shared vCPU
Always on $5Source ↗ Card / PayPal / ACH USEUAP 99.95% ↗
AWS LightsailPlain VM bundle
RAM512 MBCPU: 2 vCPU
Always on $5Source ↗ Not stated USEUAP Not stated ↗
Hetzner CAX11Cloud VM, from price excl. VAT
RAM4 GBCPU: 2 Arm vCPU
Always on €6.49excl. VATSource ↗ Card / SEPA / PayPal / wire EU Not stated ↗
Clever Cloud nanoNative Java runtime, WAR or JAR
RAM512 MBCPU: Shared
Always on ~€6.08excl. VATSource ↗ Card / PayPal / SEPA EU Not stated ↗
Northflank nf-compute-50Container, billed per second
RAM1 GBCPU: 0.5 vCPU
Always on $12Source ↗ Not stated EUUS Not stated ↗
Azure App Service B1Java SE, Tomcat, JBoss EAP
RAM1.75 GBCPU: 1 core
Always on ~$12.41Source ↗ Not stated EUUSAP 99.95% ↗
ⓘ Every price links to the provider's own page, checked November 2026. ~ = monthly figure worked out from the hourly rate.Full Java hosting comparison →

Hosting / FAQ

Good questions.
Clear answers.

What is the cheapest always-on Java hosting?

Among managed platforms, Fly.io runs a 512 MB machine around the clock for $3.69 a month and a 1 GB machine for $6.70. Heroku Basic is $7 for 0.5 GB without sleep, and Render's first paid instance is $7 for 512 MB. If you can manage a server yourself, a Hetzner CAX11 with 4 GB RAM starts at EUR 6.49 a month.

Which Java hosting has no sleep on the free plan?

Northflank's Sandbox is described as always on with no sleeping, within about $20 a month of resources. Oracle Cloud's Always Free VMs also keep running, though Oracle may reclaim instances that stay idle for seven days. Render, Koyeb and Heroku Eco all put idle apps to sleep.

Do I need a credit card for free Java hosting?

Not everywhere. Northflank Sandbox and Fly.io's trial start without a card, and Clever Cloud gives sign-up credits without one. Oracle Cloud requires a card at sign-up for verification. The free Java hosting guide lists the card rules for every provider it covers.

Can I deploy a WAR file instead of a JAR?

Yes, on platforms with a servlet container built in: AWS Elastic Beanstalk has Tomcat platforms, Azure App Service has a Tomcat stack and Clever Cloud has a WAR runtime. Elsewhere you package Tomcat and your WAR into a Docker image. See the Tomcat hosting page for versions.

Which providers have a European region for GDPR reasons?

Almost all of them. Render has Frankfurt, Railway has Amsterdam, Koyeb and Northflank have Frankfurt, Heroku has an eu region, Google Cloud Run lists 13 European locations, and Hetzner and Clever Cloud are European providers with data centers in Germany, Finland and France.

Find your next step.