Independent Java hosting & deployment guide

Free Java hosting, compared.
Where your app comes alive.

Free Java hosting and low-cost JVM plans, with the limits that matter: what each one costs, which JDK to ship on, and how to get from laptop to public URL without surprises.

A little life inside the machine

Server atlas

Every kind of server, explained.

From shared hosting to serverless: what each one is, what it costs, and which one runs Java best.

Selected / 04

VPS, your own virtual machine with root access

Monthly
$4.54 to $24
Control
4/5
Java fit
Excellent

OVHcloud VPS-1: 2 vCores and 4 GB from $4.54.

FIG. 1 ·Inside a 2U server
Exploded view of a 2U rack server: steel lid, CPU, copper heat sink, RAM, NVMe drives, power supply and fans
RAMUp to 6 TB in one box

A current 2U server such as the Dell PowerEdge R7725 takes up to 6 TB of DDR5 across 24 slots. The free Java plans on this site give you 512 MB to 12 GB of it, and the JVM heap, the operating system and your app's threads all have to fit inside that.

Free plans by RAM →
192Cores in one server CPU today
44.45 mmThe height of 1U
2 GB → 6 TBMax RAM, then vs now
Prices checked November 2026 on each provider's page and change often.Compare Java hosting plans →

01 / Find your fit

The right home for your next deploy.

Free tiers and low-cost plans that run a JVM, with the limits that decide whether your app stays up.

How the comparison works ↗

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 ↗
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 BasicJava buildpack, always on
RAM512 MBCPU: Shared
Always on $7Source ↗ Card only EUUS Not stated ↗
DigitalOcean App PlatformContainer or buildpack
RAM512 MBCPU: 1 shared vCPU
Always on $5Source ↗ Card / PayPal / ACH USEUAP 99.95% ↗
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 ↗
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 →
Guardian tip

Hi, I guard your JVM. Tell me what you run and I will find where it fits.

Drag to rotate

Meet your Java guardian

Your Java server.
Under control.

Tell the guardian what you run. Get the plans that fit and the setup that works.

Java setup check

Free tool

Where to run your Java app, and how to set it up. Prices checked at the source.

02 / A little guidance

From “it works locally” to live.

Learn · Build · Deploy
Deployment guide

Deploy your
first Java app.

Fat JAR, a small Docker image, sane JVM memory flags, health checks and a live URL.

Read the guide ↗Step by step / Beginner
A glowing violet application module slotted into an open server cartridge
Three stacked amethyst computing tiles

Migration / Intermediate

Servlets & JSP → Jakarta EE

The javax to jakarta move, which Tomcat runs what, and the tools that convert old WARs.

Explore the migration →
A silver gear resting on a violet computing tile

Setup / Beginner

Tomcat or Jetty?

Versions, Servlet specs, licenses and the scenarios where each container fits.

Compare the two →

03 / Java & licenses

Know your Java.
Know your license.

Five long-term support releases are still in use. Support ends on different dates per vendor, and the Oracle JDK license changes with the version.

See every support date ↗

Java 25, the newest LTS (September 2025): Oracle JDK 25 is free to use under NFTC, Premier Support until September 2030.

JDK optionLicenseCommercial use
OpenJDK buildsGPLv2 + Classpath ExceptionFree (Temurin, Corretto, Zulu, Microsoft, Red Hat)
Oracle JDK 25NFTC (no-fee terms)Free to use
Oracle JDK 8-21OTN licensePaid subscription for production
ⓘ Dates from each vendor's support roadmap, checked November 2026.

04 / Developer toolkit

Make the next decision easier.

Java Launchpad

What are you putting online?

Five quick answers, and the comparison data suggests where to start.

  • 14plans checked
  • 4free tiers
  • 8always on
  • November 2026prices checked
1What is it?
2Who will use it?
4Monthly budget
5Region
Best matches

    Sorted by monthly price, then memory. Change any answer and the list updates.

    Show me the steps →
    ⓘ A starting point from the comparison data, not a performance guarantee. Already deployed and stuck? Fix an issue. € prices exclude VAT; a database is priced separately.

    Around 2000 / The servlet archive

    Old-school curiosity.
    Still worth exploring.

    Member projects at /~name/ addresses, servlets, FTP servers and Java games from the early web.

    A smoked-purple archival storage cartridge with folder symbolsmycgiserver / archive

    Free and paid Java hosting compared: the limits that decide

    Most advice on Java hosting starts with price. Start with memory instead. A JVM claims heap at startup, keeps compiled code in its own memory areas and loads every class your framework needs before it answers the first request. An app that runs happily on your laptop can fail on a 512 MB instance that would carry a Node or Go service without trouble. Figures checked in November 2026.

    Memory for the JVM

    As a working rule, a lean app with a capped heap fits in 512 MB, and a typical Spring Boot service with a database driver is more comfortable at 1 GB. Modern JVMs read the container's memory limit, but by default they give the heap only a quarter of it: 128 MB on a 512 MB plan. Raise that share with -XX:MaxRAMPercentage, around 70 to 75 for a container that runs one app, instead of copying a fixed -Xmx from your laptop. A heap set larger than the plan allows is the usual reason for a container that restarts with exit code 137. Then compare plans by price per gigabyte, not price per instance. On that measure the spread is wide: Render's first paid instance is $7 for 512 MB, Fly.io runs 1 GB for $6.70 a month, and a Hetzner CAX11 virtual machine gives you 4 GB from EUR 6.49. The Java hosting comparison puts fifteen providers side by side on exactly these numbers.

    Sleep rules on free tiers

    Free Java hosting exists, but it usually sleeps. Render spins a free service down after 15 minutes without traffic, Koyeb after an hour. When the next visitor arrives, the container starts and the JVM boots from cold, which can take a minute or more. That is fine for a portfolio or a class project and annoying for anything people depend on. Northflank's Sandbox is described as always on. Oracle's Always Free VMs do not sleep on a timer, but Oracle may reclaim an instance whose CPU, network and memory use all stay under 20% for seven days. The free Java hosting breakdown lists the catches for each.

    Build time and how the code arrives

    Platforms build Java in two ways. Some take your repository and run Maven or Gradle for you through a buildpack: Heroku, Koyeb and Railway's Railpack all have Java support. Others expect a finished Docker image. Builds on the platform are convenient, but a Gradle build with a cold cache can take minutes, and on usage-billed platforms that time is not always free. Building the image in your own CI and pushing it keeps deploys fast and predictable. The deployment guide walks through both routes.

    Tomcat hosting for WAR files

    If your app is a WAR rather than a self-contained JAR, the Tomcat version decides more than the host does. Tomcat 11 implements Servlet 6.1 with the jakarta.servlet packages and needs Java 17 or newer. Apps that still import javax.servlet run only on Tomcat 9, whose 9.0.x line is supported until 31 March 2027; Apache plans a 9.1.x branch with minimal changes that receives releases until 31 December 2030.

    Three providers offer Tomcat hosting with the server managed for you. AWS Elastic Beanstalk has a platform with Corretto 25 and Tomcat 11, and charges only for the EC2 instances and other resources it creates. Azure App Service on Linux lists Tomcat as a built-in stack, from about $12.41 a month on the B1 plan with 1.75 GB of RAM. Clever Cloud runs WAR files natively from about EUR 4.56 a month for 256 MiB. On any other container platform, the official Tomcat Docker image gives you the same kind of Java web hosting. The Tomcat hosting guide covers each route.

    The database connection

    Most Java apps also need a database, and the connection string trips up a lot of first deploys. The PostgreSQL JDBC driver expects a URL in the form jdbc:postgresql://host:port/db, while platforms often hand out a postgres://user:password@host/db URI. Heroku adds JDBC_DATABASE_URL in the JDBC format for Java apps; on other platforms you convert it yourself. Managed databases usually require encryption as well: Heroku Postgres accepts only TLS 1.2 or higher, so the URL needs sslmode=require. The database connection checklist goes through the errors one by one.

    Regions and data location

    If your users or your contracts are in Europe, check where the provider can run your app. Render, Koyeb and Northflank offer Frankfurt, Railway has Amsterdam, Google Cloud Run lists more than a dozen European locations, and Hetzner and Clever Cloud are European companies with data centers in Germany, Finland and France.

    Payment methods

    This one rules out providers faster than anything else. Railway accepts only credit cards for subscriptions. Heroku takes credit cards but no PayPal, ACH or prepaid cards. Fly.io sells prepaid credits with a $25 minimum. Without a credit card, look at Hetzner (SEPA, bank transfer, PayPal), Clever Cloud (PayPal, SEPA) or DigitalOcean (PayPal, and ACH for qualifying US customers). Oracle asks for a card even on its free tier, only to verify you.

    The JDK and its license

    The runtime you ship on matters as much as the host. Java 25 is the current LTS release, and Heroku already defaults new Java apps to it. Free OpenJDK builds such as Eclipse Temurin and Amazon Corretto are licensed under GPL version 2 with the Classpath Exception and can run commercial apps in production at no cost. Oracle JDK is different: version 25 is free for all users under Oracle's No-Fee Terms, but updates released after September 2028 are planned to move to the Java SE OTN license, and Oracle JDK 8, 11, 17 and 21 are free for personal and development use only. The OpenJDK vs Oracle JDK comparison explains when that matters, and the Java versions timeline shows support end dates by vendor.

    Once the app is live, you will want to reach the server from anywhere. The developer tools page rates SSH and cloud console apps for phones and includes a hosting plan calculator for sizing JVM memory. Java web hosting rewards a bit of preparation, and most surprises come from the same few places: memory, sleep rules, the database URL, region and payment.

    05 / Before you deploy

    Good questions.
    Clear answers.

    Short answers, with links to the full guides.

    Can I host a Java app for free?

    Yes, with limits. Render, Koyeb and Railway have free tiers, Google Cloud Run includes a monthly free allowance, Azure offers the F1 plan, Northflank has an always-on Sandbox and Oracle Cloud's Always Free VMs give up to 12 GB of RAM on Arm. Most free tiers sleep or cap usage. The free Java hosting guide compares them.

    Which Java version should I choose?

    Java 25 for anything new. It is the newest LTS release, out since September 2025, and the major free builds support it into the 2030s: Amazon Corretto to October 2032, Eclipse Temurin to at least September 2031. Stay on Java 21 or 17 only if a dependency is not ready. Details are on the Java versions page.

    Tomcat, Jetty or Jakarta EE?

    Tomcat 11 if you deploy WAR files and need servlets, JSP and WebSocket. Jetty 12.1 if you want one server that runs both javax and jakarta apps or embeds cleanly. A full Jakarta EE server such as WildFly 42 or GlassFish 8 when you need CDI, JPA and transactions managed by the container.

    Can I use OpenJDK commercially?

    Yes. OpenJDK is licensed under GPL version 2 with the Classpath Exception, which lets you run commercial applications on it without paying. Builds such as Eclipse Temurin, Amazon Corretto and Microsoft's are free to use in production. Oracle JDK has its own license terms; see OpenJDK vs Oracle JDK.

    How much memory does a Java app need?

    A lean app with a capped heap fits in 512 MB, and a typical Spring Boot service with a database driver is more comfortable at 1 GB. By default the JVM gives the heap only a quarter of the container's memory, 128 MB on a 512 MB plan, so raise that share with -XX:MaxRAMPercentage. The exit code 137 page explains what happens when the heap outgrows the plan.

    Why is my Java app slow on the first request?

    On a free plan it was probably asleep. Render spins a free service down after 15 minutes without traffic and needs about a minute to bring it back, and Koyeb scales to zero after an hour. The JVM then starts from cold and loads its classes before it answers. The slow first request page covers the fixes.

    What happened to the original mycgiserver?

    Around 2000, mycgiserver.com was a free hosting service for Java servlets and JSP pages. Member projects lived at addresses such as /~name/, and servlets ran under /servlet/. From 2004 it ran as MyJavaServer, with support from Javalobby, and in 2006 it still counted more than 47,000 developer accounts. The service later closed and the domain sat parked. Today the address hosts an independent guide to hosting and running Java applications.

    Find your next step.