What is Java web hosting?
Java web hosting is any hosting environment that runs a Java Virtual Machine (JVM) and an application server capable of executing Java code, rather than just serving static files or PHP scripts. Most shared hosting plans advertised at £3 a month can't do this. They're built for WordPress and simple scripting languages, not for JAR or WAR files, the packaged formats Java apps get deployed in.
Clients come to HostList after signing up with a cheap shared host, only to discover there's no way to install Tomcat or any application server. They lose a month and a renewal fee before switching to something that actually supports Java. That's the mistake I see most: assuming "web hosting" is generic when Java has very specific requirements.
Proper Java hosting gives you SSH access, root or admin control, and enough memory to run a JVM comfortably. A JVM on its own can eat 256MB to 512MB before your application even loads a single request, so anything under 1GB of RAM is asking for trouble.
How does Java web hosting differ from regular web hosting?
Regular shared hosting runs your site through a web server like Apache or Nginx that hands requests to a scripting interpreter such as PHP. Java web hosting needs a persistent process instead, the JVM, running an application server that stays alive and handles requests directly or behind a reverse proxy.
This matters because shared hosting is built around thousands of tiny, short-lived processes sharing one machine cheaply. Java apps don't fit that model. They want dedicated memory, a stable process that doesn't get killed to save resources, and often a specific Java version pinned for compatibility.
That's why almost nobody hosts serious Java applications on shared plans. You'll find Java support on:
- VPS hosting (a virtual private server, your own isolated slice of a physical machine with root access)
- Dedicated servers, for high-traffic or compliance-heavy applications
- Cloud platforms, where you can spin up containers or managed app services
- Specialist Java/Tomcat hosts who pre-configure the JVM and app server for you
If you're weighing this up, our best VPS hosting roundup and VPS glossary entry are good starting points for understanding what you're actually buying before you commit.
Is there free Java web hosting worth using?
Free Java web hosting exists, but it's really only suitable for learning, portfolio projects, or short-lived demos, not anything customer-facing. Platforms like Render, Railway, and Heroku's legacy free tiers have offered limited free compute for small Java apps, though free tiers change constantly and often get restricted or removed.
The practical problem with free Java hosting isn't cost, it's constraints. Free plans typically spin your app down after inactivity, cap memory at levels a JVM struggles with, and give you no meaningful support if something breaks in production.
I tell people building a real product to treat free tiers as a sandbox, not a launchpad. Test your deployment pipeline, confirm your app boots correctly, then move to a paid VPS or cloud plan before you tell anyone the URL. The number of "why is my app down" tickets I've seen trace back to a free-tier app going to sleep isn't worth the aggravation of chasing them down.
If budget is the real constraint, a low-cost VPS often works out better than a free tier because you get consistent uptime and full control, without the sudden feature removals free platforms are notorious for.
What do I need to host a Java web application?
You need a server with a supported JVM version, an application server or servlet container, enough RAM for your app's peak load, and a way to deploy your build artifact. Get these four right and everything else is configuration detail.
Start with the JVM version. Java 17 and 21 are the current long-term support releases, and mismatches between what you built with and what's installed on the server cause a huge share of "it works on my machine" failures. Pin the exact version in your deployment scripts. Don't rely on "whatever's installed."
Next comes the container. Most Java web apps ship as either a WAR (Web Application Archive, for traditional servlet containers) or a self-contained JAR with an embedded server, common with Spring Boot. Know which one you're building before you choose hosting, because it changes what needs to be installed.
- Tomcat, the most common lightweight servlet container, good for traditional WAR deployments
- Jetty, similarly lightweight and popular for embedded use
- WildFly or Payara, full Jakarta EE application servers for enterprise features
- Embedded servers inside Spring Boot JARs, which need almost no server-side setup beyond the JVM itself
Finally, sort out your reverse proxy and TLS (the encryption behind HTTPS). Nginx in front of Tomcat is a standard, reliable pattern, and pairing it with a free certificate from Let's Encrypt costs nothing and takes minutes.
Is VPS or cloud hosting better for Java apps?
For most small to mid-sized Java applications, a VPS gives you the best balance of cost and control. Cloud hosting earns its keep once you need autoscaling, managed databases, or you're running multiple services that need to talk to each other reliably.
A VPS is a fixed slice of a server, root access included, and you install and manage everything yourself. That's genuinely fine for a Java app with predictable traffic. I've got clients running production Spring Boot apps on a single mid-tier VPS for years without issue, because Java, once tuned, is stable and doesn't need constant babysitting.
Cloud hosting, whether that's AWS Elastic Beanstalk, Google Cloud Run, or Azure App Service, adds real value when your load is spiky, you need to scale containers up and down automatically, or you're running a microservices architecture with several JVMs talking over a network. It costs more and has a steeper learning curve, so don't reach for it just because it sounds more "enterprise."
Our cloud hosting comparison breaks down providers by how well they handle exactly this kind of decision, and it's worth reading before you assume cloud is automatically the safer bet. It usually isn't, for a single application with steady traffic.
If you do go cloud and you're pairing your Java backend with a modern frontend, it's worth understanding Jamstack architecture and edge functions, since many teams now run a lightweight Java API behind a static frontend rather than serving HTML directly from Tomcat.
How much should Java web hosting cost?
Realistic Java web hosting costs more than typical shared WordPress hosting because you need more RAM and dedicated resources from day one. Expect entry-level VPS plans suitable for a small Java app to sit well above the cheapest shared hosting prices advertised elsewhere.
The number that actually matters isn't the advertised monthly price, it's the RAM allocation and whether the host lets you resize easily as your app grows. A JVM that's starved of memory doesn't fail gracefully. It grinds to a crawl or crashes under garbage collection pressure at the worst possible moment.
Watch out for renewal pricing too. Several hosts advertise a low introductory rate for VPS plans and then increase it substantially at renewal, a pattern that's well documented across the industry and one reason we built HostList's HRI score to look past headline pricing.
Before signing up anywhere, check our hosting directory and filter by Java or VPS support so you're comparing hosts that are actually equipped for this, not just cheap in general.
What's the best way to set up Tomcat hosting?
The best way to set up Tomcat hosting is on a VPS running Linux, with Tomcat installed as a systemd service, Nginx as a reverse proxy in front of it, and a proper deployment pipeline instead of manual file copying. This combination is battle-tested and well documented, which matters when something breaks at 2am.
Install a supported Java version first, confirm it with a version check, then install Tomcat and configure it to run as its own system user rather than root. This basic security step gets skipped more often than you'd think, and it's the first thing I check when auditing a client's server.
Nginx in front of Tomcat handles TLS termination, gzip compression, and lets you serve static assets without touching the JVM at all, which reduces load on the part of your stack that's actually expensive to scale. According to HTTP Archive, offloading static content from application servers remains one of the simplest performance wins available, and it applies just as much to Java stacks as anything else.
Set Tomcat to restart automatically on crash using systemd, monitor memory with a basic alerting tool, and automate deployment with a script or CI pipeline rather than dragging WAR files over FTP. Manual deployment is where most Java hosting incidents I've dealt with actually started.
What are the actionable next steps?
- Confirm your JVM version and packaging format (WAR vs JAR) before choosing a host, since it determines whether you need Tomcat, Jetty, or nothing more than an embedded server.
- Start on a VPS with at least 2GB of RAM, and only move to cloud autoscaling once you have real traffic data showing you need it.
- Use our directory filtered by VPS or Java support to compare hosts by HRI score rather than advertised price, and check renewal pricing before you sign up anywhere.
Frequently Asked Questions
Can I host a Java web application on shared hosting?
Almost never. Shared hosting plans are built for PHP and static sites, not persistent JVM processes. You need a VPS, dedicated server, or cloud platform with root or admin access to install a JVM and application server like Tomcat.
Is Tomcat free to use?
Yes, Apache Tomcat is free, open-source software. You pay only for the server it runs on, whether that's a VPS, dedicated server, or cloud instance, plus any managed hosting fee if you use a specialist Java host.
What's the difference between Tomcat and a full application server?
Tomcat is a lightweight servlet container, good for running standard Java web apps and WAR files. Full application servers like WildFly or Payara add enterprise Jakarta EE features such as messaging and advanced transaction management, which most small to mid-sized apps don't need.
How much RAM does a Java web app actually need?
A basic JVM startup can use 256MB to 512MB before handling a single request. For a real production app, budget at least 1GB to 2GB minimum, more if you're running multiple services or a database on the same server.
Should I use Spring Boot's embedded server instead of installing Tomcat separately?
For most modern Java apps, yes. Spring Boot bundles Tomcat or Jetty inside the JAR file, so you just run the JAR directly with no separate installation. It simplifies deployment considerably compared to managing a standalone Tomcat instance.
Follow HostList for new rankings, original research, and changes across the hosting industry.



