This tutorial will show you how to install and run the InfluxDB database engine within a web app.
If you do not have a WebApps section in the Control Panel of your account, then this tutorial is not suitable for your particular hosting environment. You can get in touch with us if you need further assistance.
The official InfluxDB documentation can be found at https://docs.influxdata.com/influxdb/v1.8/.
In this guide, InfluxDB will be installed in the /home/$USER/private/influxdb directory on your account. You will need to replace $USER with the actual user name of your account. This user name is listed in the left pane of the account's Control Panel.
1. Create a directory for your InfluxDB installation called influxdb in the /private directory on your account. You can create directories through the File Manager in the Control Panel of your account. It is also recommended creating a separate subdomain for each App. You can create subdomains through the Subdomains section of the Control Panel.
2. Create an App for your InfluxDB instance through the WebApps section of the account's Control Panel.
Please use the following settings:
Deployment directory: private/influxdb
Start command: sh /home/$USER/private/influxdb/start.sh
3. Make sure all options are enabled in the SSH Access section of the account's Control Panel. Next, log in to your account via SSH. You can check our online documentation for more information on doing this:
To navigate to the /home/$USER/private/influxdb directory, run the following command:
4. Download and extract the latest stable InfluxDB release from the official website. You can find the latest stable release at https://portal.influxdata.com/downloads/. You can use wget to download the archive file directly on the server, and tar to extract the archive:
tar xvfz influxdb-1.8.1_linux_amd64.tar.gz
5. Create a file called start.sh in the /home/$USER/private/influxdb directory with executable permissions and the following content:
/home/$USER/private/influxdbprivate/influxdb/influxdb-1.8.1-1/usr/bin/influxd --config /home/$USER/private/influxdb/influxdb-1.8.1-1/etc/influxdb/influxdb.conf
6. Update the configuration file at ~/private/influxdb/influxdb-1.8.1-1/etc/influxdb/influxdb.conf. There, edit the following settings:
dir = "/home/$USER/private/influxdb/meta"
dir = "/home/$USER/private/influxdb/data"
wal-dir = "/home/$USER/private/influxdb/wal"
enabled = true
flux-enabled = true
bind-address = ":APP_PORT"
You will need to replace APP_PORT with the port assigned to the application you need to create through the WebApps section in the Control Panel of the account:
7. Finally, run the InfluxDB app through the WebApps section in the Control Panel of the account.