Install Vector From Source

This page covers installing Vector from source. Because Vector is written in Rust it can compile to a single static binary. You can view an example of this in the musl builder Docker image.


  1. Install Rust

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

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

  3. Create the vector directory

    mkdir vector
  4. Download Vector's Source

    • Latest (0.5.0)
    • Master
    mkdir -p vector && \
    curl -sSfL --proto '=https' --tlsv1.2 | \
    tar xzf - -C vector --strip-components=1
  5. Change into the vector directory

    cd vector
  6. 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.

  7. 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 highly 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
FeatureDescriptionEnabled by default
jemallocatorEnables vendored jemalloc instead of default memory allocator, which improves performance.
leveldbEnables support for disk buffers using vendored LevelDB.
leveldb/leveldb-sys-2Can be used together with leveldb feature to use LevelDB from leveldb-sys 2.x crate, which doesn't require cmake as build dependency, but supports less platforms.
leveldb/leveldb-sys-3Can be used together with leveldb feature to use LevelDB from development version of leveldb-sys 3.x crate, which requires cmake as build dependency, but supports more platforms.
openssl/vendoredEnables vendored OpenSSL. If disabled, system SSL library is used instead.
rdkafkaEnables vendored librdkafka dependency, which is required for kafka source and kafka sink.
rdkafka/cmake_buildCan be used together with rdkafka feature to build librdkafka using cmake instead of default build script in case of build problems on non-standard system configurations.
shiplift/unix-socketEnables support for Unix domain sockets in docker source.