Skip to content

Configuration#

Concourse is configured through YAML files. The server reads its configuration from concourse.yaml in the conf/ directory, and the client drivers read connection settings from concourse_client.yaml.

Server Configuration#

Configuration File#

The primary configuration file is concourse.yaml, located at:

1
concourse-server/conf/concourse.yaml

All settings have sensible defaults. You only need to specify values for settings you want to change.

Development Overlays#

For local development, create a concourse.yaml.dev file in the same directory. Settings in the .dev file override those in the base concourse.yaml. The .dev file should be excluded from version control.

Legacy Format

Concourse also supports the older .prefs format (concourse.prefs). YAML files are preferred and take precedence when both exist, with one exception: concourse.prefs.dev takes precedence over concourse.yaml to honor the convention that local development overrides always win. Client configuration (concourse_client.yaml vs concourse_client.prefs) follows the same YAML-wins rule without the dev-overlay exception.

Core Settings#

Network#

Setting Default Description
client_port 1717 Listener port for client connections
http_port 0 (disabled) Listener port for HTTP/S connections. Set to 0 to disable
jmx_port 9010 Listener port for JMX management
shutdown_port (auto) Listener port for shutdown commands, which the server accepts only from its own host
remote_debugger_port 0 (disabled) Listener port for remote debugger
management_port (auto) Listener port for management CLIs, which the server accepts only from its own host

Storage#

Setting Default Description
buffer_directory ~/concourse/buffer Path to write-optimized buffer storage
database_directory ~/concourse/db Path to read-optimized database storage
buffer_page_size 8KB Size of each buffer page
verify_data_integrity_on_read false Check stored data against its checksums on every read from disk

Nested YAML form is also supported:

1
2
3
4
5
6
storage:
  buffer:
    directory: /var/lib/concourse/buffer
    page_size: 8KB
  database:
    directory: /var/lib/concourse/db

A nested setting overrides its top-level counterpart, and Concourse Server logs a warning at startup if the two are set to different values. To set a nested setting with an environment variable, use a double underscore for each level, such as CONCOURSE_STORAGE__BUFFER__DIRECTORY.

Performance Tip

For optimal performance, place the buffer_directory and database_directory on separate disk partitions, ideally on separate physical devices.

Memory#

Setting Default Description
heap_size (auto) JVM heap size allocation

Concourse automatically chooses a heap size based on available system memory:

System Memory Recommended Heap Size
Less than 2GB 1/2 of system memory
2GB to 4GB 1GB
Greater than 4GB 1/4 of system memory, up to 8GB

Avoid Oversizing

Setting the heap too large can cause longer garbage collection pauses and interfere with memory-mapped file performance.

Environment#

Setting Default Description
default_environment default Default environment for connections that do not specify one

Java#

Setting Default Description
java_home (auto) Path to Java installation
force_g1gc false Force G1 garbage collector on JDK 8

Logging#

Setting Default Description
log_level INFO Logging verbosity: ERROR, WARN, INFO, or DEBUG
enable_console_logging false Also print logs to the console

Each log level includes all less verbose levels. Use DEBUG only for diagnosing issues, as it can impact performance.

Security#

Setting Default Description
init_root_username admin Initial administrator username
init_root_password admin Initial administrator password
access_credentials_file {concourse.home}/.access Path to credentials storage

Nested YAML form is also supported:

1
2
3
4
init:
  root:
    username: admin
    password: admin

Change Default Credentials

Always change the default admin password after initial setup.

Data Transport#

The transporter moves data from the write-optimized Buffer to the read-optimized Database in the background. Concourse supports two strategies:

Batch Transporter (Default)#

The batch transporter processes large batches of data per pass and indexes without blocking operations until merge time. This provides higher overall throughput.

1
transporter: batch

Streaming Transporter#

The streaming transporter processes smaller batches more frequently. It provides consistent throughput but may cause performance degradation under high concurrent load.

1
transporter: streaming

Advanced Transport Configuration#

1
2
3
4
transporter:
  type: batch
  num_threads: 2
  passive: false
Setting Default Description
type batch Transport strategy: batch or streaming
num_threads 1 Number of transport threads
passive false Allow other operations to preempt the transporter

Cache Configuration#

Concourse Server caches the data that it reads from disk, so that later reads of the same data come from memory. Every cache in every environment shares one memory budget, which is a share of the maximum Java heap. When cached data fills the budget, Concourse Server keeps the data that it expects to read again, based on how often and how recently it read that data, and evicts the rest.

If the rest of the server runs low on memory, the JVM can also reclaim cached data.

Setting Default Description
storage.cache.heap_share 0.6 Share of the maximum heap, from 0 to 1, that cached data may use (0 = caching off)
1
2
3
storage:
  cache:
    heap_share: 0.6

Spill Configuration#

Concourse Server holds index data in memory while it creates a data file. When the Java heap fills up, “spilling” moves that data to temporary files on disk, so Concourse Server doesn’t run out of memory while it sorts that data and writes it to the data file.

Leave storage.spill.heap_usage_threshold at 0 unless a known workload builds data files that are too large for the heap (e.g., indexing many very long text values). And if such a workload requires it, set the threshold only as low as you observe is necessary.

When spilling is enabled, Concourse Server has to watch every garbage collection event, so indexing has some additional overhead even when a spill never happens. Furthermore, a threshold that is too low causes indexing and reads to take longer, since data is shuffled back and forth between memory and disk.

In general, there is no need to be concerned about high heap usage. Caches intentionally hold much of the heap, and they automatically give it back when the JVM needs the room. So, it is recommended to only enable spilling after observing indexing-related out-of-memory errors and noting actual corresponding heap usage.

Note that storage.cache.heap_share is a share of the maximum heap, not of the usable heap. Under the default collector on Java 8, the usable heap is about three quarters of the maximum, so the default cache budget of 0.6 is about 0.85 of the usable heap. A server whose cache is full spills during an upgrade or a compaction merge until the JVM reclaims cached data.

Setting Default Description
storage.spill.heap_usage_threshold 0 Share of the usable heap (the maximum heap less the Eden space that every garbage collection empties), from 0 to 1, in use after a garbage collection that triggers a spill (0 = disabled outside of upgrades and compaction merges)
storage.spill.use_system_temp_dir false Put the temporary files in the system’s temporary directory instead of the database directory
1
2
3
4
storage:
  spill:
    heap_usage_threshold: 0.8
    use_system_temp_dir: false

A threshold of 0 turns spilling off only outside of upgrades and compaction merges, because an upgrade or a merge always spills while it runs. It spills at 0.8, or at a lower threshold that you set above 0.

If the database directory is short on space while the root filesystem has room, set storage.spill.use_system_temp_dir to true, so that the temporary files go in the system’s temporary directory instead.

The temporary files go in a directory named .spills. When Concourse Server starts, it deletes the files that were left in the database directory. It leaves the system’s temporary directory alone, because other programs can share it.

Compaction Configuration#

Every uncached read, find, and search examines every data file in an environment, and each transport from the Buffer writes a new data file, so the number of files grows with the number of writes. Compaction merges data files in the background by size tier: files that hold a comparable amount of data merge into one larger file, which then joins the next tier, so the number of files grows with the logarithm of the data instead.

A merge pauses reads and writes only for the moment it swaps the merged file in. The files it replaces go to the trash once the merged file is live. A merge builds its result in memory and moves that data to temporary files when the Java heap fills up, so the heap never has to hold the whole result. A crash at any point during a merge leaves every write readable after a restart. Compaction does not remove any revision.

Disk Space

Each merge moves the data files it replaced to the trash, so compaction adds to the disk space that the trash takes up until those files leave it, after one week by default. Lower storage.trash.retention, or run concourse data prune, to get that space back sooner.

Setting Default Description
enable_compaction true Merge data files in the background
compaction.enable (empty) Merge data files in the background; overrides enable_compaction when set
compaction.fan_in 4 Data files in one tier that merge into one file in the next tier
compaction.max_file_size 1GB Largest data file a merge may produce, and never more than a quarter of heap_size; a larger group is not merged
compaction.disk_headroom 1GB Disk space that must remain available after a merge writes its result
compaction.interval 2 Seconds between compaction shifts, each of which attempts one merge
compaction.max_backlog 4 Buffer pages that may wait for transport while a scheduled shift runs; scheduled compaction pauses above this
compaction.full_interval 604800 Seconds between full compactions, each of which performs every eligible merge
1
2
3
4
5
6
7
8
enable_compaction: true
compaction:
  fan_in: 4
  max_file_size: 1GB
  disk_headroom: 1GB
  interval: 2
  max_backlog: 4
  full_interval: 604800

compaction.enable overrides enable_compaction, and Concourse Server logs a warning at startup if the two are set to different values.

Scheduled compaction yields to transport. While more than compaction.max_backlog Buffer pages wait for transport, the transporter is behind, so scheduled shifts are skipped until it catches up. A full compaction, including one started by concourse data compact, runs regardless.

concourse data compact runs a full compaction on demand and fails with a clear message when compaction is off. concourse monitor compaction reports the merges performed, the files retired, the bytes read and written, the time per shift, the last failure, and the number of files in each tier.

Trash#

Concourse Server doesn’t delete a data file as soon as it retires it, so that no data is lost if a decision to remove a data file turns out to be wrong. Instead, whenever it retires a data file, it moves the file to the trash. For example, Concourse Server retires a data file when another data file already holds all of its data, such as a copy that a crash left behind. It also does so when a repair, a reindex, an upgrade or compaction replaces a data file with a new copy.

By default, a data file stays in the trash for one week, and then Concourse Server deletes it. concourse data prune empties the trash of an environment at any time. To keep data files for a different number of hours, set storage.trash.retention. To keep them until you run concourse data prune, set it to a negative number. And if you don’t want to keep anything, set it to 0, so that each data file is deleted as soon as it is retired and the trash is emptied when Concourse Server starts.

Setting Default Description
storage.trash.retention 168 How long, in hours, a data file stays in the trash before Concourse Server deletes it. The data files that one operation retires, such as a repair or an upgrade, stay until the last of them has been in the trash this long. Concourse Server checks the trash once an hour while it runs. 0 deletes each data file right away instead, and empties the trash when Concourse Server starts. A negative value keeps data files until concourse data prune
1
2
3
storage:
  trash:
    retention: 720 # 30 days

Disk Space for Upgrades

Unless the retention is 0, an upgrade that rewrites every data file keeps a copy of each original in the trash. So it needs as much free disk space as the data files already take up. The upgrade checks for that space before it rewrites anything, and it stops if the disk doesn’t have room. In that case, free up disk space, or set storage.trash.retention to 0 for the upgrade.

Transaction Configuration#

transactions.recover_interrupted_commits controls whether Concourse Server tries to finish an interrupted transaction commit when it restarts.

A commit is interrupted when Concourse Server crashes while it makes the transaction’s writes durable. By default, such a commit may be lost. That does not violate any ACID guarantee, because the client never saw the commit succeed. When this setting is true, Concourse Server does extra work so that more such commits survive a restart.

This setting has significant overhead and is generally not recommended. When enabled, each transaction that changes data stores a backup of its writes before it applies them, and Concourse Server replays any backup it finds when it starts. The backup costs an extra file write and disk sync on each commit, so commits are slower. The transaction holds its locks during that sync, so other operations on the same data wait longer.

Enable this only for mission critical transactional data that needs stricter resiliency, and whose transactions don’t often touch the same data.

Setting Default Description
transactions.recover_interrupted_commits false Store a backup of each transaction that changes data before it commits, so that more interrupted commits survive a restart. Has significant overhead and is generally not recommended
1
2
transactions:
  recover_interrupted_commits: true

Search Configuration#

Setting Default Description
max_search_substring_length 40 Maximum substring length indexed for full-text search

Set this to the longest word you expect in search queries. The default of 40 characters accommodates the longest English words.

Await Configuration#

These settings limit how long a single await can wait and how many awaits can wait at the same time.

Setting Default Description
max_await_timeout 60000 Longest timeout, in milliseconds, that an await may request
max_open_awaits 1000 Most awaits the server holds open at once

Each waiting await holds a server thread, so raise max_open_awaits only if the server can spare the threads. When the limit is reached, new awaits fail with an AwaitLimitException until others finish.

Type Coercion#

Different records can hold effectively equal values of different types, such as 18 in one record and 18.0 in another. A read across a key (e.g., browse) returns one representative value for them and maps it to all of those records.

Setting Default Description
enable_canonical_type_coercion false Return each value of a read across a key in its canonical form

By default, the representative value has one of the types it was written with, but the representative type that is chosen is undefined and may change across calls depending upon the total state of the data under that key. When enable_canonical_type_coercion is true, a read across a key converts each representative value to its canonical type instead, which means a whole number becomes an Integer (or a Long if it’s too big for an Integer), any other number becomes a Double, and a Tag becomes a String. Directly retrieving the values from a record (e.g., select) always returns the types that were written, even if they diverge across records.

1
enable_canonical_type_coercion: true

Experimental Settings#

These settings are experimental and may change in future versions.

Setting Default Description
enable_async_data_reads false Use multiple threads for disk reads
enable_search_cache false Cache full-text search indexes in memory
enable_verify_by_lookup false Check values by reading only their most recent changes, without caching

Async Data Reads#

When enabled, Concourse uses multiple threads to read data from disk concurrently. This is most beneficial for data that exceeds the in-memory cache, especially search indexes.

1
enable_async_data_reads: true

Verify by Lookup#

Concourse checks whether a field holds a value to prevent writing duplicate data, and on demand. By default, a check that might find the value loads the whole field and caches it, so later checks and reads of that field come from memory. When this is enabled, the check instead reads only the data files with the value’s most recent changes and caches nothing. That helps fields with long histories that are rarely read again soon, but repeated checks of the same field read from disk each time. A check of a value that no data file can hold reads nothing either way.

1
enable_verify_by_lookup: true

Plugin Configuration#

Setting Default Description
plugins.bootstrapper external Plugin discovery method: external or internal
plugins.data_directory ~/concourse/plugin-data Path to durable plugin storage
1
2
3
plugins:
  bootstrapper: external
  data_directory: /path/to/plugin-data

The external bootstrapper allows plugins compiled against newer Java versions to work with older servers (e.g., a Java 21 plugin on a Java 8 server). See Plugins for details.

HTTP Configuration#

Setting Default Description
http_port 0 HTTP listener port (0 = disabled)
http_enable_cors false Enable CORS headers
http_cors_default_allow_origin * Allowed CORS origins
http_cors_default_allow_headers * Allowed CORS headers
http_cors_default_allow_methods * Allowed CORS methods

Monitoring Configuration#

Concourse supports Prometheus metrics scraping and OpenTelemetry push for observability. See Administration for details on monitoring tools.

1
2
3
4
5
6
7
monitoring:
  export_metrics: true
  metrics_port: 9091
  enable_opentelemetry: false
  opentelemetry_endpoint: http://localhost:4317
  opentelemetry_protocol: grpc
  opentelemetry_interval: 15
Setting Default Description
monitoring.export_metrics false Enable Prometheus metrics endpoint
monitoring.metrics_port 9091 Port for metrics HTTP endpoint
monitoring.enable_opentelemetry false Enable OTLP push
monitoring.opentelemetry_endpoint http://localhost:4317 OTLP collector URL
monitoring.opentelemetry_protocol grpc OTLP transport: grpc or http
monitoring.opentelemetry_interval 15 Push interval in seconds

Cluster Configuration#

For distributed deployments, configure the cluster section. See Distributed Concourse for details.

1
2
3
4
5
6
cluster:
  nodes:
    - host1:1717
    - host2:1717
    - host3:1717
  replication_factor: 2

Client Configuration#

Client drivers read connection settings from concourse_client.yaml (or concourse_client.prefs). This file can be placed in the working directory or specified explicitly.

1
2
3
4
5
6
# concourse_client.yaml
host: localhost
port: 1717
username: admin
password: admin
environment: default
Setting Default Description
host localhost Server hostname
port 1717 Server port
username admin Authentication username
password admin Authentication password
environment default Default environment

Using Client Configuration in Java#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// Java
// Connect using default config file
Concourse concourse = Concourse.connect();

// Connect using a specific config file
Concourse concourse = Concourse.connect(
        Paths.get("/path/to/concourse_client.yaml"));

// Or use a pre-loaded configuration handler
ConcourseClientConfiguration config =
        ConcourseClientConfiguration.from(
                Paths.get("/path/to/concourse_client.yaml"));
Concourse concourse = Concourse.connect(config);

Environment Variable Overrides#

Client configuration values can be overridden by environment variables:

Variable Overrides
CONCOURSE_HOST host
CONCOURSE_PORT port
CONCOURSE_USERNAME username
CONCOURSE_PASSWORD password
CONCOURSE_ENVIRONMENT environment