Super Java Host
  1. Home
  2. Java hosting
  3. Spring Boot hosting

Spring Boot hosting without the platform bill

Your executable JAR runs as a systemd service on a server you control, behind Nginx with SSL, next to your database.

Spring Boot needs a place to run, not a platform

A Spring Boot application is a single executable JAR with an embedded web server. All it needs is a JVM, some memory, a way to start on boot and restart after a crash, and a front door with HTTPS. That is exactly what a VPS gives you at a fixed monthly price, without paying for a platform you do not use.

How your app runs on our server

  • The JAR lives in /opt/app/app.jar and runs as a systemd service under its own user.
  • Systemd starts it on boot and restarts it if it exits with an error.
  • Spring Boot listens on 127.0.0.1. Nginx terminates HTTPS and forwards requests to it.
  • Settings come from environment variables in /etc/app.env, such as SERVER_PORT, SPRING_DATASOURCE_URL and SPRING_PROFILES_ACTIVE. Secrets stay out of the JAR.
  • The JVM heap is sized to the memory of your server.

Deploying a new version

./mvnw -DskipTests package
scp target/myapp.jar you@your-server:/tmp/
ssh you@your-server sudo deploy-app /tmp/myapp.jar

deploy-app keeps the previous JAR as app.jar.prev, installs the new one, restarts the service and shows its status. If the new version fails, copy the previous file back and restart. The long version is in run a Spring Boot JAR as a systemd service.

Java version

Spring Boot 3 and newer need Java 17 or later. Java 21 is the best default today: it is a long-term support release and brings virtual threads, which Spring Boot can use for request handling. Spring Boot 2 applications still run on Java 8 or 11 if you have not migrated yet.

Memory

A small Spring Boot API with a database connection pool runs in a 256 to 512 MB heap. A typical production service with Hibernate, caches and a few hundred concurrent users is comfortable with 1 to 2 GB of heap. That fits the 4 GB and 8 GB plans, including a database on the same server. Read how much RAM a Java app needs to size it properly.

Database and extras

MySQL, MariaDB or PostgreSQL can run on the same server and listen only on localhost, which keeps latency low and the attack surface small. We add a nightly dump. Redis, RabbitMQ or Kafka can run alongside if your memory allows. See Java hosting with a database.

Actuator and health checks

If you use Spring Boot Actuator, expose only the health endpoint publicly and keep the rest on localhost. Managed plans monitor the application and alert us when it stops answering.

Questions about spring boot hosting

Can I run more than one Spring Boot service on one server?

Yes, if memory allows. Each service gets its own port and its own Nginx server block. Ask us when you subscribe and we will set it up.

Does this work for Kotlin and Gradle projects?

Yes. Anything that produces an executable JAR runs the same way, whatever language or build tool you use.

Can I build the project on the server?

We recommend building in CI or on your machine and uploading the JAR. Builds need a lot of memory and slow the application down.

What about Spring Boot native images?

Native executables need GraalVM and a lot of memory to build. Build them in CI and run the result on the server, or use the normal JAR.

Your own Java server, billed monthly

Plans from €15.30 a month. Set up for you, or run for you.