How to Setup Your Local Creatio Instance

September 22, 2024

Introduction

Setting up your local Creatio instance can streamline your development process, enabling you to customize and test features efficiently without relying on a remote environment. This guide provides step-by-step instructions for installing the necessary tools and configuring your system to run a Creatio instance locally. From installing .NET and Clio to setting up PostgreSQL and IIS, we’ll walk you through the entire process to ensure your setup is complete and functional.

  1. Introduction
  2. Install .Net
    1. Download 64-bit .NET 6 SDK
    2. Download 64-bit .NET Framework SDK v 4.7.2
  3. Instal Clio
    1. dotnet tool install clio
    2. clio manage-windows-features -c
    3. clio manage-windows-features -i
  4. Install Redis for Windows
  5. Install Postgres / PG Admin
  6. Create Application in IIS
    1. Manual Steps
    2. Powershell Script
  7. Restore DB in PG
    1. PG Admin
    2. Powershell Script
  8. Setting Up ConnectionStrings.config for PostgreSQL in Creatio
  9. Compile & Test
  10. Conclusion

Install .Net

Download 64-bit .NET 6 SDK

To download and install the 64-bit .NET 6 SDK, follow these steps: 

After downloading the installer, follow these steps based on your operating system: 

Open the downloaded installer file (dotnet-sdk-6.x.x-win-x64.exe). 

Follow the on-screen instructions to install the SDK. 

Open Command Prompt or PowerShell and run:  dotnet –version 

You should see the installed version of .NET 6. 

Download 64-bit .NET Framework SDK v 4.7.2

To download and install the .NET Framework SDK v4.7.2 (64-bit), follow these steps: 

1. Download the SDK 

Download the Download 64-bit .NET Framework SDK v 4.7.2 (this includes the SDK, targeting pack, and other resources). 

2. Install the SDK 

3. Verify the Installation 

reg query “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” /v Version 

Once installed, you’ll be able to use the .NET Framework 4.7.2 SDK in Visual Studio or any other compatible development environment. 

Instal Clio

Clio is a command-line tool related to .NET for managing various aspects of your environment. Since Clio is a .NET tool, you can install it globally using the .NET CLI, which will allow you to run it from anywhere in your terminal or command prompt.

Here’s how you can install and manage the Clio CLI tool using the .NET CLI:

dotnet tool install clio

To install the Clio CLI tool using the .NET CLI, you can run the following command in your terminal or command prompt: 

dotnet tool install –global Clio 

Steps to Follow: 

  1. Open your terminal or command prompt. 

Run the command above. This will install the Clio tool globally, allowing you to use it from any directory. 

  1. Verify the installation by running: clio –version 

This should display the version of Clio that you’ve installed, confirming that the installation was successful.
Notes: 

clio manage-windows-features -c

To check Windows features in Creatio , you can use the following command in the command line interface (CLI): clio manage-windows-features –c 

clio manage-windows-features -i

To install windows features : Tap the command clio manage-windows-features –i

Install Redis for Windows 

This paragraph covers deploying Redis caching server on Windows operating systems. 

We recommend deploying Redis on Linux operating systems for production environments. 

While Redis can be deployed on Windows Server, running Redis on Windows machines has significant drawbacks and is not officially recommended. 

Redis Server is installed as a service. To do this: 

Download the latest release version of Redis Server setup files on GitHub

Run the redis-server.exe file.  

During the installation, a number of commands will be run sequentially. After the completion of each command, click [Next] and wait for the process to complete. 

Start the Redis Server after the installation. To do this follow these steps: 

Install Postgres / PG Admin

To install PostgreSQL locally on your computer, visit the installer by EDB, and download the newest version compatible with your operating system. 

  1. Download the Installer

  1. Run the Installer

  1. Follow the Setup Wizard

  1. Complete Installation

To start pgAdmin 4 and connect to your PostgreSQL database, follow these steps: 

Once pgAdmin 4 is open, find the Servers section in the left pane. 

Create Application in IIS

This documentation provides step-by-step instructions for setting up a Creatio application server (web server) on Internet Information Services (IIS). The process includes configuring a website in IIS, creating an application pool, and applying necessary settings such as authentication, MIME types, and security configurations. Additionally, the guide offers commands for automating the setup process via PowerShell and the IIS Command Line (appcmd). 

This guide covers the manual configuration of a Creatio application website, the creation of an application pool, and ensuring that all required configurations (e.g., application pool settings, handler mappings, MIME types, etc.) are correctly set. We also offer alternative methods using command-line scripts to automate parts of the setup process. 

By following this guide, system administrators can successfully configure the Creatio application server on IIS and ensure it runs optimally for handling user requests. 

Manual Steps

1. Set Up the Application Website in IIS 

To create and configure a website on IIS, follow these steps: 

Step 1: Open IIS Manager 

  1. Press Win + R, type inetmgr, and press Enter to open IIS Manager. 

Step 2: Add a Website 

  1. In IIS Manager, right-click on the Sites folder in the Connections panel and select Add Website

  1. In the Add Website window:
    • Enter a name for the website (e.g., “Creatio”). 

    • Set the Physical Path to the folder containing the Creatio files (e.g., C:\Creatio\CreatioApp). 

    • Choose the IP address and port number for the website (the default IP address can be “All Unassigned” and port can be specified as per the need, for example, http://localhost:6060). 

  1. Click OK to create the website. 

Step 3: Add an Application to the Website 

  1. Right-click the newly created website (e.g., “Creatio”) in the Connections panel and select Add Application

  1. In the Add Application window:
    • Set the Alias field to 0. 

    • Set the Physical Path to the Terrasoft.WebApp directory (e.g., C:\Creatio\CreatioApp\Terrasoft.WebApp). 

    • Assign the application to the Creatio application pool. 

  1. Click OK to add the application. 

2.Add an Application Pool 

Step 1: Create an Application Pool 

To add an application pool: 

Step 2: Configure ISAPI and CGI Restrictions 

  1. Go to ISAPI and CGI Restrictions in IIS Manager. 

  1. Ensure that the specified version of ASP.NET is allowed, with an Allowed status for the specified ASP.NET version. 

Step 3 Make sure that all the required permissions are active. To do this: 

3. Configure MIME Types 

For proper handling of file types like .svg and .json, you need to ensure the MIME types are configured correctly. 

Step 1: Verify MIME Types 

  1. In IIS Manager, go to MIME Types at the server or application level. 

  1. Check if .svg and .json MIME types are listed:
    • .svg → MIME type: image/svg+xml 

    • .json → MIME type: application/json 

Step 2: Add Missing MIME Types 

  1. If the MIME types are not listed, click Add in the Actions panel. 

  2. For .svg, add the MIME type image/svg+xml. 

  3. For .json, add the MIME type application/json. 

4. Restart the Website 

After configuring the website, application pool, and MIME types, restart the website to apply the changes: 

  1. In IIS Manager, right-click the website (e.g., “Creatio”) and select Restart

5. Test the Website 

  1. Open a web browser and navigate to the website’s URL (e.g., http://localhost:6262). 

  2. Ensure the Creatio login page appears. 

  3. The default username should be Supervisor. Enter Supervisor as the password to log n. 

Powershell Script

Before start creating the WebSite/AppPool, start the command prompt as administrator. So that you can privilege to execute all the commands. After that access below location in command prompt. 

 cd c:\Windows\System32\inetsrv 

Create Application Pool in IIS: 

An application pool fills in as a container for your applications in IIS. It’s a combination of at least one URLs that can be served by a worker process. IIS App Pool used for the gathering of sites to use similar configuration settings or prevent different applications to use resources of one application by different applications. 

App Pool with Default Settings: 

Use the following command to create Application Pool named “CreatioAppPool” with default IIS settings. 

appcmd add apppool /name:****“CreatioAppPool” 

App Pool with Specific Settings 

If you want to use different settings for your App Pools, use mention command. Change managedRuntimeVersion as per your requirements v1.0, v1.1, v2.0 or v4.0. 

appcmd set apppool /apppool.name:****“CreatioAppPool” /managedRuntimeVersion:v4.0 /managedPipelineMode:Integrated 

Create a Website in IIS: 

Now, We are going to create a website using the command line. We are creating  CreatioApp website with document root “C:\Creatio\CreatioApp\Terrasoft.WebApp” 

appcmd add site /name:****“CreatioApp” /physicalPath:****“C:\Creatio\CreatioApp” /bindings:****“http/*:6262:” 

Create Subdirectory Application: 

You can also create the subdirectory application to your existing website. In other words, If you want to configure URL   then /0 is he subdirectory application. We are creating the document root for the blog is c:\sites\0. 

appcmd add app /site.name:****“CreatioApp” /path:****"/0" /physicalPath:****“C:\Creatio\CreatioApp\Terrasoft.WebApp” 

Assign/Change App Pool to an App: 

You can likewise change the Application Pool of any site. Use the following command to change the application pool of the site. 

 appcmd set site /site.name:CreatioApp /[path=’/blog’].applicationPool:CreatioAppPool 

You can also change the Application Pool for a subdirectory URL use the following command. 

 appcmd set site /site.name:CreatioApp /[path=’/’].applicationPool:CreatioAppPool 

Restore DB in PG

PG Admin

To restore a database in pgAdmin, you can follow these steps: 

1. Open pgAdmin 

2. Select the Database 

3. Restore the Database 

4. Configure the Restore Options 

Select Custom or tar to restore from a custom archive file to create a copy of the backed-up object. 

Select Directory to restore from a compressed directory-format archive. 

5. Start the Restore 

6. Monitor the Process 

 In this case we need to create the role “puser " and repeate the steps of create and restore the database  

To create the user “puser” in pgadmin  

  1. Open PGAdmin and connect to the server where you want to create the new user.  

  2. In the Object Browser, expand the Server and go to Login/Group Roles tree, and right-click on the folder. Select Create>Login/Group Role option from the context menu.  

  1. In the General tab, enter the new user’s name using the Name field. Optionally you can add comments to describe the user.  

  1. Next, in the Definition tab, enter the new user’s password in the Password field. Optionally, select the account expiration date to expire the user in a date and the connection limit (by default is -1 which means that there is no limit)  

  1.  Also, in the Privileges tab, you can select the privileges you want to grant to the new user. For example, you can provide privileges to log in. To have superuser privileges. The superuser has all the privileges under the server. You can also grant permissions to the user to create roles and create databases. You can also inherit rights from the parent role. You can inherit privileges from the parent or not. Finally, you have the option to start the streaming replication and set the system in the backup mode with the Can initiate streaming replication and backups option.   

  1.  The process of restoring a PostgreSQL database from a backed-up file has been successfully completed: 

Powershell Script

Step I: Install PostgreSQL (if not already installed) 

If you have an existing PostgreSQL server and user roles set up (with both sysadmin and public users), skip to Step II. 

Note: High-availability PostgreSQL configurations haven’t been tested with Creatio. For details on PostgreSQL clustering, consult the PostgreSQL documentation. 

Step II: Create PostgreSQL Users 

A fresh PostgreSQL installation does not include the required users for Creatio. You need to create: 

To create these users

  1. Open Command Prompt as an administrator

  2. Navigate to PostgreSQL installation folder : **Cd “**C:\Program Files\PostgreSQL” 

  1. Navigate to the folder with the Command Line Tools component: cd “C:\Program Files\PostgreSQL\17\bin” 

  1. Enter the DB connection password in the environment variable. **set PGPASSWORD=**pg_password 

(pg_password – password of the postgres user for connecting to the PostgreSQL server 

  1. Run PostgreSQL shell as postgres:       psql.exe –username postgres 

  1. Create a sysadmin user, e. g sysadmin_user,  (The sysadmin will restore the Creatio database from a backup file and assign access permissions.)    CREATE USER sysadmin_user;  

  2. Make sysadmin_user a system administrator: ALTER ROLE sysadmin_user WITH SUPERUSER; 

  3. Set a password for sysadmin_user , pg_syspassword – sysadmin_user password for connecting to the PostgreSQL server. ALTER ROLE sysadmin_user WITH PASSWORD pg_syspassword; 

pg_syspassword – sysadmin user password for connecting to the PostgreSQL server. 

  1. Allow sysadmin_user  to log in: ALTER ROLE sysadmin_user WITH LOGIN; 

  1. Create a public user, e. g. public_user:    CREATE USER  public_user****; 

  2.  Set a password for pg_user: ALTER ROLE public_user WITH PASSWORD ‘pg_password’; 

pg_password – public user password for connecting to the PostgreSQL server. 

  1. Allow pg_user to log in:     ALTER ROLE public_user WITH LOGIN; 

  1. Exit the PostgreSQL shell: \q 

Step III: Restore the PostgreSQL Database 

To restore a PostgreSQL database from a backup file, you will need psql.exe and pg_restore.exe utilities. Both are part of the Command Line Tools PostgreSQL component that comes with the PostgreSQL Server. They are located in the PostgreSQL software install folder. 

If you plan to use a remote PostgreSQL database without installing the PostgreSQL Server on your machine, take the following steps: 

  1. Get a PostgreSQL binary package. Binary packages are available for download at postgresql.org

  2. Select the Command Line Tools component during installation. Selecting the other components is optional. 

To restore the Creatio database from a backup file: 

  1. Open Command Prompt as administrator . 

  2. Navigate to the PostgreSQL software install folder with executables: 

  3. Navigate to the folder with executables: 

  1. Enter the DB connection password in the environment variable: 

set PGPASSWORD=pg_syspassword 

  1. Create a database where the backup data will be restored. 

psql.exe –host pg_server_ip –port pg_server_port –username=postgres -–command “CREATE DATABASE creatio WITH OWNER = public_user ENCODING = ‘UTF8’ CONNECTION LIMIT = -1” 

  1. Restore the Creatio database from the backup file: 

For Creatio version 7.16.3 or higher: 

pg_restore –host pg_server_ip –port pg_server_port –username=postgres –dbname=creatio –no-owner –no-privileges –verbose \\path\to\db.backup 

pg_restore –host localhost –port 5432 –username=postgres –dbname=creatio –no-owner –no-privileges –verbose C:\Creatio\CreatioApp\db\BPMonline813SalesEnterprise_Marketing_ServiceEnterprise.backup 

Setting Up ConnectionStrings.config for PostgreSQL in Creatio 

The ConnectionStrings.config file in Creatio’s root directory stores essential connection parameters, including database and external services. Follow these steps to configure it for PostgreSQL. 

Step 1: Locate the ConnectionStrings.config File 

  1. Navigate to the root directory of your Creatio application, typically found at: 

~\WebAppRoot\Creatio 

  1. Open the ConnectionStrings.config file with a text editor.  

Step 2: Configure the Connection Parameters 

Specify your database and caching server connection details within the section of the file. 

Required Connection Strings 

For Creatio to function correctly, specific connection settings are required: 

  1. PostgreSQL Database Configuration (name=“db”): 

Defines the parameters for the primary database connection. 

<add name="db" connectionString="Server=[Database server name];Port=[Database server port];Database=[Database name];User ID=[PostgreSQL user that will connect to the database];password=[PostgreSQL user password];Timeout=500; CommandTimeout=400;MaxPoolSize=1024;" />
<add name="db" connectionString="Server=**localhost**;Port=**5432**;Database=**creatio**;User ID=**sysadmin\_user**;password=**222222**;Timeout=500; CommandTimeout=400;MaxPoolSize=1024;" /> 
  1. Redis Caching Server Configuration (name=“redis”): 

Specifies the Redis server used for caching. 

<add name="**redis**" connectionString="host=**\[Machine name\]**;db=**\[Redis DB number\]**;port=6379;maxReadPoolSize=10;maxWritePoolSize=500" /> 
<add name="redis" connectionString="host=**localhost**;db=**2**;port=6379" /> 

Replace placeholders ([Database server name], [Database name], etc.) with actual values for your setup. 

Optional ConnectionStrings.config settings

The external service connection parameters are optional. Fill them out only if your Creatio configuration requires it. For example, do that if you want to integrate the version control system. 

<add name="tempDirectoryPath" connectionString=\[Path to the temporary directory the package installation mechanism requires\] /> 
<add name="sourceControlAuthPath" connectionString=\[Path to the authorization data of the version storage system (SVN)\] /> 

Compile & Test

After installation and configuration, make sure to: 

To access Creatio through IIS (Internet Information Services), follow these steps: 

Open IIS: 

Select the application: 

Click the URL: 

Log in: 

Access the main dashboard: 

If your login details are correct, you should be logged into the Creatio application. 

The main dashboard will be displayed, giving you access to your Creatio features and tools. 

If you encounter any issues (like incorrect credentials or access errors), check the server’s IIS settings, ensure the database is correctly connected, and verify that the login details have not been changed from the default. 

  1. Navigate to the System Designer:

    • Click on the gear icon in the top-right corner.

    • Choose System Designer.

  2. Select Compilation:

    • In the System Designer, find the “Compile” option.

    • This will recompile all configuration schemas.

  3. Monitor Progress:

    • The system will show the progress of the compilation.

    • Once completed, you’ll get a notification indicating success or failure.

Conclusion

By following these steps, you’ve successfully set up your local Creatio instance, giving you a powerful environment to develop, test, and refine your applications. With .NET, Clio, PostgreSQL, and IIS configured, and your database restored and connected, your system is ready for productive use. Regular testing and maintenance of this setup will ensure optimal performance, making your local instance a reliable tool in your development workflow.

Tags:

creatio
development
getting-started
best-practices