Configuration
Patchwork is configured through a TOML file. The default configuration can be generated with:
$ pw config
Configuration files are loaded in the following order, with later files overriding earlier ones:
/etc/patchwork.tomlpatchwork.toml(current directory)$PATCHWORK_TOML(environment variable)
Command-line flags take precedence over all configuration files.
Settings Reference
- syslog
- Type:
- bool
- Default:
false
Redirect logging to syslog instead of stderr.
- [database].url
- Type:
- string
- Default:
""
Database connection URL. Supported schemes:
postgres://user:pass@host/dbname?sslmode=disablemysql://user:pass@host/dbnamesqlite:///path/to/file.db
Important
The
userandpassvalues must be URL-encoded. Use thepw config urlcommand to generate valid connection URLs:$ ./pw config url Database type (postgres, mysql, sqlite) [postgres]: mysql Host [localhost]: Port [3306]: Database name [patchwork]: patchwork4 Username [patchwork]: Password: p@tch/w0rk! url = "mysql://patchwork:p%40tch%2Fw0rk%21@localhost/patchwork4"
- [database].auto-sync
- Type:
- bool
- Default:
false
Automatically run pending migrations when the HTTP server starts.
- [database].event-max-age
- Type:
- duration
- Default:
30d
Maximum age of events to keep. Events older than this are deleted when running pw admin gc. Accepts duration suffixes:
s,m,h,d(days) andw(weeks). Set to0sto disable event purging.
- [http].listen
- Type:
- string
- Default:
"127.0.0.1:8080"
HTTP listen address.
- [http].base-url
- Type:
- string
- Default:
""
The public base URL of the Patchwork instance, used for generating links in emails and API responses. Example:
https://patchwork.example.com.
- [http].custom-css
- Type:
- string
- Default:
""
Path to a custom CSS file. It is served after the built-in stylesheet, allowing you to override any default styles. The file is read once at startup.
- Type:
- string
- Default:
""
Path to an HTML file whose content is inserted in the page header, after the navigation bar. Can be used to display a logo, additional links, or a banner. The file is read once at startup.
- Type:
- string
- Default:
""
Path to an HTML file whose content is inserted in the page footer. Can be used for legal notices or organization-specific links. The file is read once at startup.
- [http].web-page-size
- Type:
- int
- Default:
200
Default number of items per page in the web interface. Logged-in users can override this value through their profile settings.
- [http].web-page-max
- Type:
- int
- Default:
500
Maximum number of items per page in the web interface. User profile settings are clamped to this value.
- [http].api-page-size
- Type:
- int
- Default:
30
Default number of items per page in the REST API, used when the
per_pagequery parameter is not specified.
- [http].api-page-max
- Type:
- int
- Default:
250
Maximum number of items per page in the REST API. The
per_pagequery parameter is clamped to this value.
- [ingress].listen
- Type:
- string
- Default:
"127.0.0.1:2525"
SMTP listen address for the ingress daemon.
- [smtp].encryption
- Type:
- enum (
none,starttls,tls) - Default:
none
SMTP encryption mode.
- [smtp].host
- Type:
- string
- Default:
"localhost"
SMTP server hostname.
- [smtp].port
- Type:
- int
- Default:
25
SMTP server port.
- [smtp].user
- Type:
- string
- Default:
""
SMTP authentication username. Leave empty for unauthenticated delivery.
- [smtp].password
- Type:
- string
- Default:
""
SMTP authentication password.
- [smtp].from
- Type:
- string
- Default:
"patchwork@localhost"
Sender email address for outgoing notifications.