Language Frankfurt, Germany
Deploy Java on Nodion
Nodion recognizes a Java project by pom.xml, build.gradle or a Maven or Gradle wrapper. The Java buildpack builds it with a Temurin JDK, skips the tests and starts the largest jar with java -jar on a Temurin JRE, so the JDK stays out of the run image. The app runs in Frankfurt, next to a managed PostgreSQL database if you need one.
- Detected by
pom.xml,build.gradle(.kts),mvnworgradlew- Start
java -Dserver.port=$PORT -jarwith the largest jar- Java
- Temurin 11, 17, 21 (default), 25, 26, 27
- Region
- EU Central (Frankfurt)
Deploy Java step by step
- Commit the Maven or Gradle wrapper With
gradlew, Nodion runs./gradlew build -x test --no-daemon; withmvnw, it runs./mvnw -B -DskipTests clean package. Apom.xmlwithout a wrapper builds with Nodion's own Maven. A Gradle project withoutgradlewfails, so create the wrapper withgradle wrapperand commit it together with thegradle/wrapperfolder. Tests are skipped during the deploy; run them in your CI. - Pin the Java version Without a pin, Nodion builds and runs with Java 21. Name another version in
system.properties. Toolchain settings inpom.xmlor your Gradle build are not read, so keep them in line with this file. system.propertiesjava.runtime.version=25 - Listen on PORT Nodion sets
PORTfor the web process and passes it to the JVM as-Dserver.port, which covers Spring Boot. Other frameworks, or your own server, readPORTthemselves and bind to0.0.0.0.int port = Integer.parseInt(System.getenv().getOrDefault("PORT", "8080")); - Create the app In the dashboard, create an application from your GitHub, GitLab, Bitbucket or Gitea repository, pick the branch, the region EU Central and a size with at least 1 GB of memory. Keep the build strategy on Buildpacks; if the repository has a Dockerfile, the form picks Dockerfile instead.
- Connect a database and migrate Attach a PostgreSQL database from the same region on the Environment tab.
DATABASE_URLis apostgres://URL, not a JDBC URL, so also inject host, port, database, user and password under your own names and build the JDBC URL from them, as the Spring Boot guide shows. Migrations that run at startup (Flyway, Liquibase) need nothing else; any other command can run from arelease:line in a Procfile, once per build before the new version starts.
Good to know
- MemoryThe JVM gets
JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=80.0by default, so the heap may use most of the instance's memory. SetJAVA_TOOL_OPTIONSyourself to replace it, orJAVA_OPTSto add flags to the start command. Most JVM web apps want 1 GB or more. - Which jar startsNodion starts the largest jar directly in
target/orbuild/libs/and skips-plain,-sourcesand-javadocjars. In a multi-module build the runnable jar sits in a module folder; start it with aweb:line in a Procfile and pass the port yourself. - Quarkus and other frameworks
-Dserver.portonly configures Spring Boot. Quarkus, Micronaut and others need their own port setting fromPORT. The Quarkus default fast-jar intarget/quarkus-app/is not picked up: start it with a Procfile line such asweb: java -Dquarkus.http.port=$PORT -jar target/quarkus-app/quarkus-run.jar, or build an uber-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_URLorCLICKHOUSE_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
- Dockerfile vs Buildpacks: Which One Should You Use? Both turn your code into a container image. What differs is who writes the build steps, and that decides control, maintenance and security updates.
- Cloud Native Buildpacks Explained Buildpacks turn your source code into a container image without a Dockerfile. What they are, and how they work.
Java on Nodion: questions and answers
Which Java versions can I use?
Temurin 11, 17, 21, 25, 26 and 27. Without a pin you get 21. Set java.runtime.version in system.properties; Maven and Gradle toolchain settings are not read.
Do my tests run during the deploy?
No. Gradle builds with -x test and Maven with -DskipTests, so deploys stay fast. Run your tests in CI before you merge.
Do Kotlin and Scala projects work?
Yes, as long as they build with Maven or Gradle and produce a runnable jar. sbt projects are not detected; use a Dockerfile for those.
Where does my Java 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 Java 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 Java 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 Java 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.