Andrey Tabakov
11/16/2023, 3:34 PMinstallDist
.
To setup an embedded server .conf
is used. I created a .jks
file and filled a config:
security {
ssl {
keyStore = "./backend/ktor/embedded/resources/keyal.jks"
keyAlias = "keyal"
keyStorePassword = "baaar"
privateKeyPassword = "fooo"
}
}
How to bundle a ktor server with jks
to run it on another computer?suresh
11/17/2023, 5:27 AMval keyStore = buildKeyStore {
certificate("sampleAlias") {
password = "foobar"
domains = listOf("127.0.0.1", "0.0.0.0", "localhost")
}
}
sslConnector(
keyStore = keyStore,...
)
• When server startup create the keystore file (once) and store in $HOME directory. The configure the keystore path as keystore = ${HOME}/keyal.jks
. Here also you can use the buildKeyStore{} builder function to create the keystore file.
Wish ktor allowed resource path in the config file.