Getting Started with GeoServer

Learn how to install, configure, and publish your first geospatial layers using GeoServer's enterprise-grade OGC services.

â„šī¸ Prerequisites
Ensure you have Java 17+ installed and at least 2GB of free RAM. GeoServer runs as a standalone web application or can be deployed to Tomcat, Jetty, or WildFly.

Installation

GeoServer is distributed as a self-contained ZIP archive or via Docker. Choose the method that fits your workflow.

standalone-install.sh
# 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.

âš ī¸ Security Notice
Change the default password immediately after first login. Exposing GeoServer to public networks without authentication poses severe data leakage risks.

First Time Configuration

After initial login, GeoServer prompts you to configure:

  1. Data Directory — Where GeoServer stores layers, styles, and configurations. Use a persistent, backed-up path in production.
  2. Default Projections — Typically EPSG:4326 (WGS84) and EPSG:3857 (Web Mercator) for web mapping.
  3. 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:

publish-layer.curl
# 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
💡 Pro Tip
Enable WFS-T (Transaction) only when necessary. WFS editing operations bypass style rules and can trigger database locks. Use WFS-Transaction with caution in multi-user environments.

Authentication & Security

GeoServer supports multiple security backends:

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.

api-example.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.

📖 Next Steps
Explore Custom Styling with SLD/SLD, PostGIS Integration, or Clustering & Performance Tuning guides to advance your deployment.