2
13 Comments

Best (Cheapest) Hosting for Java/Spring Boot?

Hi!

Do any of you develop your indie projects in Java? More specifically, using Spring Boot?

If so, would you mind sharing how you host it?

I've been using Heroku. The infrastructure is good and easy to use, but I'd like to know other possibilities as well.

posted to Icon for group Developers
Developers
on February 12, 2020
  1. 1

    I use a Spring Boot/React/Postgres stack and deploy to DigitalOcean and Hetzner. I think Hetzner might be your best bet if you're looking for the cheapest solution.

  2. 1

    I just posted what I do to deploy. Keep it simple and cheap. I use digitalocean.

    https://www.indiehackers.com/post/keep-hosting-simple-and-cheap-f688a8c20b

  3. 1

    Yes. I actively use Spring Boot/Thymeleaf/MySQL to develop web applications. All of my own Spring Boot apps are hosted on Amazon Lightsail whereas my clients mostly use DigitalOcean.

    Heroku is good if you are not comfortable with server management (installing Tomcat, Nginx, Lets Encrypt, MySQL, and other day to day tasks).

    AWS and DigitalOcean are cheaper than Heroku but they only give you a cloud server. You have to install everything by yourself. I use Tomcat standalone container for running the Spring Boot project. Nginx is used as a reverse proxy to serve the web requests. For SSL, I use Lets Encrypt.

    P.S. I also write about Spring Boot and Java on my blog. You can find dozens of articles on different topics.

    1. 1

      Hi @attacomsian! I've come across your blog before, I guess. You post some nice stuff about this specific stack (Spring Boot/Thymeleaf/MySQL).

      Thanks for the help. Would mind sharing how much you pay for Amazon Lightsail?

      1. 1

        I pay $10/month for a Ubuntu machine with 2GB RAM. It is enough for now. It served ~80k pageviews last month.

        1. 1

          Hi,
          I am unable to decide if my application would need 2 core or 1 core cpu
          My website built on spring boot is already live but I am using GCP which is very costly. Can you please help me make a choice ?

    2. 1

      Aws has ElasticBeanStalk service , comes with managed tomcat , Apache. No need of installations and server management . I pay $10 per month for the Java/Spring/Thymleaf stack

      1. 1

        ElasticBeanStalk is good but I am not a fan of unpredicted prices. With DigitalOcean and AWS Lightsail, at least I know upfront how much I am going to pay at the end of the month.

  4. 1

    I run a VPS comparison post series in which I perform benchmarks monthly. Vultr has a High Frequency plan that overall is pretty darn great. Personally, I stick with Linode, over 10 years with hardly a complaint.

    You're welcome to seek out my blog (it's on my profile). Figured it would be too self serving to link directly considering it has referral links on it ;)

    1. 2

      I'll take a look, thanks!

      I guess there's no problems to link your blog here as long as you let people know of the referral links (which you did).

      1. 1

        Fair point... I try to be cautious with that stuff, people can be hyper sensitive and start blasting about "self promotion" and stuff, just easier to avoid it when I can ;)

        That said, this post would be the more relevant, as you're looking for "cheapest":

        https://joshtronic.com/2019/11/04/vps-showdown-digitalocean-lightsail-linode-upcloud-vultr/

        All instances are in the $5-$6 range, and somewhat anecdotal as they are just straight system benchmarks and aren't real world benchmarks of a running app.

        Just from my experience, even when you settle on a provider, it's really good to spin up 3-5 instances and compare to the system specs, because you can get a different server roll each time, depending on how many different types of system the provider has deployed.

        As mentioned, those High Frequency Vultr options have been crushing it, and in some more recent comparisons I've done at higher price points, they've performed EVEN BETTER, so they are also a solid pick if you are planning to scale your machines up in the future.

  5. 1

    Depends on the scale and traffic of the app. If it is low then you can always use DigitalOcean/Vultr or Hetzner. It won't auto-scale but that is something you need to choose.

    Otherwise, there is also AWS ElasticBean which may be cheaper than Heroku.

    Although I don't use Java but I'm running a Python/Flask project with Nginx on a small machine over at DigitalOcean.

  6. 1

    This comment was deleted 4 years ago.

    1. 1

      You can take a look at Heroku's website (https://www.heroku.com/pricing). The standard plan starts at $25 USD. They have the free and hobby options but I wouldn't use them for anything on production.

Trending on Indie Hackers
Why Most Startup Product Descriptions Fail (And How to Fix Yours) User Avatar 97 comments We just hit our first 35 users in week one of our beta User Avatar 43 comments From Ideas to a Content Factory: The Rise of SuperMaker AI User Avatar 27 comments AIgenerationtool — replacing hiring writers with 1 AI dashboard User Avatar 24 comments NanoBanana or Seedream4.0? Why Choose When You Can Have Both User Avatar 19 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 18 comments