I created the keystore with Android Studio.
Then i configured the capacitor.config.ts as follows:
android: {
buildOptions: {
releaseType: 'APK',
keystorePath: '/home/username/CustomFolder/myCustomName.jks',
keystorePassword: 'verysecret',
keystoreAlias: 'custom_alias',
keystoreAliasPassword: 'alsosecret'
}
}