--- title: Installing Telegraf menu: telegraf_1_11: name: Installing weight: 20 parent: Introduction --- This page provides directions for installing, starting, and configuring Telegraf. ## Requirements Installation of the Telegraf package may require `root` or administrator privileges in order to complete successfully. ### Networking Telegraf offers multiple service [input plugins](/telegraf/v1.11/plugins/inputs/) that may require custom ports. All port mappings can be modified through the configuration file, which is located at `/etc/telegraf/telegraf.conf` for default installations. ### NTP Telegraf uses a host's local time in UTC to assign timestamps to data. Use the Network Time Protocol (NTP) to synchronize time between hosts; if hosts' clocks aren't synchronized with NTP, the timestamps on the data can be inaccurate. ## Installation {{< tabs-wrapper >}} {{% tabs %}} [Ubuntu & Debian](#) [RedHat & CentOS](#) [SLES & openSUSE](#) [FreeBSD/PC-BSD](#) [macOS](#) [Windows](#) {{% /tabs %}} {{% tab-content %}} For instructions on how to install the Debian package from a file, please see the [downloads page](https://influxdata.com/downloads/). Debian and Ubuntu users can install the latest stable version of Telegraf using the `apt-get` package manager. **Ubuntu:** Add the InfluxData repository with the following commands: {{< code-tabs-wrapper >}} {{% code-tabs %}} [wget](#) [curl](#) {{% /code-tabs %}} {{% code-tab-content %}} ```bash wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```bash curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} **Debian:** Add the InfluxData repository with the following commands: {{< code-tabs-wrapper >}} {{% code-tabs %}} [wget](#) [curl](#) {{% /code-tabs %}} {{% code-tab-content %}} ```bash # Before adding Influx repository, run this so that apt will be able to read the repository. sudo apt-get update && sudo apt-get install apt-transport-https # Add the InfluxData key wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/os-release test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "9" && echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```bash # Before adding Influx repository, run this so that apt will be able to read the repository. sudo apt-get update && sudo apt-get install apt-transport-https # Add the InfluxData key curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/os-release test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "9" && echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} Then, install and start the Telegraf service: ```bash sudo apt-get update && sudo apt-get install telegraf sudo service telegraf start ``` Or if your operating system is using systemd (Ubuntu 15.04+, Debian 8+): ```sh sudo apt-get update && sudo apt-get install telegraf sudo systemctl start telegraf ``` {{% /tab-content %}} {{% tab-content %}} For instructions on how to install the RPM package from a file, please see the [downloads page](https://influxdata.com/downloads/). **RedHat and CentOS:** Install the latest stable version of Telegraf using the `yum` package manager: ```bash cat < ``` {{% /tab-content %}} {{< /tabs-wrapper >}} ## Configuration ### Create a configuration file with default input and output plugins. Every plugin will be in the file, but most will be commented. ``` telegraf config > telegraf.conf ``` ### Create a configuration file with specific inputs and outputs ``` telegraf --input-filter [:] --output-filter [:] config > telegraf.conf ``` For more advanced configuration details, see the [configuration documentation](/telegraf/v1.11/administration/configuration/).