Lantern
Configuration (Local)
Web Configuration
Before starting to use Lantern, you will need to build a configuration file. The web configuration tool is the easiest way to generate one.
When running Lantern without a configuration file, it will prompt you to visit an URL to use the configuration tool. This tool will help you quickly start running Lantern, and includes some tests to check if it is running correctly. You can also open it directly at configurator.fluxrpc.com .
For Docker installations, the web configuration tool runs locally and is accessible at http://localhost:8080 .
For more information, see the Web Configuration Tool section.
Manual Configuration
If you prefer to generate your own configuration file, you may do so using JSON format. Any entries not mentioned here should not be modified from their default values. The configuration file includes the following settings:
maximum_diskint (gigabytes)Maximum disk space Lantern is permitted to use. It will exceed this limit, but will raise a warning.
maximum_ramint (gigabytes)Maximum memory Lantern is permitted to use. It will exceed this limit, but will raise a warning.
locationstring (path)Path to store data files. Can be on separate drive. Recommend SSD or NVME. Default is "./data/".
cache_requestsbooleanWhether to cache accounts requested at runtime. Set false for programs only.
lantern_portstringLocal port Lantern responds to requests at. Defaults to 8080.
grpc_portint (port)Local port Lantern will serve Yellowstone gRPC on. Note that Lantern can only stream account state updates, not transactions!
modestring"normal" or "memory". Memory mode stores all cached data in RAM for max performance.
changed_since_slotint (Slot)If set, Lantern will only fetch and cache accounts that have been changed since the chosen slot. This applies to all programs Lantern is configured to cache.
This is useful (for example) if you want to locally cache one or more large and active programs like Pumpfun, but primarily care about accounts that have been active in the last couple of weeks. Lantern will not pick up updates to older accounts, but will begin caching any newly created accounts owned by the selected program(s).
If you enable cache_requests=True, Lantern will additionally begin caching any accounts you request via getAccountInfo or getMultipleAccounts. These additional accounts will remain up-to-date.
max_concurrentintBy default, Lantern will fetch up to 3 of the programs it will cache in parallel.
You can change this behavior by setting it to a different number here. For example, if you set it to 1, Lantern will fetch only one program from FluxRPC at a time.
maximum_ram_cacheint (MB)By default, Lantern will store frequently requested accounts in memory to respond faster. This cache is always kept up-to-date. The default value is 200 megabytes.
If you wish, you can set Lantern to use more or less memory for this cache.
rpc_urlstring (URL)This is the RPC server that Lantern will connect to. Presently, only "https://eu.fluxrpc.com", "https://us.fluxrpc.com" and "https://eu.fogo.fluxrpc.com" are valid.
quic_urlstring (IP address)Changing this value is not recommended.
It sets the server Lantern receives account updates from. Check https://configurator.fluxrpc.com/ with your RPC selected for the correct value.
Programs and Filters
The programs section defines which programs Lantern will cache. You can specify any number of programs using their base58 public key.
Certain programs may not work (System, Token programs) and must be handled with runtime caching.
View Example Configurations
We have several example configuration files to help you get started quickly.
View Example Config Files