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
Thekora.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
--config flag when starting the server.
Configuration Sections
Thekora.toml file is organized into sections, each with its own set of
options. This guide walks through each section and explains the options
available:
- Kora Core Policies - Core server settings
- Kora Authentication - Authentication settings
- Kora Caching - Redis caching for RPC calls
- Kora Usage Limits - Per-wallet transaction limiting
- Kora Enabled Methods - Kora RPC methods to enable
- Validation Policies - Transaction validation and security
- Token-2022 Extension Blocking - Block risky Token-2022 extensions
- Fee Payer Policy - Restrictions on fee payer wallet
- Price Configuration - Transaction fee pricing models
- Performance Monitoring - Metrics collection and monitoring
- Complete Example - Full production-ready configuration
kora.toml file sections:
Kora Core Policies
The[kora] section configures core server behavior:
| Option | Description | Required | Type |
|---|---|---|---|
rate_limit | Global rate limit (requests per second) across all clients | ✅ | number |
payment_address | Optional 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:
| Option | Description | Required | Type |
|---|---|---|---|
api_key | API key for simple authentication | ❌ | string |
hmac_secret | HMAC secret for signature-based authentication (min 32 chars) | ❌ | string |
max_timestamp_age | Maximum age of an HMAC timestamp in seconds | ❌ (default: 300) | number |
Note:api_keyandhmac_secretset 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:
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable Redis caching for RPC calls | ✅ | boolean |
url | Redis connection URL | ✅ (when enabled) | string |
default_ttl | Default TTL for cached entries in seconds | ✅ | number |
account_ttl | TTL for account data cache in seconds | ✅ | number |
Note: If you include a[kora.cache]section, setenabled,default_ttl, andaccount_ttl. Kora 2.0.5 doesn’t fill in defaults for a partial section: the config fails to load withmissing field default_ttl. Leave the section out to run without caching.
Note: When caching is enabled, Redis must be reachable aturlwhen Kora starts. If it isn’t,kora rpc startexits withFailed 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.
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable per-wallet transaction limiting | ✅ | boolean |
cache_url | Redis connection URL for usage tracking | ✅ (when enabled) | string |
max_transactions | Maximum transactions per wallet (0 = unlimited) | ✅ | number |
fallback_if_unavailable | Allow transactions when a Redis call fails after Kora started | ✅ | boolean |
Note: If you include a[kora.usage_limit]section, setenabled,max_transactions, andfallback_if_unavailable. Kora 2.0.5 has no defaults for a partial section and fails to load the config withmissing field max_transactions. Settingmax_transactionsto 0 allows unlimited transactions.
Note: When usage limiting is enabled, Redis must be reachable atcache_urlwhen Kora starts, even withfallback_if_unavailable = true. Otherwisekora rpc startexits withUsage limiter initialization failed: ... Connection refused. The fallback only covers Redis errors after startup: withtrue, Kora allows the transaction; withfalse, 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:
| Option | Method Description | Required | Type |
|---|---|---|---|
liveness | Health check (liveness method, GET /liveness) | ✅ | boolean |
estimate_transaction_fee | Estimate the fee for a transaction | ✅ | boolean |
get_supported_tokens | List accepted tokens | ✅ | boolean |
sign_transaction | Sign a transaction without sending it to the network | ✅ | boolean |
sign_and_send_transaction | Sign a transaction and send it to the network | ✅ | boolean |
transfer_transaction | Handle token transfers | ✅ | boolean |
get_blockhash | Get a recent blockhash | ✅ | boolean |
get_config | Return the Kora server config | ✅ | boolean |
get_payer_signer | Return the next fee payer and payment address | ✅ | boolean |
Note: if this section is included in yourkora.tomlfile, all methods must explicitly be set totrueorfalse.
Validation Policies
The[validation] section defines Solana-related security rules and transaction
limits:
| Option | Description | Required | Type |
|---|---|---|---|
max_allowed_lamports | Setting a maximum number of lamports per transaction limits the Kora node’s exposure to a single transaction. | ✅ | number |
max_signatures | Solana 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_source | Oracle 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_transactions | Allow durable nonce transactions. See Security Considerations below. | ❌ (default: false) | boolean |
allowed_programs | Solana programs that transactions can interact with | ✅ | Array of b58-encoded string |
allowed_tokens | Token mints that can be used in transactions | ✅ | Array of b58-encoded string |
allowed_spl_paid_tokens | SPL tokens accepted as payment for transaction fees | ✅ | Array of b58-encoded string |
disallowed_accounts | Accounts 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 whitelistedallowed_programs,allowed_tokens,allowed_spl_paid_tokensfor 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
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 istoken_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 inconfig validatenames[validation.token2022]; usetoken_2022anyway.token2022is accepted as an alias only fromv2.2.0-beta.8. RungetConfigand checkvalidation_config.token_2022to confirm which extensions your node blocks. If you include the section, set both arrays (either can be empty).
Available Mint Extensions
| Extension Name | Description |
|---|---|
confidential_transfer_mint | Confidential Balances configuration for the mint |
confidential_mint_burn | Confidential mint and burn configuration |
transfer_fee_config | Transfer fee configuration |
mint_close_authority | Authority allowed to close the mint |
interest_bearing_config | Interest-bearing token configuration |
non_transferable | Makes tokens non-transferable |
permanent_delegate | Permanent delegate for the mint |
transfer_hook | Custom transfer hook program |
pausable | Pausable token configuration |
Available Account Extensions
| Extension Name | Description |
|---|---|
confidential_transfer_account | Confidential Balances state for the account |
non_transferable_account | Non-transferable token account |
transfer_hook_account | Transfer hook state for the account |
pausable_account | Pausable token account state |
memo_transfer | Requires memo for transfers |
cpi_guard | Prevents certain CPI calls |
immutable_owner | Account owner cannot be changed |
default_account_state | Default 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_extensionsin[validation.token_2022]unless explicitly needed for your use case. - Avoid using payment tokens with the
permanent_delegateextension.
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 forsystem, four forsystem.nonce, and twelve each forspl_tokenandtoken_2022. Kora 2.0.5 has no per-key defaults, so a partial subsection fails to load (for example,allow_transfer = falseon its own givesmissing field allow_assign). A subsection you leave out entirely defaults to allfalse, which is what the Default column below describes.
System Program Instructions
| Option | Description | Default | Type |
|---|---|---|---|
allow_transfer | Allow fee payer as sender in Transfer/TransferWithSeed instructions | false | boolean |
allow_assign | Allow fee payer as authority in Assign/AssignWithSeed instructions | false | boolean |
allow_create_account | Allow fee payer as funding payer in CreateAccount/CreateAccountWithSeed instructions | false | boolean |
allow_allocate | Allow fee payer as account owner in Allocate/AllocateWithSeed instructions | false | boolean |
nonce.allow_initialize | Allow fee payer to be set as nonce authority in InitializeNonceAccount | false | boolean |
nonce.allow_advance | Allow fee payer as authority in AdvanceNonceAccount | false | boolean |
nonce.allow_authorize | Allow fee payer as current authority in AuthorizeNonceAccount | false | boolean |
nonce.allow_withdraw | Allow fee payer as authority in WithdrawNonceAccount | false | boolean |
SPL Token Program Instructions
| Option | Description | Default | Type |
|---|---|---|---|
allow_transfer | Allow fee payer as owner in Transfer/TransferChecked instructions | false | boolean |
allow_burn | Allow fee payer as owner in Burn/BurnChecked instructions | false | boolean |
allow_close_account | Allow fee payer as owner in CloseAccount instructions | false | boolean |
allow_approve | Allow fee payer as owner in Approve/ApproveChecked instructions | false | boolean |
allow_revoke | Allow fee payer as owner in Revoke instructions | false | boolean |
allow_set_authority | Allow fee payer as current authority in SetAuthority instructions | false | boolean |
allow_mint_to | Allow fee payer as mint authority in MintTo/MintToChecked instructions | false | boolean |
allow_initialize_mint | Allow fee payer as mint authority in InitializeMint/InitializeMint2 instructions | false | boolean |
allow_initialize_account | Allow fee payer as owner in InitializeAccount/InitializeAccount3 instructions | false | boolean |
allow_initialize_multisig | Allow fee payer as signer in InitializeMultisig/InitializeMultisig2 instructions | false | boolean |
allow_freeze_account | Allow fee payer as freeze authority in FreezeAccount instructions | false | boolean |
allow_thaw_account | Allow fee payer as freeze authority in ThawAccount instructions | false | boolean |
[validation.fee_payer_policy.token_2022]
section).
Security Considerations
SECURITY WARNING: For security reasons, it is recommended to set all of these tofalse (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
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)
| Option | Description | Required | Type |
|---|---|---|---|
type | Pricing model to use | ✅ | “margin”, “fixed”, or “free” |
margin | Margin percentage to add to network fees | (when type is “margin”) | number |
amount | Fixed amount to charge in token’s base units | (when type is “fixed”) | number |
token | Token mint to charge in | (when type is “fixed”) | b58-encoded string |
strict | When 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
-
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: -
Enable Authentication - Use authentication to prevent abuse:
-
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 authorityallow_set_authority: Could transfer control of critical accounts to attackersallow_transfer: Enables direct drainage of fee payer token balancesallow_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.
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable metrics collection | ✅ | boolean |
endpoint | Custom metrics endpoint path | ✅ | string |
port | Metrics port: the RPC port to serve metrics there, or a separate port | ✅ | number |
scrape_interval | Frequency 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:
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable fee payer balance tracking | ✅ | boolean |
expiry_seconds | Background tracking interval in seconds | ✅ | number |
signer_balance_lamports Prometheus gauge. This helps with
capacity planning and low-balance alerting.
Note: If→ Kora Monitoring Reference Guideportequals the RPC server port (8080 by default), Kora serves{endpoint}on the RPC server and logsMetrics endpoint enabled at /metrics on RPC server. Any other port starts a separate metrics listener athttp://localhost:{port}{endpoint}, and the RPC port no longer answers{endpoint}. A separate port lets you keep metrics off the public RPC port.
Complete Example
Here’s a production-ready configuration with security best practices. It enables Redis caching and usage limits, so Redis must be running atredis://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: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 yourkora.toml file, you can start the Kora server:
--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:
MY_SIGNER_PRIVATE_KEY environment
variable. Then you can start your server with:
Best Practices
- Start Restrictive: Begin with tight limits and gradually expand
- Monitor Usage: Track which programs and tokens are actually used
- Regular Updates: Review and update blocklists and limits
- Test Changes: Validate configuration changes in staging first
- Versioning: Keep a changelog of your configuration changes
Need Help?
- Check Authentication Guide for auth setup
- Check Signers Guide for signer configuration
- Check Operator Guide for more information on how to run a Kora node
- Visit Solana Stack Exchange with the
koratag - Report issues on GitHub