Command Line Interface
Manage geospatial infrastructure, deploy layers, sync spatial data, and configure your GeoServer instances directly from the terminal.
Authentication
Authenticate with your GeoServer workspace and store a local session token.
geoserver login [workspace] [flags]
| Flag | Description |
|---|---|
-u, --user | Username for workspace authentication |
-p, --password | API key or password (prompts if omitted) |
--env | Target environment (dev, staging, prod) |
geoserver login mapping-prod -u admin --env production
Clear locally stored authentication tokens and session data.
geoserver logout [flags]
| Flag | Description |
|---|---|
--all | Clear tokens for all configured workspaces |
geoserver logout --all
Projects & Workspaces
Initialize a new geospatial project with default layer groups and rendering configs.
geoserver project create [name] [flags]
| Flag | Description |
|---|---|
--template | Project template (base-map, vector-tiles, raster-pipeline) |
--workspace | Target workspace ID |
--srs | Default coordinate reference system (e.g., EPSG:4326) |
geoserver project create us-transport --template vector-tiles --srs EPSG:3857
Display all active projects with status, layer count, and storage usage.
geoserver project list [flags]
| Flag | Description |
|---|---|
--json | Output results in JSON format |
--status | Filter by status (active, paused, syncing) |
geoserver project list --status active --json
Deployment & Layers
Publish configured layers, styles, and services to the target environment.
geoserver deploy [project] [flags]
| Flag | Description |
|---|---|
--force | Overwrite existing layers without confirmation |
--dry-run | Validate deployment config without pushing changes |
--layers | Comma-separated list of specific layers to deploy |
geoserver deploy urban-planning --layers roads,buildings,parcels
Revert layers and configurations to a previous deployment version.
geoserver rollback [project] [flags]
| Flag | Description |
|---|---|
--version | Specific deployment hash or timestamp to revert to |
--confirm | Skip interactive confirmation prompt |
geoserver rollback urban-planning --version v2.4.1 --confirm
Data Ingestion & Sync
Import spatial datasets (GeoJSON, Shapefile, GeoTIFF, PostGIS) into the workspace.
geoserver data ingest [path] [flags]
| Flag | Description |
|---|---|
--format | Source format override (geojson, shp, tif, pg) |
--srs | Input coordinate reference system |
--batch | Process large files in chunks for memory efficiency |
geoserver data ingest ./satellite/radar_2024.tif --format tif --batch
Update existing layers with new data from connected sources or scheduled pipelines.
geoserver data sync [layer-id] [flags]
| Flag | Description |
|---|---|
--full | Replace entire dataset instead of incremental update |
--wait | Block until sync completes and validate checksums |
geoserver data sync layer-8f2a --wait
Configuration & Status
Update instance settings, cache policies, and OGC service parameters.
geoserver config set [key] [value] [flags]
| Flag | Description |
|---|---|
--global | Apply setting across all workspaces |
--reload | Trigger service restart after applying changes |
geoserver config set wms.max_width 4096 --reload
Check system health, active connections, layer render counts, and cache hit rates.
geoserver status [flags]
| Flag | Description |
|---|---|
--verbose | Show detailed node metrics and thread pools |
--watch | Stream live metrics to terminal |
geoserver status --watch