Framework Frankfurt, Germany

Deploy Spring Boot on Nodion

Connect your repository and Nodion builds your Spring Boot app with its Maven or Gradle wrapper, skips the tests and starts the executable jar on a Temurin JRE. server.port comes from the PORT that Nodion sets, so you do not configure the port yourself. The app runs in Frankfurt, next to a managed PostgreSQL database if you need one.

Deploy to Nodion ›

from 1 EUR / month

Up to 15 € credit when signing up

Detected by
pom.xml or build.gradle(.kts)
Start
java -Dserver.port=$PORT -jar with the Boot jar
Java
11, 17, 21 (default), 25, 26, 27
Region
EU Central (Frankfurt)

Deploy Spring Boot step by step

  1. Keep the wrapper and pin Java Spring Initializr projects ship with mvnw or gradlew. Nodion runs ./mvnw -B -DskipTests clean package or ./gradlew build -x test --no-daemon and starts the largest jar in target/ or build/libs/, skipping Gradle's -plain jar. Gradle without the wrapper fails; Maven without it builds with Nodion's own Maven. The Java version comes from system.properties (default 21), not from your build file's toolchain. system.properties
    java.runtime.version=21
  2. Add Actuator for the health check Traffic switches once the health check path answers with 2xx or 3xx, and the default path / returns 404 in many Spring Boot apps. Add Actuator (in Gradle: implementation 'org.springframework.boot:spring-boot-starter-actuator') and set the health check path to /actuator/health in the app settings. pom.xml
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
  3. Point the datasource at your own variables Spring Boot expects a JDBC URL and does not read DATABASE_URL, which is a postgres:// URL. Reference your own variables in application.properties and add the PostgreSQL driver org.postgresql:postgresql as a runtime dependency. Nodion fills the variables when you attach the database in the next step. application.properties
    spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
    spring.datasource.username=${DB_USER}
    spring.datasource.password=${DB_PASSWORD}
  4. Create the app and attach PostgreSQL Create an application from your repository in the region EU Central with at least 1 GB of memory, then a PostgreSQL database in the same region. When you attach it on the Environment tab, inject host, port, database, user and password as DB_HOST, DB_PORT, DB_NAME, DB_USER and DB_PASSWORD. They arrive on the next deploy.
  5. Push to deploy Every push to the branch builds a new release. Flyway or Liquibase migrations run when the new version starts, before it passes the health check; until then the running version keeps serving, so keep migrations compatible with the old code.

Good to know

  • MemoryPlan 1 GB or more per instance. The JVM gets JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=80.0 by default, so the heap may use most of the instance's memory. Set JAVA_TOOL_OPTIONS to replace it, or JAVA_OPTS to add flags to the start command.
  • Spring SecurityIf you define your own security filter chain, permit /actuator/health without login. A 401 or 403 on the health check path never becomes ready, and after 10 minutes the release is aborted while the old version keeps serving.
  • Multi-module projectsNodion only looks for jars directly in target/ and build/libs/ of the base directory. If the Boot jar is built in a module folder, start it with a Procfile line and pass the port yourself, for example web: java -Dserver.port=$PORT -jar app/build/libs/app.jar.

What Nodion runs for you

  • Deploys without downtime Push to your branch and Nodion builds a new release. Traffic switches once the new instances answer their health check; a failed release leaves the running one in place. Apps with a local volume restart instead, because the disk belongs to one instance.
  • Databases next to the app Managed PostgreSQL, pgvector, MySQL, Valkey and ClickHouse in the same region. Attached databases arrive as DATABASE_URL, REDIS_URL or CLICKHOUSE_URL.
  • Previews per pull request Turn on previews and pull requests from your repository get their own app with its own URL and fresh, empty databases, created automatically or by hand. Forks and bot pull requests are skipped.
  • Workers, cron jobs and scaling Run workers as extra processes of the same app, schedule jobs on the Cron tab, and scale every process to up to 16 instances.
  • Release step With buildpacks, a Procfile release: line runs with every new build. Dockerfile apps, and redeploys or rollbacks to an earlier image, use a release command set on the app itself, which also takes precedence over the Procfile line. On static sites a release step runs in an image that holds only the built files.
  • Logs and metrics Build, release and runtime logs plus CPU, memory, disk and network metrics for every instance in the dashboard.
  • Domains and HTTPS A default hostname with HTTPS from the first deploy; your own domains get certificates automatically.

Further reading

Spring Boot on Nodion: questions and answers

Why does my Spring Boot deploy never become ready?

Usually the health check hits /, which has no mapping and answers 404, or Spring Security answers 401. Add Actuator, set the health check path to /actuator/health and make it reachable without login. A JVM that runs out of memory during startup never gets ready either; give it 1 GB or more.

Can I build with Gradle without the wrapper?

No. A Gradle project needs a committed gradlew together with the gradle/wrapper folder; run gradle wrapper once and commit the result. Maven projects also build without a wrapper, with Nodion's own Maven.

Does Spring Boot with Kotlin work?

Yes. Kotlin projects from Spring Initializr build with the same Maven or Gradle wrapper, and build.gradle.kts is detected like build.gradle.

Where does my Spring Boot app run?

In the EU Central region in Frankfurt, Germany. Build, registry, the app and its databases, volumes, buckets, logs and metrics stay in that region, and Nodion's API and control plane are hosted in Germany. Nodion GmbH is based in Stuttgart.

Can I use Spring Boot in line with the GDPR?

Nodion provides the basis for it: Nodion GmbH is based in Stuttgart, Germany, in the Frankfurt region the app, its databases and volumes run in Germany, and you conclude the data processing agreement (DPA) under Art. 28 GDPR electronically in the dashboard. Whether your setup complies also depends on how you configure and use the app.

How much does it cost to run Spring Boot on Nodion?

An app instance starts at 1 EUR per month. The setup in the cost box costs 5.50 EUR per month: App 4 EUR, PostgreSQL 1.50 EUR. Prices are net and billed per second, and you pick bigger sizes or more instances whenever you need them.

Can I use my own domain for my Spring Boot app?

Yes. Every app gets a default hostname with HTTPS. Add your own domain on the app's Domains tab; the TLS certificate is issued and renewed automatically.

Give your agent a cloud.

Earn up to 15 € in credit when signing up.

Continue with GitHub

or with email

Stay in the loop.

Product news, no spam. Unsubscribe anytime.