You can find the step-by-step deployment guide here.
This guide explains how to build and deploy a Ktor application on Hostman App Platform. It covers the build environment, JAR selection process, and the runtime requirements your application must meet for a successful deployment.
The application is built using the following environment:
The build process runs in the root of the repository or in the directory specified in the Project directory path field.
If the project includes a gradlew file, the template uses Gradle Wrapper for the build process. If gradlew is not present, the system Gradle installation is used instead.
By default, the following build command is executed:
./gradlew buildFatJar --no-daemon
If Gradle Wrapper is not available, the following command is used instead:
gradle buildFatJar --no-daemon
After the build is completed, App Platform selects the JAR file to run using the following logic:
build/libs/ directory contains a file matching the *-all.jar pattern, that file is used. This is typically the fat JAR generated by Ktor.*-all.jar file is found, the platform uses the first .jar file found in the build/libs/ directory.Make sure the Ktor Gradle plugin is configured correctly and that the buildFatJar task is available in the project.
Make sure your application listens on 0.0.0.0 instead of 127.0.0.1. Otherwise, external connections will not be able to reach the application.