BIENVENUE10valid for the first month only! on all offersView plans
Skip to content
← Knowledge base

Deploy a Java application on onesubnet

Deploy Spring Boot / JVM: Maven/Gradle build, run the JAR, port and environment variables.

Deploy a Java application on onesubnet

onesubnet runs your Java applications (Spring Boot, services, API) on an optimized JVM. Deploy via Git.

1. Prepare the project

  • A pom.xml (Maven) or build.gradle (Gradle) at the root.
  • Spring Boot reads the PORT variable automatically. For another server, bind the port to $PORT.

2. Deploy

  1. Connect your Git repository in the panel.
  2. Build command:
    • Maven: mvn clean package -DskipTests
    • Gradle: ./gradlew build -x test
  3. Start command: java -jar target/app.jar (adjust the JAR name). For Spring Boot, add --server.port=$PORT if needed.

3. Environment variables

DATABASE_URL, Spring secrets (SPRING_DATASOURCE_URL…) in Settings → Environment.

4. JVM memory

To tune the heap to your plan: java -Xmx512m -jar target/app.jar.

References

Related products

oneSubnet

French hosting provider in Paris. High-performance game and voice servers.

SERVICES

Resources

LEGAL

All systems operational