Configuration

Pad is designed to work with zero configuration, but offers several ways to customize behavior.

Project File: .pad.toml

Each project has a .pad.toml file in its root directory, created by pad init. This file links the directory to a Pad workspace:

workspace = "my-project"

This is the only setting in .pad.toml — it tells the CLI which workspace this directory belongs to.

Global Config: ~/.pad/config.toml

Server and editor settings are stored in the global config file at ~/.pad/config.toml:

host = "127.0.0.1"
port = 7777
url = ""
editor = ""
log_level = "info"

Settings

KeyDefaultDescription
host127.0.0.1Server bind address
port7777HTTP server port
urlFull base URL override (e.g. https://pad.example.com). When set, the CLI connects to this URL instead of constructing one from host/port.
editor$EDITOREditor for pad item edit command
log_levelinfoLogging verbosity
passwordOptional password for web UI authentication. See Self-Hosting.

Environment Variables

VariableDefaultDescription
PAD_HOST127.0.0.1Server bind address (overrides config)
PAD_PORT7777Server port (overrides config)
PAD_URLFull base URL override (overrides config)
PAD_PASSWORDWeb UI password (overrides config). When set, requires login.
PAD_DB_PATH~/.pad/pad.dbPath to SQLite database file
EDITOREditor for pad item edit command

CLI Flags

pad server start

Start the Pad server manually (usually auto-started):

pad server start --port 8080 --host 0.0.0.0
FlagDefaultDescription
--port7777Server port
--host127.0.0.1Bind address

Workspace Detection

Pad finds your workspace by walking up the directory tree looking for .pad.toml. This means you can run pad commands from any subdirectory:

my-project/
├── .pad.toml          ← workspace link (workspace = "my-project")
├── src/
│   └── (your code)    ← `pad` works here too
└── docs/
    └── (your docs)    ← and here

The SQLite database is stored globally at ~/.pad/pad.db (not in the project directory), so multiple workspaces share a single database.

Precedence

Configuration values are resolved in this order (highest priority first):

  1. CLI flags (--port 8080)
  2. Environment variables (PAD_PORT=8080)
  3. ~/.pad/config.toml settings
  4. Built-in defaults