# Self-host Vector

> High performance observability data pipeline for logs and metrics. The install form carries vector.yaml as an editable file, so it starts with an HTTP source and a console sink.

- Page: https://levelrail.com/templates/vector/
- JSON: https://levelrail.com/templates/vector.json
- Category: Monitoring
- Licence: MPL-2.0 (Copyleft license)
- Source: https://github.com/vectordotdev/vector
- Upstream docs: https://vector.dev/docs/

## Requirements
- Memory: about 128 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 0.61.0-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| vector | timberio/vector | 0.61.0-alpine | 8686, 8080 | data -> /var/lib/vector |

## Deploy

### CLI

```bash
levelrail-cli templates install vector --name my-vector
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain vector=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/vector/install \
  -d '{
    "name": "my-vector"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Post JSON to port 8080 and watch the container log, then edit the config file setting to add transforms and real sinks. The API is on port 8686.

## Questions

### Can I deploy Vector on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Vector, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image timberio/vector:0.61.0-alpine is what you deploy there.

Self-host Vector, Vector docker compose file, deploy Vector on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
