# Ktor

> **TL;DR**
> Required plugin: Kotlin (bundled), Ktor (bundled)

[Ktor](https://ktor.io/) is a web application framework for creating connected systems. You can use it to create server-side as well as client-side applications. It supports multiple platforms, including JVM, JavaScript, and Kotlin/Native.

IntelliJ IDEA provides the following capabilities for working with Ktor projects:

* A wizard for [creating new projects](#new_ktor_project).

* A dedicated run configuration for running and debugging Ktor projects.

* [Navigating](#navigation) between routes across a project.

* [Generating](#generate) tests for routes and adding sample code for Ktor plugins.

* [Code editing](#edit) assistance, including completion and renaming route names.

* Generating [OpenAPI](#openapi) specifications.

* [Migrating projects](#migrate) to the latest Ktor version.

Procedure: Enable the Ktor plugin

This functionality relies on the [Ktor](https://plugins.jetbrains.com/plugin/16008-ktor)  plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Ktor plugin, and select the checkbox next to the plugin name.

## Create a new Ktor project

Procedure:

1. On the Welcome screen, click New Project.

Otherwise, go to `File | New | Project` in the main menu.

2. In the New Project wizard, choose Ktor from the list on the left.

3. On the right pane, you can specify the following settings:

![Ktor Project Settings](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_new_project_settings.png)

* Name: Specify a project name.

* Location: Specify a directory for your project.

* Build System: Choose the desired [build system](https://ktor.io/docs/server-dependencies.html). This can be Gradle with Kotlin or Groovy DSL, or Maven.

* Website: Specify a domain used to generate a package name.

* Artifact: This field shows a generated artifact name.

* Ktor version: Choose the required Ktor version.

* Engine: Select an [engine](https://ktor.io/docs/engines.html) used to run a server.

* Configuration in: Choose whether to specify server parameters [in code, in a HOCON or Yaml file](https://ktor.io/docs/create-server.html).

* Add sample code: Use this option to add sample code for plugins, which will be added on the next page. > **Tip:** > You can also generate a plugin's code for the existing project using the [completion popup](#generate-plugin-code).

4. On the next page, you can choose a set of [plugins](https://ktor.io/docs/plugins.html) - building blocks that provide common functionality of a Ktor application, such as authentication, serialization and content encoding, compression, cookie support, and so on.

![Ktor plugins](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_new_project_plugins_list.png)

Click Create and wait until IntelliJ IDEA generates a project and installs the dependencies.

## Run a Ktor application

You can run a server Ktor application in one of the following ways:

* Using the [gutter icon](create-your-first-kotlin-app.html#run-code-from-idea) next to the `main` function.

* Using a respective [Gradle](work-with-gradle-tasks.html) task or [Maven](work-with-maven-goals.html) goal.

* Using the dedicated Ktor run configuration. > **Tip:** > To create the Ktor run configuration automatically for newly created or imported Ktor projects, use the Create Run Configuration automatically option on the `Settings | Languages & Frameworks | Ktor` page.

To run the application from the editor, follow these steps:

Procedure:

1. Click the gutter icon next to the `main` function and choose Run 'ApplicationKt'.

![Run a Ktor application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_new_project_run_gutter.png)

2. Wait until IntelliJ IDEA runs the application. The Run tool window should show the following message:

```
INFO  ktor.application - Responding at http://0.0.0.0:8080
```

![Run tool window](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_new_project_run_tool_window.png)

This means that the server is ready to accept requests at the `http://0.0.0.0:8080` address.

> **Tip:**
> You can learn the specifics of running server Ktor applications from the [Running](https://ktor.io/docs/running.html) topic.

## Navigation

Procedure: Find routes with Search Everywhere

To find a specific route in your application using [Search everywhere](searching-everywhere.html), follow the steps below:

1. Press `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (NetBeans), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (Eclipse), `Shift` (Eclipse (macOS)) twice to open the search window.

2. Start typing a route name.

![Search Everywhere](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_search_everywhere.png)

To narrow down your search, click the Filter icon ![Filter](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.filter.svg) on the window toolbar and select URLs.

Procedure: Navigate between a route and its usages

To navigate between a route and its usages in a project, do one of the following:

* Place the caret at the desired path or URL and press `Ctrl+B` (Windows), `⌘ B` (macOS), `⌘ B` (IntelliJ IDEA Classic (macOS)), `⌘ B` (macOS System Shortcuts), `Ctrl+B` (XWin), `Ctrl+B` (GNOME), `Ctrl+B` (KDE), `Ctrl+Alt+G` (Emacs), `F12` (Sublime Text), `F12` (Sublime Text (macOS)), `Ctrl+B` (NetBeans), `F12` (Visual Studio), `F12` (Visual Studio (macOS)), `F3` (Eclipse), `F3` (Eclipse (macOS)).

* Keeping `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (NetBeans), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) pressed, hover over the path or URL. When a URL turns into a hyperlink, click it without releasing the key.

* Click the ![Globe](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.inlayGlobe.svg) icon next to the path or URL and choose Go to declaration or usages from a popup.

IntelliJ IDEA will show related paths/URLs:

![Find usages](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_find_usages.png)

Procedure: Show routes in the Endpoints tool window

To see all HTTP or WebSocket endpoints defined in your Ktor application, use the [Endpoints](endpoints-tool-window.html) tool window:

1. Click the ![Globe](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.inlayGlobe.svg) icon next to the path and choose Show all endpoints of module from a popup.

![Show endpoints](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_endpoints_show.png)

2. In the invoked Endpoints tool window, you can see all the routes defined in your application.

![Ktor endpoints](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_endpoints.png)

If a Ktor server is [running](#run_ktor_app), you can make a request using the [HTTP Client](#http_editor) to see a response immediately or open it in the editor.

![Ktor endpoints HTTP client](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_endpoints_http_client.png)

On the OpenAPI tab, you can see an [OpenAPI specification](#openapi) for this route.

## Generate code

Procedure: Generate code for plugins

IntelliJ IDEA allows you to generate code for Ktor plugins using the [code completion popup](auto-completing-code.html):

1. Place the caret inside a [module](https://ktor.io/docs/modules.html), start typing `install` and then choose the desired plugin from the list.

![Install a plugin](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_plugin_completion_list.png)

2. Press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)). IntelliJ IDEA generates code for the selected plugin and adds the required dependencies to the build script.

![Code generated for a plugin](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_plugin_generate_code.png)

> **Tip:**
> IntelliJ IDEA also allows you to generate code for plugins when [creating a new project](#new_ktor_project) using the Add sample code option.

Procedure: Generate HttpClient

IntelliJ IDEA provides the ability to quickly add the [HttpClient](https://ktor.io/docs/create-client.html) to your project:

* Start typing ktor-client, choose this action from the list, and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

![Add HttpClient](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_client_macros.png)

IntelliJ IDEA creates the `HttpClient` instance and adds the required client dependencies to the build script.

Procedure: Create tests

IntelliJ IDEA allows you to generate tests for modules, groups of routes, or individual routes. This functionality is supported for both HTTP and WebSocket endpoints. To generate tests, follow the steps below:

1. Place the caret at the desired module or route, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)), and choose one of the following actions:

* Create test for Ktor module

* Create test for Ktor routes

* Create test for Ktor route

Module:

![Generate test for route](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_generate_test_module.png)

Multiple routes:

![Generate test for route](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_generate_test_routes.png)

Single route:

![Generate test for route](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_generate_test.png)

2. In the invoked dialog, you can specify a test class name, choose the desired routes, and edit individual test names.

![Generate tests](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_create_test_module_dialog.png)

Click OK.

3. IntelliJ IDEA will create a test class containing tests requests for the selected routes.

![Generate tests](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_empty_test.png)

You can learn how to test a Ktor server from [Testing](https://ktor.io/docs/testing.html).

> **Tip:**
> Note that IntelliJ IDEA generates Ktor tests using the dedicated [code templates](using-file-and-code-templates.html) available on the `Settings | Editor | File and Code Templates` page (the Code tab).

## Edit code

Procedure: Complete route names

IntelliJ IDEA allows you to [complete](auto-completing-code.html) the names of routes:

* Place the caret at the parameter that accepts a URL and press `Ctrl+Space` (Windows), `⌃ Space` (macOS), `⌃ Space` (IntelliJ IDEA Classic (macOS)), `⌃ Space` (macOS System Shortcuts), `Ctrl+Space` (XWin), `Ctrl+Space` (GNOME), `Ctrl+Space` (KDE), `Alt+/` (Emacs), `Ctrl+Space` (Sublime Text), `⌃ Space` (Sublime Text (macOS)), `Ctrl+Space` (NetBeans), `Ctrl+Space` (Visual Studio), `⌃ Space` (Visual Studio (macOS)), `Ctrl+Space` (Eclipse), `⌃ Space` (Eclipse (macOS)). The editor will show you the available routes.

![Complete route name](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_route_completion.png)

Procedure: Complete configuration properties

If your project stores configuration in a [YAML file](https://ktor.io/docs/configuration-file.html), you can use [autocompletion](auto-completing-code.html) for property names:

* Place the caret at any place in the configuration file and press `Ctrl+Space` (Windows), `⌃ Space` (macOS), `⌃ Space` (IntelliJ IDEA Classic (macOS)), `⌃ Space` (macOS System Shortcuts), `Ctrl+Space` (XWin), `Ctrl+Space` (GNOME), `Ctrl+Space` (KDE), `Alt+/` (Emacs), `Ctrl+Space` (Sublime Text), `⌃ Space` (Sublime Text (macOS)), `Ctrl+Space` (NetBeans), `Ctrl+Space` (Visual Studio), `⌃ Space` (Visual Studio (macOS)), `Ctrl+Space` (Eclipse), `⌃ Space` (Eclipse (macOS)). The editor will show you all configuration properties available for this group.

![Complete route name](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_config_completion.png)

Procedure: Rename routes

In IntelliJ IDEA, you can use [rename refactoring](rename-refactorings.html) to rename routes:

1. Place the caret at the route name and press `Shift+F6` (Windows), `⇧ F6` (macOS), `⇧ F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ R` (macOS System Shortcuts), `Shift+F6` (XWin), `Shift+F6` (GNOME), `Shift+F6` (KDE), `Shift+F6` (Emacs), `Shift+F6` (Sublime Text), `⇧ F6` (Sublime Text (macOS)), `Ctrl+R` (NetBeans), `Ctrl+R, R` (Visual Studio), `⌘ R, R` (Visual Studio (macOS)), `Alt+Shift+R` (Eclipse), `⇧ F6` (Eclipse (macOS)).

2. Specify a new route name and click Refactor.

![Rename route](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_route_rename.png)

Procedure: Extract an application module

To extract code placed inside [embeddedServer](https://ktor.io/docs/create-server.html) to a separate application module, follow the steps below:

1. Place the caret at the `embeddedServer` function call and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)).

2. Choose Extract Application module from the current embeddedServer block and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

3. In the invoked dialog, specify a module name and click Extract. IntelliJ IDEA creates an extension function on the `Application` class and passes a reference to this function as the `module` parameter, for example:

Before:

```KOTLIN
fun main() {
    embeddedServer(Netty, port = 8080) {
        routing {
            get("/") {
                call.respondText("Hello, world!")
            }
        }
    }.start(wait = true)
}
```

After:

```KOTLIN
fun main() {
    embeddedServer(Netty, port = 8080, module = Application::module).start(wait = true)
}

fun Application.module() {
    routing {
        get("/") {
            call.respondText("Hello, world!")
        }
    }
}
```

## OpenAPI

An OpenAPI Specification (OAS) is a description format for REST APIs. The Ktor plugin provides the ability to generate OpenAPI documentation for server-side Ktor applications. The plugin generates [paths](https://swagger.io/docs/specification/paths-and-operations/) for all application endpoints defined using both [string path patterns](https://ktor.io/docs/routing-in-ktor.html#match_url) or [type-safe](https://ktor.io/docs/type-safe-routing.html) routes. For generating better OpenAPI docs, the plugin analyzes the code of endpoints in a server application, for example:

* The [path](https://ktor.io/docs/requests.html#path_parameters) and [query](https://ktor.io/docs/requests.html#query_parameters) request parameters are used to generate [parameters](https://swagger.io/docs/specification/describing-parameters/) taking into account parameter types.

* The response [status](https://ktor.io/docs/responses.html#status), [content type](https://ktor.io/docs/responses.html#content-type), and [headers](https://ktor.io/docs/responses.html#headers) are used to describe [responses](https://swagger.io/docs/specification/describing-responses/).

* [Response body](https://ktor.io/docs/responses.html#payload) handlers are used to generate the OpenAPI schema and, if possible, the examples. For [object responses](https://ktor.io/docs/serialization.html), the plugin generates corresponding definitions in the [components](https://swagger.io/docs/specification/components/) section.

* Documentation comments for a specific route are used as endpoint description s.

Procedure: Generate an OpenAPI specification

To generate an OpenAPI specification for a Ktor application, follow the steps below:

1. Place the caret at the [embeddedServer](https://ktor.io/docs/create-server.html#embedded-server) function call and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)).

2. Select Generate OpenAPI documentation for current module from the popup and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

![Generate OpenAPI documentation](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_generate_openapi_intention.png)

> **Tip:**
> As an alternative, press `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)), start typing Generate OpenAPI documentation, choose the corresponding action, and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

3. Wait until IntelliJ IDEA will generate an OpenAPI specification in application resources by the following path: `resources/openapi/documentation.yaml`.

![OpenAPI documentation](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_openapi.png)

> **Tip:**
> Note that IntelliJ IDEA can update OpenAPI specification automatically on reimporting the existing Ktor project. You can enable this capability on the `Settings | Languages & Frameworks | Ktor` page.

Procedure: Preview OpenAPI and test your application

You can preview an OpenAPI specification using the integrated Swagger UI as described in [Preview an OpenAPI specification](openapi.html#preview-api). The generated Swagger UI can be used to test your application's endpoints as follows:

1. [Run the application](#run_ktor_app).

2. Expand the desired endpoint in the preview and make a request.

> **Tip:**
> To make sure your API works nicely with Swagger UI, you need to set up a policy for Cross-Origin Resource Sharing using the [CORS](https://ktor.io/docs/cors.html#hosts) plugin.

## Test endpoints in the HTTP editor

IntelliJ IDEA allows you to test HTTP and WebSocket endpoints using the [HTTP client in code editor](http-client-in-product-code-editor.html):

Procedure:

1. Place the caret at the desired path, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)), and choose Generate request in HTTP Client.

![Generate request](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_generate_request.png)

2. In the opened file, adjust request parameters.

![Adjust request parameters](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_http_client.png)

3. Click ![The Run button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.execute.svg) in the gutter to make a request.

![Run request](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_http_client_result.png)

## Migrate projects

Procedure: Migrate a project

In IntelliJ IDEA, you can migrate your Ktor project to the latest version in one of the following ways:

* When opening a project that uses a previous Ktor version, IntelliJ IDEA suggests you migrate this project or a specific module to the latest version.

![Migrate project popup](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ktor_idea_migrate_popup.png)

You can migrate a project/module or click Actions to [configure a migration level](#migration-level) or cancel migration and disable this popup.

* Press `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)), find the Migrate Ktor to Latest Version action, and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

Procedure: Configure a migration level

* To configure a migration level or disable migrations at all, use a corresponding option on the `Settings | Languages & Frameworks | Ktor` page.

