Configuration File Reference#
Complete reference for GeoServer CLI TOML configuration files.
File Location#
Configuration files are located in the configs/ directory:
| |
File Format#
Configuration files use TOML (Tom’s Obvious Minimal Language) format.
GeoServer Section#
[geoserver]#
GeoServer REST API connection settings.
| |
Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | Yes | - | GeoServer REST API base URL |
username | string | Yes | - | HTTP Basic Auth username |
password | string | No | "" | HTTP Basic Auth password |
timeout | duration | No | “30s” | HTTP request timeout |
PostGIS Section#
[postgis]#
PostGIS database connection settings (optional, used for publishing workflows).
| |
Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
host | string | Yes* | - | Database hostname |
port | integer | No | 5432 | Database port |
database | string | Yes* | - | Database name |
user | string | Yes* | - | Database username |
password | string | No | "" | Database password |
schema | string | No | “public” | Schema for table discovery |
sslmode | string | No | “disable” | PostgreSQL SSL mode |
*Required when using PostGIS publishing commands.
Complete Example#
| |
File Permissions#
For security, configuration files should have restrictive permissions:
| |
The config validate command checks file permissions and warns if they’re too permissive.
Comments#
TOML supports comments using #:
| |
Multi-Line Strings#
For long values, use triple quotes:
| |
Environment Variable Overrides#
All configuration values can be overridden by environment variables. See Environment Variables for details.
Validation#
Validate configuration files:
| |
Checks performed:
- Required fields present
- TOML syntax valid
- File permissions secure
- Value formats correct
Initialization#
Create a new configuration file from template:
| |
This creates a file with all available settings and helpful comments.