Installing GlobalForms on Windows

Install GlobalForms on a Windows server and run it as a Windows service. Setup downloads the current release, connects to MongoDB, creates the first administrator account and starts the service. You can run setup from the GlobalForms Installer, a settings window that also installs Node.js if needed, or from the command line.

This page applies to GlobalForms 10.7.1 and later. Installations of earlier versions used a different installer.

Never run production workloads over HTTP. A new installation answers over HTTP until you add a certificate. Configure HTTPS before anyone uses the server, and give users only the https:// address. See Configuring HTTPS.

Before you begin

  • Confirm the server meets the System Requirements.

  • Install Node.js 24 or later, or let the GlobalForms Installer install it for you. To check an existing installation, run node --version in a new Command Prompt.

  • Install GlobalCapture first. GlobalForms uses the MongoDB server that GlobalCapture installs. Know that server's host name and port and, if used, the MongoDB username and password. GlobalForms creates its own database on it (GlobalForms by default). See System Requirements.

  • Decide on the external URL users will use to reach GlobalForms, for example https://forms.example.com. Users should always reach GlobalForms over HTTPS; see Configuring HTTPS.

  • Sign in to the server with an account that has local administrator rights.

Install with the GlobalForms Installer (recommended)

The GlobalForms Installer runs the same setup as the command-line steps, from one settings window. It installs Node.js if it's missing or too old, checks your settings before anything is changed, and upgrades an existing installation in the same way.

Get the installer

Request the GlobalForms Installer from Square 9 Fulfillment at fulfillment@square-9.com. You receive a zip file containing Install-GlobalForms.cmd and Install-GlobalForms.ps1. Extract the whole zip to a folder on the server; both files must stay in the same folder.

Run the installer

  1. Sign in to the server with a local administrator account and double-click Install-GlobalForms.cmd to start the install. Do not run Install-GlobalForms.ps1 yourself; the CMD file starts it with the right settings. When Windows asks whether to allow the app to make changes, select Yes. A command window opens and shows the progress.

  2. If Node.js 24 or later isn't installed, the installer offers to install the latest Node.js 24 from nodejs.org. Select Yes. It checks the download's SHA-256 checksum before installing it.

  3. The installer checks that the server can reach update.square9.cloud. If it can't, it stops before changing anything.

  4. In the Install GlobalForms window, enter the settings (see the table below) and select Install.

  5. The installer checks your entries, then tries to reach the MongoDB host and port. If MongoDB can't be reached, it asks whether to continue anyway; setup fails if MongoDB is still unreachable.

  6. It downloads the current installer and runs setup without prompts, using your settings. This takes a few minutes.

  7. When setup finishes, the installer shows the status of the GlobalForms service and opens the Forms URL in your browser. Sign in with the admin username, not the email address.

  8. Press any key to close the command window.

Settings

Setting

What to enter

Default

Install folder

The folder to install GlobalForms into. Select Browse to pick one.

C:\GlobalForms

Forms URL

The address users will use to reach GlobalForms, for example https://forms.example.com. Must start with http:// or https://. The default works only on the server itself, until HTTPS is configured.

http://127.0.0.1:3001

MongoDB Host, Port, Database

Your MongoDB server, its port, and the database name for GlobalForms

127.0.0.1, 27017, GlobalForms

MongoDB Username, Password

The MongoDB account, if authentication is enabled. Leave blank otherwise.

(blank)

Root admin Username

The first GlobalForms administrator. Enter gfadmin. You sign in with this name.

root

Root admin Email

The administrator's email address. Required.

(blank)

Root admin Password, Confirm password

At least 8 characters, with an uppercase letter, a lowercase letter, a number and one of !@#$%^&*()-_=+[]{}:,.?

(required)

Select Show advanced settings for these:

Setting

What to enter

Default

Mongo authSource

The database that holds the MongoDB user

admin

Use TLS for MongoDB

Select if your MongoDB server requires encrypted connections

Off

Windows service name

The name of the GlobalForms Windows service

GlobalForms

SSL cert path, SSL key path, SSL cert password

Optional. Your certificate and private key files for HTTPS. The files must exist. You can add these later; see Configuring HTTPS.

(blank)

Release channel

stable, or canary for early-access releases

stable

No setting can start with -- or contain a double quote (").

Upgrade or reinstall with the installer

If the install folder already contains GlobalForms, the window says an existing installation was found, fills in its settings (Forms URL, MongoDB connection, service name, HTTPS certificate settings and release channel), and the button reads Upgrade. The installer replaces the program files and the GlobalForms service, and keeps your settings in config\local.json.

Enter the root admin username, email and password each time. If an administrator with that username already exists, its email and password are set to the values you enter.

Pre-fill the settings (optional)

To prepare the installer for a particular server, add a file named install-defaults.json to the installer folder. Any of these settings pre-fill the window: installPath, domain, mongoHost, mongoPort, mongoDb, mongoUser, mongoPassword, mongoAuthSource, mongoTls, adminName, adminEmail, serviceName, sslCertPath, sslKeyPath, sslCertPassword and channel.

JSON
{
  "installPath": "C:\\GlobalForms",
  "domain": "https://forms.example.com",
  "mongoHost": "db-server",
  "mongoPort": "27017",
  "mongoDb": "GlobalForms",
  "adminEmail": "admin@example.com"
}

Settings found in an existing installation take priority over this file.

If install-defaults.json contains a MongoDB or certificate password, delete the file once GlobalForms is installed.

Install from the command line

  1. Open PowerShell as administrator (right-click PowerShell and select Run as administrator).

  2. Go to a working folder, for example:

    PowerShell
    mkdir C:\Temp\GlobalFormsSetup
    cd C:\Temp\GlobalFormsSetup
    
  3. Download the installer:

    PowerShell
    Invoke-WebRequest "https://update.square9.cloud/globalforms/releases/bootstrap-installer.js" -OutFile ".\bootstrap-installer.js"
    
  4. Run the installer:

    PowerShell
    node .\bootstrap-installer.js
    

    The installer downloads the current Stable release and starts setup.

  5. Answer the setup prompts. Press Enter to accept a default value.

Setup prompts

Prompt

What to enter

Default

Install path

The folder to install GlobalForms into

C:\GlobalForms

External domain URL

The address users will use to reach GlobalForms, for example https://forms.example.com. The default works only on the server itself, until HTTPS is configured.

http://127.0.0.1:3001

Mongo host / port / database

Your MongoDB server, port and the database name for GlobalForms

127.0.0.1 / 27017 / GlobalForms

Mongo username / password

The MongoDB account, if authentication is enabled. Leave blank otherwise.

(blank)

Mongo authSource

The database that holds the MongoDB user

admin

Enable Mongo TLS?

Yes if your MongoDB server requires encrypted connections

No

Root admin name / email

The first GlobalForms administrator account. Enter gfadmin as the name, and the administrator's email. You sign in with the name.

root / root@example.com

Root admin password

At least 8 characters, with an uppercase letter, a lowercase letter, a number and a symbol

(required)

Windows service name / display name

The name of the Windows service

GlobalForms / GlobalForms Forms Server

SSL cert path / key path / cert password

Optional. Your certificate and private key files for HTTPS. You can add these later.

(blank)

Download NSSM automatically if missing?

Yes. GlobalForms uses the NSSM service manager to run as a Windows service.

Yes

Setup checks the MongoDB connection, copies the files, installs required components, writes your settings to config\local.json, creates the administrator account and starts the GlobalForms service. When it finishes, it displays GlobalForms setup completed successfully.

Verify the installation

  1. Confirm the service is running:

    PowerShell
    sc.exe query GlobalForms
    

    The STATE should be RUNNING. You can also check Services for GlobalForms Forms Server.

  2. On the server, open http://localhost:3001/ in a browser. Until HTTPS is configured, GlobalForms answers over HTTP on port 3001; once it is, users reach it at its https:// address. See Configuring HTTPS.

  3. Sign in as gfadmin with the password you entered during setup.

Install without prompts (unattended)

To install from a script, pass the settings as options and add --silent:

PowerShell
node .\bootstrap-installer.js `
  --silent `
  --installPath "C:\GlobalForms" `
  --domain "https://forms.example.com" `
  --mongoHost "db-server" `
  --mongoPort 27017 `
  --mongoDb "GlobalForms" `
  --mongoUser "<MongoDB user>" `
  --mongoPassword "<MongoDB password>" `
  --mongoAuthSource "admin" `
  --adminName "gfadmin" `
  --adminEmail "admin@example.com" `
  --adminPassword "<Admin password>" `
  --sslCertPath "C:\GlobalForms\ssl\forms.example.com.crt" `
  --sslKeyPath "C:\GlobalForms\ssl\forms.example.com.key" `
  --downloadNssm true

Option

Purpose

--silent

Run without prompts. Any option you leave out uses its default.

--serviceName, --serviceDisplayName, --mongoTls, --sslCertPath, --sslKeyPath, --sslCertPassword

Same as the matching setup prompts

--allowExistingInstall true

Required in silent mode to install over an existing installation

--replaceExistingService true

Required in silent mode to replace an existing GlobalForms service

--installerChannel canary

Install the latest Canary (early access) release instead of Stable

If you leave out --adminPassword in silent mode, setup generates a strong password and saves it to generated_password.txt in the install folder. Sign in, change the password, then delete that file.

Reinstalling over an existing installation

If setup finds GlobalForms already installed in the chosen folder, it loads the existing settings as defaults and asks before it overwrites files. Your existing settings are kept in config\local.json. If a GlobalForms service already exists, setup asks whether to replace it.

What gets installed

Location (in the install folder)

Contents

config\local.json

Your server settings. See Configuration Files.

logs\

Service and update logs, including service.err.log

ssl\

Default location for HTTPS certificate files

files\

Uploaded file attachments

backups\

Copies of the previous version, kept by automatic updates

install-info.json

A record of the installed version and settings (no passwords)

The GlobalForms Windows service starts automatically when the server starts.

Troubleshooting

Message or symptom

Cause and fix

Node.js 24+ is required

An older Node.js version is installed. Install Node.js 24 or later, open a new PowerShell window and run setup again.

'node' is not recognized…

Node.js is not on the PATH. Reinstall Node.js with the Add to PATH option, then open a new window.

Setup fails while contacting update.square9.cloud

The server cannot reach the update site. Allow outbound HTTPS to update.square9.cloud and the npm registry, including through any proxy.

Setup fails while connecting to MongoDB

Check the host, port, credentials and authSource, and that a firewall is not blocking the MongoDB port.

Password must be at least 8 characters…

Enter an administrator password that meets the rules shown.

Existing installation detected in silent mode

Add --allowExistingInstall true, or choose a different install path.

Service "GlobalForms" already exists

Add --replaceExistingService true, or choose a different --serviceName.

The service is running but the page does not load

Check logs\service.err.log, and confirm port 3001 is open in Windows Firewall.

GlobalForms Installer messages

Message

Cause and fix

Can't reach https://update.square9.cloud/…

The server can't reach the update site. Allow outbound HTTPS to update.square9.cloud and the npm registry, including through any proxy, then run the installer again.

Node.js was installed but is not on PATH yet

Close the command window and run the installer again.

Node.js 24+ is required

You declined the Node.js installation. Install Node.js 24 or later, or run the installer again and select Yes.

Can't reach MongoDB at <host>:<port> from this server

Check that MongoDB is running, that the host and port are correct, and that no firewall blocks the port.

Admin password does not meet the rules shown under it

Enter a password that meets the rules shown under the password field.

SSL cert not found or SSL key not found

The certificate or key file path is wrong. Correct it, or clear both fields and configure HTTPS later.

Setup exited with code …

Setup failed. The messages above it in the command window say why. Check logs\service.err.log in the install folder.