InfluxDB OSS v1
This page documents an earlier version of InfluxDB OSS.InfluxDB 3 Core is the latest stable version.
This page provides directions for installing, starting, and configuring InfluxDB open source (OSS).
Installation of the InfluxDB package may requireroot or administrator privileges in order to complete successfully.
By default, InfluxDB uses the following network ports:
8086 is available for client-server communication using the InfluxDB API.8088 is available for the RPC service to perform back up and restore operations.2003 is available for the Graphite protocol (when enabled).In addition to the ports above, InfluxDB also offers multiple plugins that mayrequirecustom ports.All port mappings can be modified through theconfiguration file,which is located at/etc/influxdb/influxdb.conf for default installations.
InfluxDB uses a host’s local time in UTC to assign timestamps to data and forcoordination purposes.Use the Network Time Protocol (NTP) to synchronize time between hosts; if hosts'clocks aren’t synchronized with NTP, the timestamps on the data written to InfluxDBcan be inaccurate.
For users who don’t want to install any software and are ready to use InfluxDB,you may want to check out ourmanaged hosted InfluxDB offering.
For instructions on how to install the Debian package from a file,see thedownloads page.
Debian and Ubuntu users can install the latest stable version of InfluxDB using theapt-get package manager.
For Ubuntu/Debian users, add the InfluxData repository with the following commands:
# influxdata-archive.key GPG fingerprint:# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07Ewget -q https://repos.influxdata.com/influxdata-archive.keygpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1| grep -q'^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$'&& cat influxdata-archive.key| gpg --dearmor| sudo tee /etc/apt/keyrings/influxdata-archive.gpg > /dev/nullecho'deb [signed-by=/etc/apt/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main'| sudo tee /etc/apt/sources.list.d/influxdata.list# influxdata-archive.key GPG fingerprint:# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07Ecurl --silent --location -O https://repos.influxdata.com/influxdata-archive.keygpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1| grep -q'^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$'&& cat influxdata-archive.key| gpg --dearmor| sudo tee /etc/apt/keyrings/influxdata-archive.gpg > /dev/nullecho'deb [signed-by=/etc/apt/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main'| sudo tee /etc/apt/sources.list.d/influxdata.listThen, install and start the InfluxDB service:
sudo apt-get update&& sudo apt-get install influxdbsudo service influxdb startOr if your operating system is using systemd (Ubuntu 15.04+, Debian 8+):
sudo apt-get update&& sudo apt-get install influxdbsudo systemctl unmask influxdb.servicesudo systemctl start influxdbFor instructions on how to install the RPM package from a file, please see thedownloads page.
Red Hat and CentOS users can install the latest stable version of InfluxDB using theyum package manager:
cat<<EOF | sudo tee /etc/yum.repos.d/influxdb.repo[influxdb]name = InfluxDB Repository - RHEL \$releaseverbaseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stableenabled = 1gpgcheck = 1gpgkey = https://repos.influxdata.com/influxdata-archive.keyEOFOnce repository is added to theyum configuration, install and start the InfluxDB service by running:
sudo yum install influxdbsudo service influxdb startOr if your operating system is using systemd (CentOS 7+, RHEL 7+):
sudo yum install influxdbsudo systemctl start influxdbThere are RPM packages provided by openSUSE Build Service for SUSE Linux users:
# add go repositoryzypper ar -f obs://devel:languages:go/ go# install latest influxdbzypper in influxdbInfluxDB is part of the FreeBSD package system.It can be installed by running:
sudo pkg install influxdbThe configuration file is located at/usr/local/etc/influxd.conf with examples in/usr/local/etc/influxd.conf.sample.
Start the backend by executing:
sudo service influxd onestartTo have InfluxDB start at system boot, addinfluxd_enable="YES" to/etc/rc.conf.
UseHomebrew to install InfluxDB on macOS:
brew updatebrew install influxdb@1Installing both InfluxDB 1.8 and InfluxDB 2.0 with Homebrewcan result in unexpected path and naming conflicts.You can always run the desired version by specifying the full path:
$ /usr/local/opt/influxdb/bin/influxd versionInfluxDB 1.12.2(git: none) build_date: 2021-04-01T17:55:08Z$ /usr/local/opt/influxdb@1/bin/influxd versionInfluxDB v(git: unknown unknown)Use Docker to run InfluxDB v1 in a container.
For comprehensive Docker installation instructions, configuration options, and initialization features, see:
Quick start:
# Pull the latest InfluxDB v1.x imagedocker pull influxdb:1.12.2# Start InfluxDB with persistent storagedocker run -p 8086:8086\ -v$PWD/data:/var/lib/influxdb\ influxdb:1.12.2For added security, follow these steps to verify the signature of your InfluxDB download withgpg.
(Most operating systems include thegpg command by default.Ifgpg is not available, see theGnuPG homepage for installation instructions.)
Download and import InfluxData’s public key:
curl -s https://repos.influxdata.com/influxdata-archive.key | gpg --importDownload the signature file for the release by adding.asc to the download URL.For example:
wget https://download.influxdata.com/influxdb/releases/influxdb-1.12.2-linux-amd64.tar.gz.ascVerify the signature withgpg --verify:
gpg --verify influxdb-1.12.2_linux_amd64.tar.gz.asc influxdb-1.12.2-linux-amd64.tar.gzThe output from this command should include the following:
gpg: Good signature from "InfluxData Package Signing Key <support@influxdata.com>" [unknown]The system has internal defaults for every configuration file setting.View the default configuration settings with theinfluxd config command.
Note: If InfluxDB is being deployed on a publicly accessible endpoint, we strongly recommend authentication be enabled.Otherwise the data will be publicly available to any unauthenticated user. The default settings doNOT enableauthentication and authorization. Further, authentication and authorization should not be solely relied upon to prevent accessand protect data from malicious actors. If additional security or compliance features are desired, InfluxDB should be runbehind a third-party service. Review theauthentication and authorizationsettings.
Most of the settings in the local configuration file(/etc/influxdb/influxdb.conf) are commented out; allcommented-out settings will be determined by the internal defaults.Any uncommented settings in the local configuration file override theinternal defaults.Note that the local configuration file does not need to include everyconfiguration setting.
There are two ways to launch InfluxDB with your configuration file:
Point the process to the correct configuration file by using the-configoption:
influxd -config /etc/influxdb/influxdb.confSet the environment variableINFLUXDB_CONFIG_PATH to the path of yourconfiguration file and start the process.For example:
echo $INFLUXDB_CONFIG_PATH/etc/influxdb/influxdb.confinfluxdInfluxDB first checks for the-config option and then for the environmentvariable.
For detailed Docker configuration instructions including environment variables, configuration files, initialization options, and examples, see:
See theConfiguration documentation for more information.
Make sure the directories in which data and thewrite ahead log (WAL) are stored are writable for the user running theinfluxd service.
Note: If the data and WAL directories are not writable, theinfluxd service will not start.
The user running theinfluxd process should have the following permissions fordirectories in theInfluxDB file system:
| Directory path | Permission |
|---|---|
influxdb/ | 755 |
influxdb/data/ | 755 |
influxdb/meta/ | 755 |
influxdb/wal/ | 700 |
Information aboutdata andwal directory paths is available in theData settings section of theConfiguring InfluxDB documentation.
We recommend using two SSD volumes, using one for theinfluxdb/wal and the other for theinfluxdb/data.Depending on your load, each volume should have around 1k-3k provisioned IOPS.Theinfluxdb/data volume should have more disk space with lower IOPS and theinfluxdb/wal volume should have less disk space with higher IOPS.
Each machine should have a minimum of 8GB RAM.
We’ve seen the best performance with the R4 class of machines, as they provide more memory than either of the C3/C4 class and the M4 class.
This example assumes that you are using two SSD volumes and that you have mounted them appropriately.This example also assumes that each of those volumes is mounted at/mnt/influx and/mnt/db.For more information on how to do that see the Amazon documentation on how toAdd a Volume to Your Instance.
You’ll have to update the configuration file appropriately for each InfluxDB instance you have.
...[meta]dir="/mnt/db/meta"......[data]dir="/mnt/db/data"...wal-dir="/mnt/influx/wal"......[hinted-handoff]...dir="/mnt/db/hh"...For all AWS deployments, we strongly recommend authentication be enabled. Without this, it is possible that your InfluxDBinstance may be publicly available to any unauthenticated user. The default settings doNOT enableauthentication and authorization. Further, authentication and authorization should not be solely relied upon to prevent accessand protect data from malicious actors. If additional security or compliance features are desired, InfluxDB should be runbehind additional services offered by AWS.Review theauthentication and authorization settings.
When using non-standard directories for InfluxDB data and configurations, also be sure to set filesystem permissions correctly:
chown influxdb:influxdb /mnt/influxchown influxdb:influxdb /mnt/dbFor InfluxDB 1.7.6 or later, you must give owner permissions to theinit.sh file. To do this, run the following script in yourinfluxdb directory:
if[ ! -f"$STDOUT"];then mkdir -p$(dirname$STDOUT) chown$USER:$GROUP$(dirname$STDOUT)fiif[ ! -f"$STDERR"];then mkdir -p$(dirname$STDERR) chown$USER:$GROUP$(dirname$STDERR)fi# Override init script variables with DEFAULT valuesWas this page helpful?
Thank you for your feedback!
Thank you for being part of our community!We welcome and encourage your feedback and bug reports for InfluxDB and this documentation.To find support, use the following resources:
Customers with an annual or support contract cancontact InfluxData Support.
Key enhancements in InfluxDB 3.7 and the InfluxDB 3 Explorer 1.5.
InfluxDB 3.7 is now available for both Core and Enterprise, landing alongsideversion 1.5 of the InfluxDB 3 Explorer UI. This release focuses on givingdevelopers faster visibility into what their system is doing with one-clickmonitoring, a streamlined installation pathway, and broader updates thatsimplify day-to-day operations.
For more information, check out:
latest tag for InfluxDB Docker images willpoint to InfluxDB 3 Core. To avoid unexpected upgrades, use specific versiontags in your Docker deployments.If using Docker to install and run InfluxDB, thelatest tag will point toInfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags inyour Docker deployments. For example, if using Docker to run InfluxDB v2,replace thelatest version tag with a specific version tag in your Dockerpull command–for example:
docker pull influxdb:2