Client CraftClient Craft HubStart free

Set up appsettings.json

On this page
Updated 24 Nov 20263 min read

Step 2 of the full setup. Choose whether pages open in the Visual Builder and, for Client Craft, where the site keeps its connection secret.

Plan: Visual Builder is free. Client Craft works on all plans, including Free

This page is for websites you host yourself. A few settings live in the website's configuration (appsettings.json, environment variables or your host's settings). The first one applies only if you installed ClientCraft, which includes the Visual Builder. Everything else is optional unless the table says otherwise.

NoteWebsite hosted by Client Craft? Skip this page: we set it up for you.

Before you start #

Step by step #

  1. 1
    ClientCraft only: choose whether the Visual Builder shows on pagesAfter installing, pages still open in Umbraco's own Content view. To have them open in the Visual Builder from the start, set ActiveByDefault:
    json
    1{
    2 "ClientCraft": {
    3 "VisualBuilder": {
    4 "ActiveByDefault": true
    5 }
    6 }
    7}

    Leave it out (or set false) to keep Umbraco's editing until an administrator turns the builder on. This is only the starting value: once an administrator chooses in Settings › Visual Builder, that choice is saved in the site's database and wins over appsettings.json. You turn it on in step 5.

  2. 2
    Choose a folder for the connection secretWhen you connect the site in step 4, Client Craft saves the site's credential on your server. It needs a folder that survives deployments and restarts. Without this setting, connecting stops with secret_storage_not_configured.
    json
    1{
    2 "uCRM": {
    3 "SecretStorage": {
    4 "Provider": "ProtectedFile",
    5 "Directory": "D:\\ClientCraftSecrets\\my-site",
    6 "PersistentVolumeConfirmed": true
    7 }
    8 }
    9}
    • Directory must be a full path outside the website folder, the deployment folder, wwwroot and the temp folder, and not a drive root. It is created with restricted permissions if it doesn't exist.
    • PersistentVolumeConfirmed: true is you confirming the folder is kept across deployments and restarts.
    • Protection is WindowsCurrentUser by default, which only works on Windows. On Linux, or when several servers share the folder, use "Protection": "Certificate" with CertificateThumbprint (and CertificateStoreLocation, default CurrentUser) for a certificate that has a private key.
  3. 3
    Restart the siteSettings are read at start-up, so restart the site after changing them.

Other settings you can change #

SettingPackageWhat it doesDefault
ClientCraft:VisualBuilder:ActiveByDefaultClientCraft, Visual BuilderPages open in the Visual Builder before anyone has chosenfalse
uCRM:SecretStorageClientCraft, CoreWhere the connection secret is kept (step 2)none: required to connect
ClientCraft:KnowledgeHub:CacheSecondsClientCraft, CoreHow long published Knowledge Hub pages are cached on the site, 0 to 3600 seconds60
ClientCraft:LandingPages:LayoutClientCraft, CoreThe layout view landing pages render inside, for example ~/Views/Shared/_Layout.cshtmlThe site root's master template, then a conventional layout
NoteThe uCRM section name comes from Client Craft's earlier product name. It is still the name the packages read.
WarningDon't put a workspace ID or integration key under uCRM in appsettings.json committed to source control. Connecting from the backoffice in step 4 saves the credential in the storage above for you. Hand-configured keys are for advanced setups only; see Install the package.

Advanced: set the connection by hand #

If you manage credentials yourself, put them in server configuration or a secret provider under the uCRM section. Never put them in content, appsettings.json committed to source control, or browser scripts.

json
1{
2 "uCRM": {
3 "TenantId": "<workspace id>",
4 "IntegrationKey": "<from your secret store>",
5 "CrmApiBaseUrl": "https://api.client-craft.com/"
6 }
7}

TenantIdentifier and Tenant are accepted aliases of TenantId; if you set more than one, they must have the same value. CrmApiBaseUrl must be HTTPS (plain HTTP is only accepted for a loopback address during development).

NoteThe section name uCRM is kept for compatibility with earlier installations. It does not mean you need the legacy uCRM package.

What happens next #

Next step: Add Client Craft to your layout.

More detail: Turn the Visual Builder on for a site.

Was this article helpful?