Skip to main content
You need a JDK, the atoll CLI and an account. See Getting started for the CLI.

1. Create the project

Make a directory with three files:
settings.gradle.kts:
build.gradle.kts:
The application plugin and the ktor-server dependency are what tell the platform this module is a Ktor server.

2. Listen on PORT

src/main/kotlin/Main.kt:
The platform sets PORT. Locally, the server falls back to 8080.

3. Add the Gradle wrapper

The platform builds with your wrapper, so the project needs one:
Check that it runs locally:

4. Deploy

The CLI uploads the project, prints the build log and ends with:
The module path is : because the server is the root project. Open the URL.

5. Add a database URL

Set the URL as a secret that only the running server sees. It contains a password, so put it in a file instead of typing it on the command line, where it would end up in your shell history:
Read it in your server with System.getenv("DATABASE_URL"). Env var changes apply on the next deployment. Run atoll deploy again, or use Redeploy production in the panel’s Env tab.

6. Watch it

  • atoll list shows your deployments and their URLs.
  • atoll logs 3c9e41a0 prints the build log again.
  • atoll logs --project hello --follow shows what your server prints while it runs, and so does the panel’s Logs tab.

Next