-
Notifications
You must be signed in to change notification settings - Fork 0
Cache
SirBerg edited this page Apr 18, 2026
·
7 revisions
To get started using the Iglu cache, go ahead and download the docker. Here's a sample docker compose:
todoYou'll also need to configure your cache. This is done through a config.toml.
You can copy the example.config.toml from here:
For your reference here are all the config keys with all possible values:
[database]
database_type = 'sqlite' # or 'postgres'
database_file_location = './out.db' #Required if database_type is set to sqlite, should be a persistent file that you have on a volume or mount in your container
[server]
hostname = 'https://example.com' # The base url of your server
hashing_secret = 'something_secure' # A baseline for our hashing, set this to a secure, randomly generated string
[storage]
storage_type = 'fs' # At the moment we only support filesystem storage but in the future we are going to implement s3 as another storage backend
binary_storage_directory = '/tmp/iglu' # This is where the binaries are actually stored
[tenants]
create_tenants_from_config = true # Set this to false if you do not want your config to define tenants (your caches)
# You may set infinite amounts of caches here, just copy and paste it and use the [[tenants.definitions]] for your other caches as well
[[tenants.definitions]]
github_username = "unknown_user" # Set to your Github Username, as far as we can tell this field ist largely unused by cachix or the nix clients
is_public = true # Set to false do deny access from any IP, set to false to allow access from any IP. If you have set it to false you will need to manually allow requests through Access Rules
name = '<name_of_tenant>' # The name of your tenant. For example if you have set this to 'example' your cache url would be: '<cache_baseurl>/example' This value must be unique accross all tenants
preferred_compression_method = 'zstd' # or xz
priority = 1 # Defines in which order your caches will be hit, for reference cache.nixos.org has a priority of 40 which means anything lower than 40 would be hit before cache.nixos.org and anything above 40 would be hit after
api_key_id = 'generated' # Or an ID of an actual Api key. If set to generated you will get a generated api key back. THIS WILL ONLY BE DISPLAYED ONCE!
# Only change options in the logger if you know what you're doing. The default values should be fine for most people
[logger]
logging_format = 'pretty' # or 'json'
logging_prefix = 'cache' # any string you want
logging_prefix_color = 'magenta' # or one of the supported colors
log_level = 'debug' # or 'info' 'warn' 'error'