Configuration

CBSMembers reads a single JSON file at startup. This file tells it where the database is, where to store generated documents, how to encrypt bank details, and how to send email.

File location

Platform Path
Windows %AppData%\CBSMembers\config.json
macOS ~/.config/CBSMembers/config.json

Create the folder if it doesn't exist. The file must be named exactly config.json.

Config file generator

Fill in the fields below and copy the result into your config file — you don't need to edit JSON by hand.

Note: the generator runs entirely in your browser. Nothing is sent to a server.

Database
Storage (MinIO — optional)

Leave blank if you are not using the member portal or don't want PDFs stored for download.

Bank encryption (optional)

Paste a Base64 key here, or leave blank to store bank details unencrypted.

config.json

Full example

{
  "Database": {
    "ConnectionString": "Host=10.0.0.1;Port=5432;Database=cbsmembers;Username=cbs_app;Password=your_password"
  },
  "Storage": {
    "Endpoint": "http://10.0.0.1:9000",
    "BucketName": "cbsmembers",
    "AccessKey": "your_access_key",
    "SecretKey": "your_secret_key"
  },
  "BankEncryption": {
    "Key": "base64-encoded-32-byte-key"
  }
}

Sections

Database

The ConnectionString connects CBSMembers to your PostgreSQL server.

Field Description
Host IP address or hostname of your PostgreSQL server
Port PostgreSQL port — usually 5432
Database Database name — usually cbsmembers
Username Database user — usually cbs_app
Password Database password

Your administrator will provide these values.

Storage

CBSMembers stores generated PDFs (share certificates, dividend statements, member statements) in a MinIO object store. This section is optional — if omitted, PDF generation still works but files won't be stored for portal download.

Field Description
Endpoint URL of your MinIO server, e.g. http://10.0.0.1:9000
BucketName MinIO bucket name, e.g. cbsmembers
AccessKey MinIO access key
SecretKey MinIO secret key

BankEncryption

Member bank details (account numbers and sort codes) are encrypted at rest using AES-256-GCM. This section is optional — if omitted, bank details are stored in plain text.

The Key is a 32-byte value encoded as Base64. Generate one with:

openssl rand -base64 32

Keep this key safe. If you lose it, encrypted bank details cannot be recovered. All machines running CBSMembers for the same database must use the same key.

Checking your config

If the config file is missing or the database connection fails, CBSMembers will show an error on startup. Check that:

  1. The file is in the correct location and named config.json
  2. The database server is reachable from your machine (VPN if needed)
  3. The username and password are correct
  4. The database name exists