Panoramax streetviewing

Setting up and running a self-hosted Panoramax streetview instance is fairly straightforward.

Panoramax API and Website

We discussed elsewhere setting up a Panoramax API with a Panoramax viewer that was incorporated into a web application. However, it is useful to set up a Panoramax Website with a Panoramax API so that photos can be uploaded directly and managed.

For a fully updated Ubuntu 22.04 system, installing the API and Website are straightforward. Be aware that the default versions for Panoramax git clones are development versions (git clone https://gitlab.com/panoramax/server/api.git; git clone https://gitlab.com/panoramax/server/website.git).

Panoramax requires a PostgreSQL data base version 12 or greater and PostGIS extension 3.4+. Curretly (March 2025), Postgres version 14 and PostGIS extension (version 3.5.2) can be installed using standard terminal commands:

  • sudo apt install postgres
  • sudo apt install postgresql-12-postgis-3

The database setup is standard. For the API, a virtual enviroment is needed for the directory where the API clone is stored (say /home/user/geovisio):

  • cd /home/user/geovisio
  • python3 -m venv .
    source bin/activate

Dependencies are then installed:

pip install -e .

To start with Panoramax, it is probably best to use the built-in Flask server:

  • flask run

Flask requires a .env file in /home/user/geovisio. A suitable .env is:


FLASK_APP=geovisio

# optional FLASK_DEBUG=1

DB_URL=postgres://ertert:ertert@localhost:5432/geovisio

FS_URL=/home/ertert/geovisio/data

INFRA_NB_PROXIES=1

FLASK_RUN_HOST=0.0.0.0

API_WEBSITE_URL=same-host

FLASK_SESSION_COOKIE_DOMAIN=peterboswell.net

FLASK_SESSION_COOKIE_HTTPONLY=false

FLASK_SESSION_COOKIE_SAMESITE=none

FLASK_SESSION_COOKIE_SECURE=true

OAUTH_PROVIDER=osm

OAUTH_CLIENT_ID=*********************

OAUTH_CLIENT_SECRET=***********************

FLASK_SECRET_KEY=**********************

# fine tuning

#GEOVISIO_IMAGE_TAG=latest

#API_FORCE_AUTH_ON_UPLOAD=false

#API_DEFAULT_COLLABORATIVE_METADATA_EDITING=false

#API_ENFORCE_TOS_ACCEPTANCE=false

#API_ACCEPT_DUPLICATE=false

#DEBUG_PICTURES_SKIP_FS_CHECKS_WITH_PUBLIC_URL=true

#API_PERMANENT_PICTURES_PUBLIC_URL=true


While most of these settings are discussed in the settings documentation (with further details on the Flask website), some require more attention.

Proxy

The INFRA_NB_PROXIES=1 setting specifies the number of proxies. Installation guidance indicates that the Panoramax website and API should be on the same host. While this is probably the simplest arrangement, it is not a requirement. For an Apache2 webserver where the website serves at http://192.168.1.100:5173 (the Vite default port - see below) and the API at http://192.168.1.100:5000 (the Flask default port), the Apache configuration (in the "sites-available" directory ) for secure ("https") connections we use:


<IfModule mod_ssl>

<VirtualHost *:443>

ServerName pano.peterboswell.net

.................to be completed


10 April 2025

PeterBoswell.com