Skip to content

Configure the Forms Backend#

First, we navigate to the Form Backend subfolder within the i-doit installation:

cd /var/www/html/src/classes/modules/forms/backend/

We create a copy of the configuration template:

sudo -u www-data cp .env.dist .env

Using a text editor like, vi or nano, we now edit the .env:

sudo nano .env

The 'FORMS_SECRET' must not be empty. The key can consist of alphanumeric and special characters.

We now set a FORMS_SECRET and save the file.

Key Value Description
FORMS_SECRET 'g87z$t2r346aSdas%&f52458g724g875!' Key for encrypting the data in the database.
Must not be empty!
Example: FORMS_SECRET='h982t)24/(&%houaq3ho4'
FORMS_PORT '3000' Port for connections
Example: FORMS_PORT='3000'
FORMS_MONGO_DB_SERVER 'mongodb://' URL and port to connect to the MongoDB server
Example: FORMS_MONGO_DB_SERVER='mongodb://'

Next, we create an instance.

To use the, we must first set the rights to run:

sudo chmod +x

Now we can run the

sudo ./ instance:create {Username} {Apikey}

Each Forms instance has its own API and gets its own {Username} and {Apikey}. These can be defined freely and have nothing in common with the i-doit pro API.

The data must be noted during the installation, because they must be entered later in the configuration of the Forms Add-on in the i-doit pro interface.

Example: sudo ./ instance:create forms1 abDzfk74dsfi55FOS32

We have to create a Service for the Forms backend, so it runs in the Background

In order to use, we must first set the rights to run it:

sudo chmod +x

We now have the systemd service created for the Forms backend.
The Service will be activated and started:

sudo ./

Continue to configuration in i-doit