Setting up a local environment

OGC API modules are still in their infancy and under heavy development. Most of the specs and extensions are still in draft form and their behavior is likely to change in the next months/year. For this reasons this section explains how to set up a local environment using the latest GeoServer build.

From the GeoServer download page click on the development tab and then on the link to the main branch nightly builds.

../_images/download-page.png
  1. Make sure you have a Java Runtime Environment (JRE) installed on your system. GeoServer requires a Java 8 or Java 11 environment, as provided by available from OpenJDK or AdoptOpenJDK, depending if you are using Linux or Windows.
  2. Download the geoserver-main-latest-bin.zip. Unzip it in a directory of your choice.
  3. Download the geoserver-2.21-SNAPSHOT-ogcapi-plugin.zip. Unzip it and drop all its content in the webapps/geoserver/WEB-INF/lib folder of your GeoServer directory.

In the image below the geoserver-main-latest-bin.zip content has been placed inside C:\geoserver-test folder. The geoserver-2.21-SNAPSHOT-ogcapi-plugin.zip content has been then dropped inside C:\geoserver-test\geoserver-main-2021-09-13-bin\webapps\geoserver\WEB-INF\lib.

../_images/directory-path.png

Setting environment variables

You will need to set the JAVA_HOME environment variable if it is not already set. This is the path to your JRE such that %JAVA_HOME%\bin\java.exe exists.

To set the JAVA_HOME in Linux/OSX run the following commands:

  1. export JAVA_HOME=/path/to/jre
  2. export PATH=$JAVA_HOME/bin:$PATH

To set the JAVA_HOME in Windows:

  1. Navigate to Control Panel ‣ System ‣ Advanced ‣ Environment Variables.
  2. Under System variables click New.
  3. For Variable name enter JAVA_HOME. For Variable value enter the path to your JDK/JRE.
  4. Click OK three times.

Running

To start GeoServer:

  • On Linux/OSX open the terminal, navigate to the root directory of you GeoServer installation and run bin/startup.sh.
  • On Windows run startup.bat inside the bin folder. A command-line window will appear and persist. This window contains diagnostic and troubleshooting information. This window must be left open, otherwise GeoServer will shut down.

Once GeoServer is running:

  1. Navigate to http://localhost:8080/geoserver (or wherever you installed GeoServer) to access the GeoServer home.
  2. Check that ogcapi modules are installed by looking on the left side of the GeoServer home page. Under the section Service Capabilities you should have the following links:
../_images/ogcapi-services.png

Stopping

To shut down GeoServer:

  • On Linux/OSX press CTRL-C on the terminal where GeoServer is running.
  • On Windows either close the persistent command-line window, or run the shutdown.bat file inside the bin directory.

Uninstallation

  1. Stop GeoServer (if it is running).
  2. Delete the directory where GeoServer is installed.