From Source

Install Vector from the Vector source code

Installing Vector from source should be a last resort if Vector does not support your platform, operating system, or provide a pre-built archive. 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.


This guide does not cover cross compiling Vector. This guide is intended to be followed on your target machine.

1. Install Rust

curl -sSf | sh -s -- -y --default-toolchain stable

2. Download Vector's Source

Create a directory to unpack the Vector source into:

mkdir vector

Download and unarchive the Vector source:

curl -OL | tar -xzf - --directory="vector"

Change into the vector directory:

cd vector

3. Compile Vector

And build the project via the build Make target:

make build

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.

4. Start Vector

Finally, go ahead and start vector:

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

Next Steps

Adding To Your $PATH

You'll most likely want to move the vector binary in your $PATH, such as the /usr/local/bin folder.


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

And in your vector.toml file:

data_dir = "/var/lib/vector"

If you plan to run Vector under a separate user, be sure that the directory is writable by the vector process.

Service Managers

Vector includes 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 /etc/systemd/system


Simply follow the same installation instructions above.