Skip to content
Using Kora v2.2.0-beta? See Beta Configuration for new options: Jito bundles, Lighthouse protection, reCAPTCHA, and usage limits.
Your Kora node will be signing transactions for your users, so it is important to configure it to only sign transactions that meet your business requirements. Kora gives you a lot of flexibility in how you configure your node, but it is important to understand the implications of your configuration. kora.toml is the control center for your Kora configuration. This document provides a comprehensive reference for configuring your Kora paymaster node through the kora.toml configuration file.

​Overview

The kora.toml file controls all aspects of your Kora node’s behavior including:
  • Rate limiting and authentication
  • RPC method availability
  • Transaction validation rules
  • Fee pricing models
  • Security policies
  • Payment address configuration
  • Performance monitoring
Your configuration file should be placed in your deployment directory or specified via the --config flag when starting the server.

​Configuration Sections

The kora.toml file is organized into sections, each with its own set of options. This guide walks through each section and explains the options available: Sample kora.toml file sections:

​Kora Core Policies

The [kora] section configures core server behavior:
OptionDescriptionRequiredType
rate_limitGlobal rate limit (requests per second) across all clients✅number
payment_addressOptional payment address to receive payment tokens (defaults to signer address(es) if not specified)❌b58-encoded string

​Kora Authentication

The [kora.auth] section configures authentication for the Kora server:
OptionDescriptionRequiredType
api_keyAPI key for simple authentication❌string
hmac_secretHMAC secret for signature-based authentication (min 32 chars)❌string
max_timestamp_ageMaximum age of an HMAC timestamp in seconds❌ (default: 300)number
Note: api_key and hmac_secret set a global authentication policy for all clients. For detailed authentication setup, see Authentication Guide.

​Kora Caching (optional)

The [kora.cache] section configures Redis-based caching for Solana RPC calls. This can significantly improve performance by reducing redundant account data fetches:
OptionDescriptionRequiredType
enabledEnable Redis caching for RPC calls✅boolean
urlRedis connection URL✅ (when enabled)string
default_ttlDefault TTL for cached entries in seconds✅number
account_ttlTTL for account data cache in seconds✅number
Note: If you include a [kora.cache] section, set enabled, default_ttl, and account_ttl. Kora 2.0.5 doesn’t fill in defaults for a partial section: the config fails to load with missing field default_ttl. Leave the section out to run without caching.
Note: When caching is enabled, Redis must be reachable at url when Kora starts. If it isn’t, kora rpc start exits with Failed to initialize cache: ... Connection refused. After startup, a failed cache read is treated as a cache miss and Kora fetches the account from the Solana RPC directly.

​Kora Usage Limits (optional)

The [kora.usage_limit] section configures per-wallet transaction limiting to prevent abuse and ensure fair usage across your users. This could also be used to create rewards programs to subsidize users’ transaction fees up to a certain limit. Important: Currently, the only form of usage limiting supported by Kora is a permanent limit. Once a wallet reaches its transaction limit, it cannot be reset and the user will no longer be able to submit any more transactions using that same wallet. This limit persists until manually cleared from Redis or the Redis data is reset. Note: Usage limits are stored in Redis. If enabled = true but cache_url is not set, Kora logs Usage limiting enabled but no cache_url configured - disabled and enforces no limits.
OptionDescriptionRequiredType
enabledEnable per-wallet transaction limiting✅boolean
cache_urlRedis connection URL for usage tracking✅ (when enabled)string
max_transactionsMaximum transactions per wallet (0 = unlimited)✅number
fallback_if_unavailableAllow transactions when a Redis call fails after Kora started✅boolean
Note: If you include a [kora.usage_limit] section, set enabled, max_transactions, and fallback_if_unavailable. Kora 2.0.5 has no defaults for a partial section and fails to load the config with missing field max_transactions. Setting max_transactions to 0 allows unlimited transactions.
Note: When usage limiting is enabled, Redis must be reachable at cache_url when Kora starts, even with fallback_if_unavailable = true. Otherwise kora rpc start exits with Usage limiter initialization failed: ... Connection refused. The fallback only covers Redis errors after startup: with true, Kora allows the transaction; with false, it rejects it.

​Kora Enabled Methods (optional)

The [kora.enabled_methods] section controls which RPC methods are enabled. This section is optional and by default, all methods are enabled. Each method can be enabled or disabled by setting the value to true or false:
OptionMethod DescriptionRequiredType
livenessHealth check (liveness method, GET /liveness)✅boolean
estimate_transaction_feeEstimate the fee for a transaction✅boolean
get_supported_tokensList accepted tokens✅boolean
sign_transactionSign a transaction without sending it to the network✅boolean
sign_and_send_transactionSign a transaction and send it to the network✅boolean
transfer_transactionHandle token transfers✅boolean
get_blockhashGet a recent blockhash✅boolean
get_configReturn the Kora server config✅boolean
get_payer_signerReturn the next fee payer and payment address✅boolean
Note: if this section is included in your kora.toml file, all methods must explicitly be set to true or false.

​Validation Policies

The [validation] section defines Solana-related security rules and transaction limits:
OptionDescriptionRequiredType
max_allowed_lamportsSetting a maximum number of lamports per transaction limits the Kora node’s exposure to a single transaction.✅number
max_signaturesSolana base fees are a function of the number of signatures in a transaction, so setting a maximum number of signatures per transaction is a good way to prevent users from spending too much SOL on a single transaction.✅number
price_sourceOracle for token price data. Note: When set to "Jupiter", the JUPITER_API_KEY environment variable is required. The server will fail to start without it.✅“Jupiter” or “Mock”
allow_durable_transactionsAllow durable nonce transactions. See Security Considerations below.❌ (default: false)boolean
allowed_programsSolana programs that transactions can interact with✅Array of b58-encoded string
allowed_tokensToken mints that can be used in transactions✅Array of b58-encoded string
allowed_spl_paid_tokensSPL tokens accepted as payment for transaction fees✅Array of b58-encoded string
disallowed_accountsAccounts that are explicitly blocked from transactions✅Array of b58-encoded string
Note: Empty arrays are allowed, but you will need to specify at least one whitelisted allowed_programs, allowed_tokens, allowed_spl_paid_tokens for the Kora node to be able to process transactions. You need to specify the System Program or Token Program for the Kora node to be able to process transfers. To enable common instruction types (e.g., Compute Budget, Address Lookup Table), you need to specify the Compute Budget Program or Address Lookup Table Program, etc.

​Durable Transaction Security

SECURITY WARNING: Durable nonce transactions allow signed transactions to be held indefinitely and submitted later. This could be used as an economic attack vector where someone could obtain a signed transaction and wait to submit it until market conditions are favorable to them (e.g., when SOL’s value has dropped or the payment token’s value has increased). By default, allow_durable_transactions is set to false to block all durable nonce transactions. Only enable this if your application specifically requires durable transactions and you understand the risks. If you must enable durable transactions, consider:
  • Using authentication to restrict API access
  • Implementing additional offchain validation
  • Monitoring for unusual transaction patterns
  • Monitor and limit signer account balances
  • Rotate signer keys regularly
Learn more about durable nonce transactions in the Solana Docs.

​Token-2022 Extension Blocking

The [validation.token_2022] section allows you to block specific Token-2022 extensions for enhanced security. All extensions are enabled by default. You can block specific extensions by adding them to the blocked_mint_extensions or blocked_account_extensions arrays:
Warning: The section name is token_2022, with an underscore. Kora 2.0.5 silently ignores a [validation.token2022] section: the config still validates, but no extension is blocked. Kora’s own security warning in config validate names [validation.token2022]; use token_2022 anyway. token2022 is accepted as an alias only from v2.2.0-beta.8. Run getConfig and check validation_config.token_2022 to confirm which extensions your node blocks. If you include the section, set both arrays (either can be empty).

​Available Mint Extensions

Extension NameDescription
confidential_transfer_mintConfidential Balances configuration for the mint
confidential_mint_burnConfidential mint and burn configuration
transfer_fee_configTransfer fee configuration
mint_close_authorityAuthority allowed to close the mint
interest_bearing_configInterest-bearing token configuration
non_transferableMakes tokens non-transferable
permanent_delegatePermanent delegate for the mint
transfer_hookCustom transfer hook program
pausablePausable token configuration

​Available Account Extensions

Extension NameDescription
confidential_transfer_accountConfidential Balances state for the account
non_transferable_accountNon-transferable token account
transfer_hook_accountTransfer hook state for the account
pausable_accountPausable token account state
memo_transferRequires memo for transfers
cpi_guardPrevents certain CPI calls
immutable_ownerAccount owner cannot be changed
default_account_stateDefault state for new accounts
Note: Blocking extensions helps prevent interactions with tokens that have complex or potentially risky behaviors. For example, blocking transfer_hook prevents signing transactions for tokens with custom transfer logic.

​Security Considerations

PermanentDelegate Extension - Tokens with this extension allow the delegate to transfer/burn tokens at any time without owner approval. This creates significant risks for the Kora node operator as payment funds can be seized after payment.
  • Consider adding “permanent_delegate” to blocked_mint_extensions in [validation.token_2022] unless explicitly needed for your use case.
  • Avoid using payment tokens with the permanent_delegate extension.

​Fee Payer Policy

The [validation.fee_payer_policy] section provides granular control over what actions your Kora node’s fee payer wallet can perform. The policy is organized by program type (System, SPL Token, Token-2022) and covers all different instruction types. This prevents unexpected behavior from users’ transactions utilizing your Kora node as a signer. For example, if spl_token.allow_transfer is set to false, the Kora node will not sign transactions that include an SPL token transfer where the Kora node’s fee payer is the transfer authority.
Note: Every subsection you include must list all of its keys: four for system, four for system.nonce, and twelve each for spl_token and token_2022. Kora 2.0.5 has no per-key defaults, so a partial subsection fails to load (for example, allow_transfer = false on its own gives missing field allow_assign). A subsection you leave out entirely defaults to all false, which is what the Default column below describes.

​System Program Instructions

OptionDescriptionDefaultType
allow_transferAllow fee payer as sender in Transfer/TransferWithSeed instructionsfalseboolean
allow_assignAllow fee payer as authority in Assign/AssignWithSeed instructionsfalseboolean
allow_create_accountAllow fee payer as funding payer in CreateAccount/CreateAccountWithSeed instructionsfalseboolean
allow_allocateAllow fee payer as account owner in Allocate/AllocateWithSeed instructionsfalseboolean
nonce.allow_initializeAllow fee payer to be set as nonce authority in InitializeNonceAccountfalseboolean
nonce.allow_advanceAllow fee payer as authority in AdvanceNonceAccountfalseboolean
nonce.allow_authorizeAllow fee payer as current authority in AuthorizeNonceAccountfalseboolean
nonce.allow_withdrawAllow fee payer as authority in WithdrawNonceAccountfalseboolean

​SPL Token Program Instructions

OptionDescriptionDefaultType
allow_transferAllow fee payer as owner in Transfer/TransferChecked instructionsfalseboolean
allow_burnAllow fee payer as owner in Burn/BurnChecked instructionsfalseboolean
allow_close_accountAllow fee payer as owner in CloseAccount instructionsfalseboolean
allow_approveAllow fee payer as owner in Approve/ApproveChecked instructionsfalseboolean
allow_revokeAllow fee payer as owner in Revoke instructionsfalseboolean
allow_set_authorityAllow fee payer as current authority in SetAuthority instructionsfalseboolean
allow_mint_toAllow fee payer as mint authority in MintTo/MintToChecked instructionsfalseboolean
allow_initialize_mintAllow fee payer as mint authority in InitializeMint/InitializeMint2 instructionsfalseboolean
allow_initialize_accountAllow fee payer as owner in InitializeAccount/InitializeAccount3 instructionsfalseboolean
allow_initialize_multisigAllow fee payer as signer in InitializeMultisig/InitializeMultisig2 instructionsfalseboolean
allow_freeze_accountAllow fee payer as freeze authority in FreezeAccount instructionsfalseboolean
allow_thaw_accountAllow fee payer as freeze authority in ThawAccount instructionsfalseboolean
Token-2022 supports the same instruction set as SPL Token with identical configuration options (under the [validation.fee_payer_policy.token_2022] section).

​Security Considerations

SECURITY WARNING: For security reasons, it is recommended to set all of these to false (default) and only enable as needed. This will prevent unwanted behavior such as users draining your fee payer account or burning tokens from your fee payer account. This prevents:
  • Account Drainage: Users transferring SOL or tokens from your fee payer account
  • Authority Takeover: Users changing authorities on accounts owned by your fee payer
  • Unauthorized Minting: Users minting tokens if your fee payer has mint authority
  • Account Manipulation: Users freezing, closing, or modifying accounts controlled by your fee payer
Best Practice: Start with all permissions disabled and enable only the minimum set needed for your specific use case.

​Price Configuration (optional)

The [validation.price] section defines how transaction fees are calculated. Three pricing models are available:
  • Margin Pricing (default) - Add a percentage margin on top of actual network fees (default margin is 0.0)
  • Fixed Pricing - Charge a fixed amount in a specific token regardless of network fees
  • Free Pricing - Sponsor all transaction fees (no charge to users)
OptionDescriptionRequiredType
typePricing model to use✅“margin”, “fixed”, or “free”
marginMargin percentage to add to network fees(when type is “margin”)number
amountFixed amount to charge in token’s base units(when type is “fixed”)number
tokenToken mint to charge in(when type is “fixed”)b58-encoded string
strictWhen true, reject transactions where the fee payer outflow exceeds the fixed price. When false, outflow is not checked against the price(when type is “fixed”)boolean

​Margin Pricing

Add a percentage margin on top of actual network fees:

​Fixed Pricing

SECURITY WARNING: Fixed pricing does NOT include fee payer outflow in the charged amount. This can allow users to drain your fee payer account if not properly configured. Charge a fixed amount in a specific token regardless of network fees:
strict is required: kora config validate fails with missing field strict if it is omitted. The token must also be listed in allowed_spl_paid_tokens (and therefore allowed_tokens), otherwise validation fails with Token address for fixed price is not in allowed spl paid tokens.

​Free Transactions

Sponsor all transaction fees (no charge to users):

​Security Measures When Using Fixed/Free Pricing

  1. Disable All Transfer and Monetary Operations - Prevent fee payer from being used as source in transfers. Each subsection must list all of its keys, so this block sets every key to false:
  2. Enable Authentication - Use authentication to prevent abuse:
  3. Set Conservative Limits - Minimize exposure:
WARNING: Particularly dangerous operations when using fixed/free pricing:
  • allow_mint_to: Could allow unlimited token creation if fee payer has mint authority
  • allow_set_authority: Could transfer control of critical accounts to attackers
  • allow_transfer: Enables direct drainage of fee payer token balances
  • allow_close_account: Returns rent to attacker-controlled accounts

​Performance Monitoring (optional)

The [metrics] section configures metrics collection and monitoring. This section is optional and by default, metrics are disabled.
OptionDescriptionRequiredType
enabledEnable metrics collection✅boolean
endpointCustom metrics endpoint path✅string
portMetrics port: the RPC port to serve metrics there, or a separate port✅number
scrape_intervalFrequency of Prometheus scrape (seconds)✅number

​Fee Payer Balance Tracking

The [metrics.fee_payer_balance] section configures automatic monitoring of your fee payer’s SOL balance. Leave it out to keep balance tracking off; if you include it, set both keys:
OptionDescriptionRequiredType
enabledEnable fee payer balance tracking✅boolean
expiry_secondsBackground tracking interval in seconds✅number
When enabled, Kora automatically tracks your fee payer’s SOL balance and exposes it via the signer_balance_lamports Prometheus gauge. This helps with capacity planning and low-balance alerting.
Note: If port equals the RPC server port (8080 by default), Kora serves {endpoint} on the RPC server and logs Metrics endpoint enabled at /metrics on RPC server. Any other port starts a separate metrics listener at http://localhost:{port}{endpoint}, and the RPC port no longer answers {endpoint}. A separate port lets you keep metrics off the public RPC port.
→ Kora Monitoring Reference Guide

​Complete Example

Here’s a production-ready configuration with security best practices. It enables Redis caching and usage limits, so Redis must be running at redis://localhost:6379 before you start Kora, and price_source = "Jupiter" requires the JUPITER_API_KEY environment variable:

​Configuration Validation

Kora validates your configuration on startup. If you would like to validate your configuration without starting the server, you can use the config validation command:
You can also run the validate-with-rpc command to validate your configuration with the RPC server (this validation check is a little bit slower but does more thorough account checks)

​Starting the Server

Once you have configured your kora.toml file, you can start the Kora server:
The --no-load-signer flag will initialize the server without loading any signers. This is useful for testing your configuration. In order to load signers, you will need to configure the signers.toml file. A minimum configuration with a single signer would look like this:
This will load a single signer from the MY_SIGNER_PRIVATE_KEY environment variable. Then you can start your server with:
For more information and advanced signer configuration, see the Signers Guide.

​Best Practices

  1. Start Restrictive: Begin with tight limits and gradually expand
  2. Monitor Usage: Track which programs and tokens are actually used
  3. Regular Updates: Review and update blocklists and limits
  4. Test Changes: Validate configuration changes in staging first
  5. Versioning: Keep a changelog of your configuration changes

​Need Help?