How can I install or use geoserver on digital ocean?

Posted January 4, 2020 2.4k views
Getting StartedDigitalOceanDeploymentDevelopment

My project was using mysql and nodejs which I have successfully deployed on digital ocean server but now my application is growing and I have also used postgresql and geoserver in it. My problem is that Is there any solution to use geoserver on digital ocean server. I am using Ubuntu 16.04.5 x64 OS on digital ocean server.

Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

update apt-get and install java runtime environment (if you don’t have it)

sudo apt-get update
apt-get install openjdk-8-jre

make a new directory
download the proper version from geoserver’s release page and unzip it then upload it to the folder you create on the droplet (eg platform independent stable release)

mkdir -p /usr/share/geoserver/

create environment variable, apply it

echo "export GEOSERVER_HOME=/usr/share/geoserver/" >> ~/.profile
. ~/.profile

give ownership rights to folder (replace <user> with proper ubuntu user)

sudo chown -R <user> /usr/share/geoserver/

add in any extensions you need to usr/share/geoserver/webapps/geoserver/WEB-INF/ folder then
start the server from the bin folder

cd /usr/share/geoserver/bin

it should list a server success eventually and access it at http://localhost:8080/geoserver/
for more info see geoserver linux install directions