Skip to main content

Overview

The onboard command provides an interactive setup wizard that guides you through configuring your Paperclip instance for the first time. It configures database, LLM providers, logging, server settings, storage, and secrets management.

Syntax

Options

--config <path>

Path to config file to create or update. Default: ~/.paperclip/instances/default/config.json

--data-dir <path>

Paperclip data directory root. Isolates state from ~/.paperclip.

--yes / -y

Accept all defaults (quickstart mode). Skips all prompts and starts immediately.
Behavior:
  • Uses Quickstart defaults
  • Skips setup mode selection
  • Automatically starts Paperclip after configuration

--run

Start Paperclip immediately after saving config.

Setup Modes

When running without --yes, you’ll be prompted to choose a setup path: Automatically configures:
  • Database: Embedded PostgreSQL on port 54329
  • Logging: File-based logs in ~/.paperclip/instances/<id>/logs
  • Server: Local trusted mode on 127.0.0.1:3100
  • Storage: Local disk in ~/.paperclip/instances/<id>/data/storage
  • Secrets: Local encrypted with auto-generated key
  • LLM: Not configured (can add later)

Advanced Setup

Provides interactive prompts for each configuration section:
  1. Database - Choose between embedded PostgreSQL or managed Postgres
  2. LLM Provider - Configure Claude or OpenAI (optional)
  3. Logging - File-based or console logging
  4. Server - Deployment mode, exposure, host, and port
  5. Storage - Local disk or S3-compatible storage
  6. Secrets - Encryption settings and key management

Interactive Workflow

1. Introduction

2. Setup Mode Selection

3. Configuration (Advanced mode)

Database Configuration

Prompts for database mode:
  • embedded-postgres - Built-in PostgreSQL (no external database needed)
  • postgres - Connect to external PostgreSQL instance
If selecting postgres, you’ll provide:
  • Connection string (e.g., postgres://user:pass@host:5432/dbname)
  • Connection is tested automatically

LLM Provider Configuration

Optional LLM configuration:
  • Provider: Claude or OpenAI
  • API Key: Your provider API key
  • Validation: Key is tested against provider API

Logging Configuration

Configure where logs are written:
  • Mode: file or console
  • Log directory: Path for file mode (default: ~/.paperclip/instances/default/logs)

Server Configuration

Server and auth settings: Deployment Mode:
  • local_trusted - No authentication, local development
  • authenticated - Full authentication required
Exposure:
  • private - Only allowed hostnames (authenticated mode)
  • public - Open access
Network:
  • Host: IP address to bind (default: 127.0.0.1)
  • Port: HTTP port (default: 3100)
Additional:
  • Serve UI: Whether to serve web UI from the server
  • Allowed hostnames: List of allowed client hostnames (authenticated/private only)

Storage Configuration

Configure where files are stored: Providers:
  • local_disk - Store files on local filesystem
  • s3 - Use S3 or S3-compatible storage
Local disk options:
  • Base directory: Path for file storage
S3 options:
  • Bucket: S3 bucket name
  • Region: AWS region
  • Endpoint: Custom endpoint (for S3-compatible services)
  • Prefix: Optional object key prefix
  • Force path style: Enable for non-AWS S3 providers

Secrets Configuration

Secrets encryption settings (uses local encrypted provider by default):
  • Provider: local_encrypted
  • Strict mode: Require secret refs for sensitive environment keys
  • Key file: Path to master encryption key (auto-generated)

4. Agent JWT Secret

A JWT secret is automatically generated or reused:
This secret is required for local adapter authentication.

5. Secrets Key File

If using local encrypted secrets, a master key is generated:
Keep this key secure! It encrypts all secrets in your instance. Back it up safely.

6. Configuration Summary

7. Next Steps

8. Bootstrap CEO Invite (Authenticated mode only)

If you selected authenticated deployment mode, a bootstrap invite is generated:
Use this URL to create the first admin user.

9. Start Paperclip Prompt

Unless running with --yes or --run, you’ll be asked:
Selecting “Yes” runs paperclipai run automatically.

Examples

Quickstart with defaults

Fully automated setup

Advanced configuration

Custom config location

Custom data directory

Onboard and start immediately

Configuration File

The onboard command creates a config.json file with this structure:

Updating Existing Configuration

If a config file already exists, onboard will update it:
Your choices will merge with or replace existing settings.
If the existing config is invalid, you’ll see a warning but can proceed to fix it.

Validation

Database Connection Test

When configuring external Postgres, the connection is tested:
Or if it fails:

API Key Validation

LLM provider API keys are validated: Claude:
  • Tests against https://api.anthropic.com/v1/messages
  • Validates with a minimal request
OpenAI:
  • Tests against https://api.openai.com/v1/models
  • Validates authentication
Results:
Or:

Troubleshooting

Port already in use

If the default port 3100 is occupied:
  1. Choose a different port during advanced setup
  2. Or change it later:

Database connection fails

For external Postgres:
  1. Verify connection string format:
  2. Check network access and credentials
  3. Run doctor to diagnose:

Invalid API key

If LLM API key validation fails:
  1. Double-check the key from your provider
  2. Update later using:

Permission denied

If you can’t write to default paths:
  1. Use a custom data directory:
  2. Or run with appropriate permissions

Next Steps

After onboarding:

Run Paperclip

Start your configured instance

Verify setup

Run diagnostic checks

Update config

Modify configuration sections