The Form.io platform can be entirely installed on premise within a cloud environment or within your own data center. The platform is very flexible and offers many options for how to architect and configure it. There are a number of products that can be deployed within your own environment that enable a Micro-service architecture by deploying each product in either its own separate environment or within the same server. Form.io uses the Docker Container system as a mechanism to encapsulate each of our deployable products into deterministic and secure runtime environments. The products that Form.io has to offer as separate deployments are as follows.
This is the main API platform and portal interface for Form.io. This enables the complete Form.io API as well as the Developer Portal to be utilized within a deployed environment. This deployment also includes the Form Manager and FormView products as well for managing forms from a non-developer interface as well as launching forms for use within your own domain.
This is the PDF platform for form.io, which includes all of the API interfaces for uploading existing PDF documents, to downloading submissions as PDF artifacts.
This is a special build of formio/pdf-server that enables the downloading of Submission PDF's using the USWDS template framework.
Every deployment product of Form.io must have a valid license in order to run in a production environment. When provided with a license, you can enable that license on a deployment by setting the LICENSE_KEY variable in environment variables for that deployment. Licenses can easily be managed by logging into https://portal.form.io as one of the license users. These users can view the license information and enable and disable associated servers and projects. Your license will have a maximum number of utilizations for each of the licensed features and you can control which of the usages are active at any given time. To free up another usage, you can disable a currently enabled item and then create a new one. You may also contact your sales representative to add additional features and increase the numbers on your license.
Once you have logged into https://portal.form.io as one of the License users, you can now view all of your license utilizations by navigating to the License Management Page. This page can be found on the Home page of the Developer Portal and clicking on the License Management link in the navigation bar.
The form.io platform can be set up in any environment that supports Docker Engine. The configuration can be as simple as running our container and pointing a dns entry to it but most of our customers build out a high performance/high available stack to host the Form.io solution.
While Docker is the preferred runtime environment for our On-Premise deployments, we also support Node.js environment were our platform runs entirely within the Node.js runtime. If this option is chosen, it should be noted that it is up to your organization to ensure all the dependencies are installed and up to date. This option is currently only available for the formio-enterprise product. For more information about using the Node.js deployment, please contact Support.
Typically, the Form.io platform is deployed with a 3 Environment License. This specific license enables you to create a very common deployment structure where you will have the following configuration within your own remote environment.
Each environment can then consist of the following components.
Since the Production environment differs slightly between the Dev / Test and Authoring environments (where the Developer Portal is enabled on the non-production environments), we will describe each of the deployment configurations based on the following definitions.
An environment where the Developer Portal is disabled making this environment strictly an API interface for applications.
An environment where the Developer Portal is enabled allowing form builders to build and manage forms from the same domain as the API's for that environment.
We recommend using at least 8GB of RAM for the server to ensure stable and correct work. By default, the maximum size of Memory Usage sets as 4GB (4096 MB).
To increase the maximum memory size for the server:
Using Docker: Set a NODE_OPTIONS variable with the value:
Using docker-compose: Set a NODE_OPTIONS variable with the value:
Using formio-enterprise Node.js app: Run the app with this option:
node --max-old-space-size=8192 main.js
Instead of 8192, you can set any size that you need in megabytes.
Since Form.io uses Docker as the runtime environment for all of its on-premise products, you will first need to ensure that your Environment has Docker installed. In order to install Docker, please follow the instructions provided in the Get Docker guides. You can either install Docker locally, or you can also use many Cloud Hosting providers that support Docker containers within their instances. Some of the most common Cloud Hosting providers that are known to support Form.io deployments are as follows.
Once Docker is installed and ready to go, you first create a network for all your containers to run within.
docker network create formio
Now that your Docker environment is ready, you will next need to acquire a MongoDB database.
Since Form.io requires a MongoDB compliant database, you will need to ensure that you have a valid database ready to go before installation of the Form.io on-premise software. If you are running a local installation of the Form.io platform, then you will most likely want to use the MongoDB Community Edition on your local machine so that you can easily develop applications within your own local environments. While there are native installations available for MongoDB Community Edition found at MongoDB Installation Guide it is probably easiest to install the MongoDB Docker container.
This can be done by first creating a directory in which to "mount" the database to your local machine. This can be done by first creating a directory on your local machine to contain the database, which for Unix based OS can be done in the terminal with the following command.
Once this directory is created, you can then deploy a local MongoDB container using the following command.
docker run -itd \--name formio-mongo \--network formio \--volume ~/opt/mongodb:/data/db \--restart unless-stopped \mongo
You will want to make sure that you replace
~/opt/mongodb with the absolute path of the directory on your local machine you wish to store your databases.
The Form.io platform commonly will use a File Server or Files Service to upload files from forms as well as upload PDF's used by the PDF Server. For this reason, it is a very common pre-requisite to have a file server configured and ready to go before installing Form.io. There are a number of File Services that work very well with the Form.io platform including.
If you do not wish to use any of these services, OR if you wish to run the Form.io platform locally, then a popular alternative is to use the Minio File Service which is an Open Source file system alternative. It can also be easily deployed into a local environment as follows.
To install Minio locally, you must first create a few folders within your local file system to store the files uploaded through the Minio platform. This can be done either through a file browser, or if you are on a Unix based system with the following commands.
mkdir ~/minio/datamkdir ~/minio/config
Once these directories are created, you can then launch Minio locally with the following command.
docker run -itd \-e "MINIO_ACCESS_KEY=CHANGEME" \-e "MINIO_SECRET_KEY=CHANGEME" \--network formio \--name formio-minio \--restart unless-stopped \-p 9000:9000 \-v ~/minio/data:/data \-v ~/minio/config:/root/.minio \minio/minio server /data
If you wish for a more secure deployment, then you can exclude the environment variables for
MINIO_SECRET_KEY as follows.
docker run -itd \--network formio \--name formio-minio \--restart unless-stopped \-p 9000:9000 \-v ~/minio/data:/data \-v ~/minio/config:/root/.minio \minio/minio server /data
You can then determine these keys by running the following docker command.
docker logs formio-minio
Make sure to take note of these keys for later configurations. You are now ready to deploy the Form.io Platform.