23. Skip to content

23. GeoServer Guide

Note: For installation instructions, refer to GeoServer Installation Guide.

23.1 Using the Kartoza GeoSpatialHosting Dashboard

After your service has finished setting up, you will be redirected to the Hosted Services page of the GeoSpatial Hosting Dashboard. Here, you can view all your purchased services.



To access your login credentials:

  1. Click the Get Credentials button under your hosted service.

  2. Your credentials will be copied to your clipboard.

    Hint: Paste and save your credentials in a secure location.

  3. Click the application name you selected for your GeoServer instance to open it.



To delete a hosted service:

  1. Click the 3 dots in the corner of the hosted service pane.

  2. From the dropdown menu, select Delete.


⚠️ IMPORTANT

Deleting a hosted service is permanent. All associated data will be irreversibly removed with no option for recovery.


23.2 Getting Started

23.2.1 Using the web administration interface

GeoServer includes a browser-based web administration interface that allows users to configure all aspects of the server — from adding and publishing data to adjusting service settings.


You can access the interface in two ways:

  1. Via direct URL

    Open your browser and navigate to:

    http://<application_name>.sta.do.kartoza.com/geoserver
    


  2. Via the GeoSpatial Hosting Dashboard

    Click the application name you selected for your GeoServer instance.


Once opened, the interface displays the Welcome page, which includes links to GeoServer’s various web services. These service URLs can be copied and pasted into desktop GIS software (e.g. QGIS), mobile apps, and web mapping applications. This allows your spatial data to be served and consumed in multiple environments.


Welcome Page
Image credit: GeoServer


Note: For more details, refer to the Welcome section of the official GeoServer documentation.


23.2.2 Logging In

To modify server settings or configure spatial data in GeoServer, you must first log in using the administrator credentials.


To log in:

  1. Navigate to the top-right corner of the web interface.

  2. Click the Login button.

  3. Enter the credentials you generated earlier from the GeoSpatialHosting Dashboard:

    • Username: admin
    • Password: GeoServer_Admin_Password


    Login
    Image credit: GeoServer


    Hint: Need help finding your credentials? See the section: Using the Kartoza GeoSpatialHosting Dashboard

    Note: You can change login details later under the Security section of the GeoServer documentation.


Once logged in, the Welcome screen expands to show administrative functions — these are primarily accessible through the navigation menu on the left-hand side.


Additional options when logged in
Image credit: GeoServer


Note: For additional information, visit the Logging In section of the GeoServer documentation.


23.2.3 Layer Preview

The Layer Preview page provides a quick way to view the output of published layers.

  1. Click the Layer Preview link in the menu to access this page.


    Layer Preview List
    Image credit: GeoServer


  2. Locate the layer you want to preview and click a link under the desired output format. For example, clicking the OpenLayers link will display a preview of that layer.


  3. To sort any column alphabetically, simply click on the column header.


    Unsorted (left) and sorted (right) columns
    Image credit: GeoServer


  4. Use the search box to filter the list of items — especially helpful when working with data types that include many layers. Enter your search term and press Enter. GeoServer will display a filtered list of items matching your query.


    Search results
    Image credit: GeoServer


Hint: For an exact match, enclose your search term in quotes or double quotes. For instance, ads would match roads, but "ads" would only match the exact term.


Note: Sorting and searching functions are available on all data configuration pages..

Note: For additional details, see the full Layer Preview documentation.


23.3 Publishing a Layer

This tutorial guides you through the steps to publish a layer using GeoServer.

Note: This tutorial assumes GeoServer is running at http://<application_name>.sta.do.kartoza.com/geoserver.


23.3.1 Data Preparation

Before publishing data in GeoServer, we need to gather and prepare a few shapefiles. In this tutorial, we’ll use four small-scale 1:110m datasets from Natural Earth.


  1. Download Datasets

    Click the links below to download the .zip archives containing the shapefiles:


  2. Organize Files

    After downloading, unzip each file and move the extracted files into a single folder called: NaturalEarth


    Hint: Keep your folder structure tidy — it’ll help later when uploading or referencing your data in GeoServer.



23.3.2 Adding data to your File Browser

In order for the data to be accessible in the Web Administration Interface, it first needs to be added to your File Browser.


To add data:

  1. Open the file browser at:

    http://<application_name>.sta.do.kartoza.com/file
    


  2. Log in using the credentials you retrieved from the GeoSpatialHosting Dashboard:

    • Username: admin
    • Password: FB_Password_Unhashed


    File Browser Login
    Image credit: GeoServer


    Hint: Need help finding your credentials? See the section: Using the Kartoza GeoSpatialHosting Dashboard


  3. Double-click the geoserver_user_data folder to enter it.


  4. Click the Upload button at the top-right of the screen. When prompted, select Folder.


    File Browser Upload
    Image credit: GeoServer


  5. Locate and upload the NaturalEarth folder you previously prepared.

The data will now be accessible in the Web Administration Interface.


23.3.3 Creating a New Workspace

The next step is to create a workspace for your layers. A workspace is essentially a container used to organize and group related layers within GeoServer.

Note This step is optional if you prefer to use an existing workspace. Typically, a new workspace is created for each project, allowing you to group related stores and layers together.


  1. Open a web browser and navigate to:

    http://<application_name>.sta.do.kartoza.com/geoserver
    


  2. Log in to GeoServer using your credentials.


  3. In the left-hand menu, go to Data → Workspaces.


    Workspace
    Image credit: GeoServer


  4. Click the Add new workspace button to open the New Workspace page.


  5. Complete the form with the following details:

    Field Value
    Name tutorial
    Namespace URI http://<application_name>.sta.do.kartoza.com/geoserver/tutorial


    Note: The workspace name should describe your project. It must be 10 characters or fewer and cannot contain spaces.

    Note: The Namespace URI can be any URL-like string tied to your project. It typically includes a trailing identifier that reflects the workspace. This URI does not need to resolve to a real web address.


  6. Click the Save button.


    Save
    Image credit: GeoServer


  7. The tutorial workspace should now appear in the Workspaces list.


    Update Workspace list
    Image credit: GeoServer


Note: For more information, see the full Workspaces documentation.


23.3.4 Creating a Store

Once the workspace is set up, the next step is to add a new store. A store tells GeoServer how to connect to the data.


  1. Navigate to Data → Stores.


    Store
    Image credit: GeoServer


  2. To add the layer, click the Add new Store button. This will take you to a list of data sources supported by GeoServer.

    Note: Keep in mind that this list is extensible, so yours might look slightly different.


  3. From the list of Vector Data Sources, find and click the Shapefile option.


    Vector Data Sources
    Image credit: GeoServer


  4. Fill in the following fields:

    Field Value
    Workspace tutorial
    Data Source Name Natural Earth - Coastlines
    Description Shapefile of Natural Earth Coastlines data


  5. Under Shapefile location, enter the following:

    file:///files/geoserver_user_data/NaturalEarth/ne_110m_coastline/ne_110m_coastline.shp
    


    New Vector Data Source
    Image credit: GeoServer


  6. Press Save. You will be redirected to the New Layer page.


Note: For more information, see the full Stores documentation.


23.3.5 Creating a Layer

Now that we've connected to the store, we can proceed to publish a layer.


  1. In the New Layer page, click Publish next to the ne_110_coastline layer name.


    New Layer Page
    Image credit: GeoServer


  2. The Edit Layer page defines the data and publishing parameters for the layer.


    Edit Layer Page
    Image credit: GeoServer


  3. Three key sections on the Data tab must be completed before saving:

    • Basic Resource Info – defines how the layer is presented
    • Coordinate Reference System – determines how spatial data is interpreted
    • Bounding Boxes – establishes the dataset's geographic extent


  4. In the Basic Resource Info section, enter the following:

    Field Value
    Name Coastline
    Title Coastline


    Note: While GeoServer allows flexible naming, many external protocols require simple, standard layer names.


    Basic Resource Info Section
    Image credit: GeoServer


  5. Verify that the Coordinate Reference System (CRS) information is accurate:

    Field Value
    Native SRS EPSG:4326
    Declaired SRS EPSG:4326
    SRS Handling Force declared


    Coordinate Reference System Section
    Image credit: GeoServer


  6. In the Bounding Boxes section, click Compute from data, then Compute from native bounds to auto-fill the bounding box fields.


    Bounding Boxes Section
    Image credit: GeoServer


  7. Click Apply to save your progress without closing the page.

    Hint: This is useful to confirm that all required fields are correctly filled; GeoServer will show a warning if anything is missing.


  8. Scroll to the top and go to the Publishing tab.


  9. Under WMS Settings, set the Default Style to line.


    WMS Settings
    Image credit: GeoServer


  10. Click Save to finalize the layer configuration and publish the layer.


    Published Layer
    Image credit: GeoServer


Note: For more information, see the full Layers documentation.


23.3.6 Previewing the layer

To confirm that the tutorial:Coastline layer has been published successfully, we can preview it in GeoServer.


  1. Go to Data → Layer Preview and locate the tutorial:Coastline layer.


    Layer Preview
    Image credit: GeoServer


    Note: To filter results and make it easier to find, type tutorial in the search field.


  2. Click the OpenLayers link in the Common Formats column.


  3. An OpenLayers map will open in a new tab, displaying the shapefile data with the default line style.


  4. You can interact with the preview map by zooming, panning, and clicking on features to view their attribute data.


    OpenLayers Map
    Image credit: GeoServer


Note: For more information, see the full Layer Preview documentation.


23.3.7 Try it Yourself

Now that you've published a layer, try doing the same with the Countries layer.

You've already added it to your File Browser and created the tutorial workspace, so you can skip those steps. All that's left is to:

  1. Set up a new data store for the Countries Shapefile.
  2. Publish the Countries layer.
  3. Preview your published layer

23.4 Publishing an Image

This tutorial outlines the process of publishing a World File and its accompanying image using GeoServer.

Note: This tutorial assumes GeoServer is accessible at http://<application_name>.sta.do.kartoza.com/geoserver.


23.4.1 Data Preparation

Begin by gathering the data we'll publish. For this tutorial, we’ll use the Natural Earth 1:50m Shaded Relief raster.


  1. Download Datasets

    Click the link below to download the .zip archive containing the raster files:


    The download includes small-scale 1:50m raster data consisting of:

    • SR_50M.prj
    • SR_50M.README.html
    • SR_50M.tfw
    • SR_50M.tif
    • SR_50M.VERSION.txt


    Note: These files together represent a world file (.tfw) and its associated image (.tif).


  2. Organize Files

    After downloading, unzip the file and move the extracted files into a new folder called: NaturalEarth_Raster


  3. Add Files to File Browser

    Upload the NaturalEarth_Raster folder into the geoserver_user_data folder within the File Browser.


    Hint: Not sure how to add files to your File Browser? See the section: Adding data to your File Browser


23.4.2 Creating a New Workspace

The next step is to create a workspace for your layers. A workspace is essentially a container used to organize and group related layers within GeoServer.

Note: This step is optional if you prefer to use an existing workspace. Typically, a new workspace is created for each project, allowing you to group related stores and layers together.


  1. Open a web browser and navigate to:

    http://<application_name>.sta.do.kartoza.com/geoserver
    


  2. Log in to GeoServer using your credentials.


  3. In the left-hand menu, go to Data → Workspaces.


    Workspaces
    Image credit: GeoServer


  4. Click the Add new workspace button to open the New Workspace page.


  5. Complete the form with the following details:

    Field Value
    Name tutorial_image
    Namespace URI http://<application_name>.sta.do.kartoza.com/geoserver/tutorial_image


    Note: The Namespace URI can be any URL-like string tied to your project. It typically includes a trailing identifier that reflects the workspace. This URI does not need to resolve to a real web address.


  6. Click the Save button.


    New Workspaces Page
    Image credit: GeoServer


  7. The tutorial_image workspace will now appear in the Workspaces list.


    New Workspaces List
    Image credit: GeoServer


Note: For more information, see the full Workspaces documentation.


23.4.3 Creating a Store

Once the workspace is set up, the next step is to add a new store. A store tells GeoServer how to connect to the data.


  1. Go to Data → Stores.


    Stores Page
    Image credit: GeoServer


  2. To add the image, click the Add new Store button. This will take you to a list of data sources supported by GeoServer.

    Note: Your list may vary depending on installed extensions.


  3. From the Raster Data Sources, click the WorldImage option.


    Raster Data Sources
    Image credit: GeoServer


  4. Fill in the Basic Store Info section:

    Field Value
    Workspace tutorial_image
    Data Source Name ShadedRelief
    Description Grayscale shaded relief of land areas.


    Note: This information is used internally in GeoServer. Keep the name simple, as it will form part of folder names in the data directory and should comply with your operating system’s character restrictions.


    Basic Store Info Section
    Image credit: GeoServer


  5. Under URL, specify the location of your image:

    file:///files/geoserver_user_data/NaturalEarth_Raster/SR_50M/SR_50M.tif
    


    Connection Parameters
    Image credit: GeoServer


  6. Press Save. You will be redirected to the New Layer page to begin publishing your image as a layer.


Note: For more information, see the full Stores documentation.


23.4.4 Creating a Layer

With the image store created, the next step is to publish it as a layer.


  1. In the New Layer page, click Publish next to the SR_50M layer name.


    New Layer Page
    Image credit: GeoServer


  2. The Edit Layer page will open, allowing you to define both data and publishing parameters.


    Edit Layer Page
    Image credit: GeoServer


  3. Three key sections on the Data tab must be completed before saving:

    • Basic Resource Info - Describes how the layer appears to users.
    • Coordinate Reference System (CRS) - Defines how spatial data aligns with the Earth.
    • Bounding Boxes - Determines the spatial extent of the data.


  4. In the Basic Resource Info section, enter the following:

    Field Value
    Name shaded
    Title Shaded Relief
    Abstract Grayscale shaded relief of land areas.


    Note: While GeoServer allows flexible naming, many external protocols require simple, standard layer names.


    Basic Resource Info section
    Image credit: GeoServer


  5. Verify that the Coordinate Reference System (CRS) information is accurate:

    Field Value
    Native SRS EPSG:4326
    Declaired SRS EPSG:4326
    SRS Handling Force declared


    Coordinate Reference System Section
    Image credit: GeoServer


  6. In the Bounding Boxes section, click Compute from data, then Compute from native bounds to auto-fill the bounding box fields.


    Bounding Boxes Section
    Image credit: GeoServer


  7. Click Apply to save your progress without closing the page.

    Note: This is useful to confirm that all required fields are correctly filled; GeoServer will show a warning if anything is missing.


  8. Scroll to the top and go to the Publishing tab.


  9. Under WMS Settings, set the Default Style to raster.


    WMS Settings
    Image credit: GeoServer


  10. Click Save to finalize the layer configuration and publish the layer.


    Layers Page
    Image credit: GeoServer


Note: For more information, see the full Layers documentation.


23.5 Publishing a Layer Group

Note: This tutorial assumes GeoServer is accessible at http://<application_name>.sta.do.kartoza.com/geoserver.


23.5.1 Data preparation

Before we can publish a layer group, we need to ensure the required data is available.


Complete the following previous tutorials to prepare the necessary layers:

  1. Publishing a Layer — defines the tutorial:Coastline layer.

  2. Publishing an Image — defines the tutorial_image:shaded layer.


23.5.2 Creating a layer group

Now that we have the necessary layers published, we can group them together into a single map view using a layer group.


  1. Navigate to the Data → Layer Groups page.


    Layer Groups
    Image credit: GeoServer


  2. This page displays a list of existing layer groups along with the workspace each belongs to.

    Note: Layer groups can be global, allowing you to combine layers from multiple workspaces into one visual representation.


  3. At the top of the Layer Groups list, click Add new layer group to open the Layer Group editor.


    Layer Group editor
    Image credit: GeoServer


  4. The Layer Group editor includes the following sections:

    • Basic Resource Info – defines how the layer group is presented externally
    • Coordinate Reference System – determines how the data is geospatially projected
    • Bounding Boxes – indicates the spatial extent of the group
    • Layers – lists the individual layers included, in the order they are drawn


  5. In the Basic Resource Info section, enter the following:

    Field Value
    Name basemap
    Title Basemap
    Abstract Plain basemap suitable as a backdrop for geospatial data.
    Workspace tutorial


    Basic Resource Info section
    Image credit: GeoServer


  6. Scroll down to the Layers list, which will initially be empty.


    Layers list
    Image credit: GeoServer


  7. Click Add Layer, and select the tutorial_image:shaded layer first. The raster should be drawn first, as other content will be shown over top of it.


  8. Click Add Layer again, and select the tutorial:Coastline layer. This polygon layer will be rendered on top of the shaded relief.


  9. In the layer list, find the tutorial:Coastline entry, and click on its Style field. Make sure its set to line. This ensures only the outlines are drawn, allowing the shaded relief underneath to remain visible.


    Layer group layers in drawing order
    Image credit: GeoServer


  10. Scroll to Coordinate Reference System, and click Generate Bounds. Now that the layers are listed, GeoServer can determine the spatial extent and reference system automatically.


    Coordinate Reference Systems
    Image credit: GeoServer


  11. Click Save to finish creating your layer group.


    New Layer Group
    Image credit: GeoServer


Note: For more information, see the full Layer Groups documentation.


23.6 Publishing a style

This tutorial walks through the steps of defining a style and associating it with a layer for use.

Note: This tutorial assumes GeoServer is accessible at http://<application_name>.sta.do.kartoza.com/geoserver.


23.6.1 Data preparation

Before we can create a style, we need to ensure the required data is available.


Complete the following previous section to prepare the necessary layer:


23.6.2 Creating a style

  1. Navigate to Data → Style page.


    Styles
    Image credit: GeoServer


  2. This page lists existing styles, along with their associated workspaces.

    Note: Styles can be global, which means they can be defined once and applied to layers across different workspaces.


  3. At the top of the Styles list, click the Add a new style link.


  4. Under Style Data, complete the form with the following details:

    Field Value
    Name background
    Workspace tutorial
    Format SLD


    Style Data
    Image credit: GeoServer


  5. Next, locate Style Content and under Generate a default style, select Polygon.


    Style Content
    Image credit: GeoServer


  6. Click the Generate link to automatically populate the style editor with a basic polygon style outline.


    Generate
    Image credit: GeoServer


  7. Press Apply to save and define this style. Once saved, additional interactive editing options will become available.


  8. Scroll to the top and go to the Publishing tab.


  9. Use the search field to filter by tutorial and locate the tutorial:countries layer.


  10. Check the Default checkbox next to tutorial:countries to set the tutorial:background style as the default for this layer.


    Default Style
    Image credit: GeoServer


  11. Go to the Layer Preview tab. Under Preview on layer, click the link for tutorial:countries to use this dataset while editing the style.


    Layer Preview
    Image credit: GeoServer


  12. Edit your style by inserting a fill-opacity value of 0.25 to make the fill semi-transparent.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <StyledLayerDescriptor version="1.0.0"
      xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
      xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
      xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
      <NamedLayer>
        <Name>background</Name>
        <UserStyle>
          <Title>Background</Title>
          <FeatureTypeStyle>
            <Rule>
              <Title>Background</Title>
              <PolygonSymbolizer>
                <Fill>
                  <CssParameter name="fill">#444433</CssParameter>
                  <CssParameter name="fill-opacity">0.25</CssParameter>
                </Fill>
                <Stroke>
                  <CssParameter name="stroke">#000000</CssParameter>
                  <CssParameter name="stroke-width">0.25</CssParameter>
                </Stroke>
              </PolygonSymbolizer>
            </Rule>
          </FeatureTypeStyle>
        </UserStyle>
      </NamedLayer>
    </StyledLayerDescriptor>
    


  13. Press Apply to update the style and observe the visual change in the layer preview.


    Changed Layer Preview
    Image credit: GeoServer


You have now succesfully defined a style and associating it with a layer.

Note: For more information, see the full Styles documentation.


For more information you can visit Geoserver Official Docs