Install Vector From Source

This page covers installing Vector from source using the native toolchain for the host.

Vector can also be compiled to a static binary for Linux for x86_64, ARM64, and ARMv7 architectures. See compiling using Docker for details.


The following steps should be used to compile Vector directly on Linux based systems.

  1. Install Rust

    curl --proto '=https' --tlsv1.2 -sSf | sh -s -- -y --default-toolchain stable
  2. Install compilation dependencies

    Install C and C++ compilers (GCC or Clang) and GNU make if they are not pre-installed on your system.

  3. Download Vector's Source

    mkdir -p vector && \
    curl -sSfL --proto '=https' --tlsv1.2 | \
    tar xzf - -C vector --strip-components=1
  4. Change into the vector directory

    cd vector
  5. Compile Vector

    [FEATURES="<flag1>,<flag2>,..."] make build

    The FEATURES environment variable is optional. You can override the default features with this variable. See feature flags for more info.

    When finished, the vector binary will be placed in target/<target>/release/vector. For example, if you are building Vector on your Mac, your target triple is x86_64-apple-darwin, and the Vector binary will be located at target/x86_64-apple-darwin/release/vector.

  6. Start Vector

    Finally, start vector:

    target/<target>/release/vector --config config/vector.toml

Next Steps


The Vector configuration file is located at:


A full spec is located at config/vector.spec.toml and examples are located in config/vector/examples/*. You can learn more about configuring Vector in the Configuration section.

Data Directory

We recommend creating a data directory that Vector can use:

mkdir /var/lib/vector

Vector offers a global data_dir option that you can use to specify the path of your directory.

data_dir = "/var/lib/vector" # default

Service Managers

Vector archives ship with service files in case you need them:


To install Vector into Init.d run:

cp -av distribution/init.d/vector /etc/init.d


To install Vector into Systemd run:

cp -av distribution/systemd/vector.service /etc/systemd/system


Simply follow the same installation instructions above.

How It Works

Feature Flags

The following feature flags are supported via the FEATURES env var when executing make build:

[FEATURES="<flag1>,<flag2>,..."] make build

There are three meta-features which can be used when compiling for the corresponding targets. If no features are specified, then the default one is used.

FeatureDescriptionEnabled by default
defaultDefault set of features for *-unknown-linux-gnu and *-apple-darwin targets.
default-cmakeDefault set of features for *-unknown-linux-* targets which uses cmake and perl as build dependencies.
default-msvcDefault set of features for *-pc-windows-msvc targets. Requires cmake and perl as build dependencies.

Alternatively, for finer control over dependencies and operating system features, it is possible to use specific features from the list below:

FeatureDescriptionIncluded in default feature
unixEnables features that require cfg(unix) to be present on the platform, namely support for Unix domain sockets in docker_logs source and jemalloc instead of the default memory allocator.
vendoredForces vendoring of OpenSSL and ZLib dependencies instead of using their versions installed in the system. Requires perl as a build dependency.
leveldb-plainEnables support for disk buffers using vendored LevelDB.
leveldb-cmakeThe same as leveldb-plain, but is more portable. Requires cmake as a build dependency. Use it in case of compilation issues with leveldb-plain.
rdkafka-plainEnables vendored librdkafka dependency, which is required for kafka source and kafka sink.
rdkafka-cmakeThe same as rdkafka-plain, but is more portable. Requires cmake as a build dependency. Use it in case of compilation issues with rdkafka-plain.

In addition, it is possible to pick only a subset of Vector's components for the build using feature flags. In order to do it, it instead of default features one has to pass a comma-separated list of component features.

Click to see all supported component features

sources-apache_metricsEnables building of apache_metrics source.
sources-aws_ecs_metricsEnables building of aws_ecs_metrics source.
sources-aws_kinesis_firehoseEnables building of aws_kinesis_firehose source.
sources-aws_s3Enables building of aws_s3 source.
sources-datadog_logsEnables building of datadog_logs source.
sources-docker_logsEnables building of docker_logs source.
sources-fileEnables building of file source.
sources-generatorEnables building of generator source.
sources-heroku_logsEnables building of heroku_logs source.
sources-host_metricsEnables building of host_metrics source.
sources-httpEnables building of http source.
sources-internal_logsEnables building of internal_logs source.
sources-internal_metricsEnables building of internal_metrics source.
sources-journaldEnables building of journald source.
sources-kafkaEnables building of kafka source. Requires rdkafka-plain or rdkafka-cmake feature to be also enabled.
sources-kubernetes_logsEnables building of kubernetes_logs source.
sources-mongodb_metricsEnables building of mongodb_metrics source.
sources-nginx_metricsEnables building of nginx_metrics source.
sources-postgresql_metricsEnables building of postgresql_metrics source.
sources-prometheus_remote_writeEnables building of prometheus_remote_write source.
sources-prometheus_scrapeEnables building of prometheus_scrape source.
sources-socketEnables building of socket source.
sources-splunk_hecEnables building of splunk_hec source.
sources-statsdEnables building of statsd source.
sources-stdinEnables building of stdin source.
sources-syslogEnables building of syslog source.
sources-vectorEnables building of vector source.
transforms-add_fieldsEnables building of add_fields transform.
transforms-add_tagsEnables building of add_tags transform.
transforms-ansi_stripperEnables building of ansi_stripper transform.
transforms-aws_cloudwatch_logs_subscription_parserEnables building of aws_cloudwatch_logs_subscription_parser transform.
transforms-aws_ec2_metadataEnables building of aws_ec2_metadata transform.
transforms-coercerEnables building of coercer transform.
transforms-concatEnables building of concat transform.
transforms-dedupeEnables building of dedupe transform.
transforms-filterEnables building of filter transform.
transforms-geoipEnables building of geoip transform.
transforms-grok_parserEnables building of grok_parser transform.
transforms-json_parserEnables building of json_parser transform.
transforms-key_value_parserEnables building of key_value_parser transform.
transforms-log_to_metricEnables building of log_to_metric transform.
transforms-logfmt_parserEnables building of logfmt_parser transform.
transforms-luaEnables building of lua transform.
transforms-mergeEnables building of merge transform.
transforms-metric_to_logEnables building of metric_to_log transform.
transforms-reduceEnables building of reduce transform.
transforms-regex_parserEnables building of regex_parser transform.
transforms-remapEnables building of remap transform.
transforms-remove_fieldsEnables building of remove_fields transform.
transforms-remove_tagsEnables building of remove_tags transform.
transforms-rename_fieldsEnables building of rename_fields transform.
transforms-routeEnables building of route transform.
transforms-sampleEnables building of sample transform.
transforms-splitEnables building of split transform.
transforms-tag_cardinality_limitEnables building of tag_cardinality_limit transform.
transforms-tokenizerEnables building of tokenizer transform.
transforms-wasmEnables building of wasm transform.
sinks-aws_cloudwatch_logsEnables building of aws_cloudwatch_logs sink.
sinks-aws_cloudwatch_metricsEnables building of aws_cloudwatch_metrics sink.
sinks-aws_kinesis_firehoseEnables building of aws_kinesis_firehose sink.
sinks-aws_kinesis_streamsEnables building of aws_kinesis_streams sink.
sinks-aws_s3Enables building of aws_s3 sink.
sinks-aws_sqsEnables building of aws_sqs sink.
sinks-azure_monitor_logsEnables building of azure_monitor_logs sink.
sinks-blackholeEnables building of blackhole sink.
sinks-clickhouseEnables building of clickhouse sink.
sinks-consoleEnables building of console sink.
sinks-datadog_logsEnables building of datadog_logs sink.
sinks-datadog_metricsEnables building of datadog_metrics sink.
sinks-elasticsearchEnables building of elasticsearch sink.
sinks-fileEnables building of file sink.
sinks-gcp_cloud_storageEnables building of gcp_cloud_storage sink.
sinks-gcp_pubsubEnables building of gcp_pubsub sink.
sinks-gcp_stackdriver_logsEnables building of gcp_stackdriver_logs sink.
sinks-gcp_stackdriver_metricsEnables building of gcp_stackdriver_metrics sink.
sinks-honeycombEnables building of honeycomb sink.
sinks-httpEnables building of http sink.
sinks-humio_logsEnables building of humio_logs sink.
sinks-humio_metricsEnables building of humio_metrics sink.
sinks-influxdb_logsEnables building of influxdb_logs sink.
sinks-influxdb_metricsEnables building of influxdb_metrics sink.
sinks-kafkaEnables building of kafka sink. Requires rdkafka-plain or rdkafka-cmake feature to be also enabled.
sinks-logdnaEnables building of logdna sink.
sinks-lokiEnables building of loki sink.
sinks-natsEnables building of nats sink.
sinks-new_relic_logsEnables building of new_relic_logs sink.
sinks-papertrailEnables building of papertrail sink.
sinks-prometheus_exporterEnables building of prometheus_exporter sink.
sinks-prometheus_remote_writeEnables building of prometheus_remote_write sink.
sinks-pulsarEnables building of pulsar sink.
sinks-sematext_logsEnables building of sematext_logs sink.
sinks-sematext_metricsEnables building of sematext_metrics sink.
sinks-socketEnables building of socket sink.
sinks-splunk_hecEnables building of splunk_hec sink.
sinks-statsdEnables building of statsd sink.
sinks-vectorEnables building of vector sink.