Skip to main content
Paperclip configuration is managed through a combination of config files and environment variables.

Configuration Methods

Interactive CLI

Use the CLI for guided configuration:

Config File

Configuration is stored in:
Override with:

Environment Variables

Environment variables override config file settings. Useful for containerized deployments.

Deployment Configuration

Deployment Mode

Two modes: local_trusted and authenticated Environment:
Config file:

Exposure Policy

For authenticated mode: private or public Environment:
Config file:

Server Host and Port

Environment:
Config file:

UI Serving

Control whether the API server serves the UI: Environment:
Config file:

Database Configuration

Database Mode

Two modes: embedded-postgres (default) or postgres Config file:
Environment (overrides config):

Embedded PostgreSQL Settings

Config file:
See Database Setup for more details.

Secrets Configuration

Secrets Provider

Available providers: local_encrypted Environment:
Config file:

Strict Mode

Prevent inline secrets in environment variables: Environment:
Config file:
In strict mode, sensitive keys (*_API_KEY, *_TOKEN, *_SECRET) must use secret references.

Master Key Configuration

Via environment (raw key):
Via file path:
See Security for key management best practices.

Storage Configuration

Storage Provider

Available providers: local_disk, s3 Environment:
Config file:

Local Disk Storage

Environment:
Config file:

S3 Storage

Environment:
Config file:

Authentication Configuration

Base URL Mode

Two modes: auto or explicit Environment:
Config file:
Recommendations:
  • auto: Private network deployments (Tailscale, VPN)
  • explicit: Internet-facing deployments

Allowed Hostnames

For multi-domain access: Environment:
Config file:
Add via CLI:

Instance Configuration

Instance Home

Base directory for all instance data:

Instance ID

Run multiple isolated instances:
Data is stored in $PAPERCLIP_HOME/instances/$PAPERCLIP_INSTANCE_ID/.

Instance Config Path

Direct path to config file:

Runtime Features

Heartbeat Scheduler

Controls scheduled agent heartbeats: Environment:
Defaults:
  • Enabled: true
  • Interval: 30 seconds (minimum 10 seconds)
See server/src/config.ts:186.

Company Deletion

Enable/disable company deletion: Environment:
Defaults:
  • local_trusted: enabled
  • authenticated: disabled
See server/src/config.ts:146.

Configuration Priority

Settings are resolved in this order (highest priority first):
  1. Environment variables
  2. Config file (~/.paperclip/instances/default/config.json)
  3. Default values

Full Configuration Reference

See server/src/config.ts:31 for the complete Config interface:

Validation

Validate configuration:
Auto-repair issues:

Examples

Local Development

Private Network (Tailscale)

Production (Internet-Facing)

Next Steps

Database Setup

Configure PostgreSQL and run migrations

Security

Secure your deployment with best practices