Getting Started with GeoServer
Learn how to install, configure, and publish your first geospatial layers using GeoServer's enterprise-grade OGC services.
Installation
GeoServer is distributed as a self-contained ZIP archive or via Docker. Choose the method that fits your workflow.
# Download the latest stable release
curl -LO https://sourceforge.net/projects/geoserver/files/geoserver/2.25.3/geoserver-2.25.3-bin.zip
# Extract and navigate
unzip geoserver-2.25.3-bin.zip
cd geoserver-2.25.3/bin
# Start the server
./startup.sh
Once started, GeoServer will be available at http://localhost:8080/geoserver. Default credentials are admin / geoserver.
First Time Configuration
After initial login, GeoServer prompts you to configure:
- Data Directory â Where GeoServer stores layers, styles, and configurations. Use a persistent, backed-up path in production.
- Default Projections â Typically
EPSG:4326(WGS84) andEPSG:3857(Web Mercator) for web mapping. - Global Settings â Contact information, metadata, and logging preferences.
Publishing Your First Layer
GeoServer supports multiple data formats including GeoPackage, PostGIS, Shapefile, and GeoTIFF. Here's how to publish a GeoPackage:
# Upload GeoPackage and create store via REST API
curl -v -u admin:geoserver \
-X POST \
-H "Content-type: application/zip" \
--data-binary @/path/to/dataset.gpkg \
http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/
After upload, navigate to Layer Preview in the web UI to verify rendering. Use the WMS GetMap request to integrate with Leaflet, OpenLayers, or MapLibre.
Working with WMS & WFS
GeoServer implements core OGC standards:
| Service | Purpose | Key Operations |
|---|---|---|
WMS |
Raster map rendering | GetMap, GetFeatureInfo, GetLegendGraphic |
WFS |
Vector feature access | GetFeature, DescribeFeatureType, Transaction |
WCS |
Scientific raster/grids | GetCoverage, DescribeCoverage |
Authentication & Security
GeoServer supports multiple security backends:
- Internal â Built-in user/group database (suitable for small teams)
- LDAP/Active Directory â Enterprise directory integration
- OAuth2 / OIDC â Modern identity providers (Keycloak, Auth0, Azure AD)
- Role-Based Access Control (RBAC) â Fine-grained permissions per workspace, layer, or operation
Configure security via Security â Security Managers. Always enforce HTTPS in production using a reverse proxy (Nginx, Apache, or CloudFlare).
REST API Overview
The GeoServer REST API allows programmatic management of workspaces, stores, layers, and styles. All endpoints return XML or JSON.
# List all layers in a workspace
curl -u admin:geoserver \
-H "Accept: application/json" \
http://localhost:8080/geoserver/rest/layers.json
Refer to the REST API Reference for complete endpoint documentation, request/response schemas, and scripting examples.