Configuration Files

GlobalForms reads its server settings from two files in the config folder of the install directory (C:\GlobalForms\config by default). This page explains which file to edit and how to apply changes.

The two configuration files

File

Purpose

Edit it?

default.json

The built-in defaults for every setting. Replaced with a new copy each time GlobalForms is updated.

No. Any change is lost at the next update.

local.json

Your settings for this server. Created by setup and kept as-is during updates.

Yes. Make all changes here.

Always make changes in local.json. Never edit default.json.

How the files combine

When GlobalForms starts, it reads default.json first and then applies local.json on top of it:

  • A setting in local.json replaces the same setting in default.json.

  • A setting you leave out of local.json keeps its default value.

  • Within a section (an object in { }), you only need to include the settings you want to change. The rest of that section keeps its defaults.

  • A list (an array in [ ]) is replaced as a whole. Include every entry you want, not just the new ones.

For example, this local.json changes only the HTTP port and turns on request logging. Every other setting keeps its default:

JSON
{
  "port": 3005,
  "settings": {
    "logging": {
      "request": {
        "enabled": true
      }
    }
  }
}

On servers upgraded from earlier versions, local.json may already contain a full copy of every setting. That is expected and works the same way.

What setup writes to local.json

Setting

Description

domain

The external URL users use to reach GlobalForms

mongo

The MongoDB connection string

mongoSecret, jwt.secret

Security keys generated for this server. Keep them private and do not change them.

updater

Automatic update settings. See Automatic Updates.

ssl

HTTPS certificate file locations. See Configuring HTTPS.

Change a setting

  1. Make a backup copy of config\local.json.

  2. Open config\local.json in a text editor, such as Notepad, running as administrator.

  3. Add or change the setting. Keep the file valid JSON:

    • Put names and text values in double quotes: "domain": "https://forms.example.com".

    • Separate settings with commas, with no comma after the last setting in a section.

    • Write each backslash in a Windows path twice: "C:\\certs\\server.crt".

  4. Save the file.

  5. Restart the GlobalForms service. In PowerShell as administrator:

    PowerShell
    Restart-Service GlobalForms
    

    Or open Services, right-click GlobalForms Forms Server and select Restart.

Changes take effect only after the service restarts.

Common settings

Setting

Default

Description

domain

http://127.0.0.1:3001

External URL of the server

port

3001

HTTP port

sslPort

5454

HTTPS port

host

(all network interfaces)

Optional. Limit GlobalForms to one IP address on the server.

mongo

mongodb://127.0.0.1:27017/GlobalForms

MongoDB connection string. See Database Configuration.

ssl.certPath, ssl.keyPath, ssl.certPassword

ssl\server.crt, ssl\server.key

HTTPS certificate and key. See Configuring HTTPS.

updater

(updates on, Stable channel)

See Automatic Updates.

jwt.expireTime

240

Minutes before a signed-in session expires

permanentlyDeleteSubmissions

false

See Deleting Submissions.

addHeaders

(security headers)

See Security Headers.

oidc

(not configured)

Single sign-on. See Single Sign-On with OpenID Connect.

s9im

(disabled)

See Square 9 Identity Manager (S9IM) Synchronization.

settings.fileEndpoints

(uploads allowed)

See File Upload Restrictions.

settings.logging.request

(off)

See Request Logging.

Troubleshooting

Symptom

Cause and fix

The service stops right after you restart it

local.json is probably not valid JSON. Check logs\service.err.log, fix the file (look for a missing or extra comma or quote), or restore your backup copy.

A change has no effect

Confirm you edited local.json, not default.json, that the setting name and section match exactly, and that you restarted the service.

A change disappeared after an update

It was made in default.json. Move it to local.json.