Skip to main content
GLAM CLI uses a configuration file to manage your environment settings. By default, this file is located at ~/.config/glam/config.json.

Configuration File Location

The CLI looks for the configuration file in the following locations:
  • Default: ~/.config/glam/config.json
  • Docker: /workspace/config.json (when DOCKER environment variable is set)
  • Custom: Specify with the -C, --config <path> flag
You can override the default config location using the --config flag:
glam-cli --config /path/to/config.json vault list

Configuration Options

Here’s the complete configuration structure with all available options:
config.json
{
  "cluster": "mainnet-beta",
  "json_rpc_url": "https://api.mainnet-beta.solana.com",
  "tx_rpc_url": "https://tx-rpc.mainnet-beta.solana.com",
  "websocket_disabled": false,
  "keypair_path": "/path/to/your/keypair.json",
  "glam_staging": false,
  "priority_fee": {
    "micro_lamports": 10000,
    "level": "high",
    "helius_api_key": "your-helius-api-key"
  },
  "glam_state": "YourActiveVaultStatePubkey",
  "jupiter_api_key": "your-jupiter-api-key"
}

Core Settings

cluster

cluster
string
required
The Solana cluster to connect to.Options: mainnet-beta, devnet, testnet, localnetDefault: mainnet-beta
"cluster": "mainnet-beta"

json_rpc_url

json_rpc_url
string
required
The primary RPC endpoint URL for reading blockchain data.Examples:
  • Public: https://api.mainnet-beta.solana.com
  • Helius: https://mainnet.helius-rpc.com/?api-key=<your-key>
  • QuickNode: https://your-endpoint.solana-mainnet.quiknode.pro/<your-key>
"json_rpc_url": "https://api.mainnet-beta.solana.com"
Using public RPC endpoints may result in rate limiting. For production use, consider using a dedicated RPC provider like Helius or QuickNode.

keypair_path

keypair_path
string
required
Absolute path to your Solana wallet keypair JSON file.
"keypair_path": "/home/user/.config/solana/id.json"
This wallet will be used to sign all transactions and must have sufficient SOL for transaction fees.

Optional Settings

tx_rpc_url

tx_rpc_url
string
A separate RPC endpoint specifically for sending transactions. Useful if you want to use a different endpoint optimized for transaction submission.
"tx_rpc_url": "https://tx-rpc.mainnet-beta.solana.com"
If not specified, json_rpc_url will be used for both reading and writing.

websocket_disabled

websocket_disabled
boolean
Disable WebSocket connections for transaction confirmation.Default: false
"websocket_disabled": true
Set to true if your RPC provider doesn’t support WebSockets or if you’re behind a firewall that blocks WebSocket connections.

glam_staging

glam_staging
boolean
Enable staging/development mode to use the GLAM staging program instead of production.Default: false
"glam_staging": true
Only enable this for testing purposes. Staging vaults are separate from production vaults.

glam_state

glam_state
string
The public key of your active GLAM vault state account. This vault will be used by default for all commands.
"glam_state": "8xKzG7..."
This is automatically set when you create a vault or use glam-cli vault set <state-pubkey>. You rarely need to set this manually.

Priority Fee Configuration

The priority_fee object controls how priority fees are calculated for transactions:

micro_lamports

priority_fee.micro_lamports
number
Fixed priority fee in micro-lamports (1 lamport = 1,000,000 micro-lamports).
"priority_fee": {
  "micro_lamports": 10000
}
Examples:
  • 1000 = 0.001 lamports = very low priority
  • 10000 = 0.01 lamports = low priority
  • 100000 = 0.1 lamports = medium priority
  • 1000000 = 1 lamport = high priority
If set, this takes precedence over dynamic fee estimation.

level

priority_fee.level
string
Priority level for dynamic fee estimation when using Helius.Options: min, low, medium, high, veryHigh, unsafeMaxDefault: medium
"priority_fee": {
  "level": "high",
  "helius_api_key": "your-api-key"
}
Only used if micro_lamports is not specified and helius_api_key is provided.

helius_api_key

priority_fee.helius_api_key
string
Your Helius API key for dynamic priority fee estimation.
"priority_fee": {
  "helius_api_key": "your-helius-api-key",
  "level": "high"
}
When provided, the CLI will automatically estimate optimal priority fees based on current network conditions.
Get a free Helius API key at helius.dev

API Keys

jupiter_api_key

jupiter_api_key
string
Your Jupiter API key for enhanced swap routing and rate limits.
"jupiter_api_key": "your-jupiter-api-key"
While Jupiter works without an API key, having one provides:
  • Higher rate limits
  • Better route optimization
  • Priority access to new features
Request a Jupiter API key at station.jup.ag

Example Configurations

Minimal Configuration (Devnet)

{
  "cluster": "devnet",
  "json_rpc_url": "https://api.devnet.solana.com",
  "keypair_path": "~/.config/solana/devnet.json"
}

Production Configuration (Mainnet)

{
  "cluster": "mainnet-beta",
  "json_rpc_url": "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY",
  "keypair_path": "/home/user/.config/solana/mainnet.json",
  "priority_fee": {
    "helius_api_key": "YOUR_HELIUS_KEY",
    "level": "high"
  },
  "jupiter_api_key": "YOUR_JUPITER_KEY"
}

Docker Configuration

{
  "cluster": "mainnet-beta",
  "json_rpc_url": "https://api.mainnet-beta.solana.com",
  "keypair_path": "/workspace/keypair.json",
  "websocket_disabled": true,
  "priority_fee": {
    "micro_lamports": 100000
  }
}

Verify Configuration

After setting up your configuration, verify it’s working correctly:
glam-cli env
This displays all current settings:
GLAM Protocol program: GLAMpLuXu78TA4ao3FGZPr86CC7SjH8CPN7rJxSUVZe
Staging: false
Wallet connected: YourWalletPubkey...
RPC endpoint: https://mainnet.helius-rpc.com/?api-key=***
Priority fee: { helius_api_key: '***', level: 'high' }
Jupiter API key: configured
No active GLAM vault configured.

Troubleshooting

Ensure your config file includes all required fields:
  • cluster
  • json_rpc_url
  • keypair_path
Check the error message for which specific field is missing.
Verify the path in keypair_path is correct and the file exists:
ls -la /path/to/your/keypair.json
Use absolute paths rather than relative paths or ~ expansion.
If you’re experiencing connection issues:
  1. Verify the RPC URL is correct and accessible
  2. Check if your RPC provider is experiencing downtime
  3. Try setting websocket_disabled: true if WebSocket connections fail
  4. Consider switching to a different RPC provider
If transactions are failing or timing out:
  1. Increase micro_lamports value (try 100000 or higher)
  2. Use Helius dynamic fee estimation with "level": "high" or "veryHigh"
  3. Check network congestion at solanabeach.io

Build docs developers (and LLMs) love