Back to services

safehaven

An open-source solution to create collaborative maps

View alternatives to safehaven
Suggest edit
Self-hostable
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Overview

SafeHaven is an open-source project hosted on Codeberg, described in its repository as "An open-source solution to create collaborative maps." The README states that the project was created to map safe places for people who need them, with many contributors collecting and maintaining location information on the map together.

Key Features

  • Collaborative maps: multiple people build and maintain the location data on the map together.
  • Admin dashboard: administrators can create new users and manage the whole application.
  • Full-text search: content is searched using PostgreSQL's full-text search, and you can set the database's text search language (for example, French) to improve indexing.
  • Geospatial data: uses PostGIS to store and process spatial data.

Target Users and Use Cases

  • Nonprofits, community groups and mutual-aid networks that want to compile and publish the locations of safe spaces or support points.
  • Community mapping projects where many people need to mark locations together.
  • Organizations that value data sovereignty and want to host their own map service.

Core Strengths

  • Open source under the GPLv3 license, so you can freely deploy and modify it.
  • Ready-made Docker images are provided officially, which keeps the barrier to deployment low.
  • Built on a Rust + Vue + TypeScript stack, with the mature PostgreSQL/PostGIS as its database.
  • The CI pipeline has ARM Linux builds enabled.

Deployment

Prerequisite: a PostgreSQL server with the PostGIS extension installed.

  1. Create the database:
CREATE DATABASE safehaven;
  1. (Optional) Set the full-text search language:
ALTER DATABASE safehaven SET default_text_search_config = 'pg_catalog.french';
  1. Start the Docker container:
docker run -d \
  -e SH__DATABASE__URL="postgresql://user:password@host/safehaven" \
  -e SH__DATABASE__POOL_SIZE="5" \
  -e SH__SECURE_COOKIE="true" \
  -e SH__TOKEN_SECRET="SecretForValidatingAngSigningTokens" \
  codeberg.org/safehaven/safehaven:1.1.3
  • SH__DATABASE__URL: database connection URL
  • SH__DATABASE__POOL_SIZE: database connection pool size
  • SH__SECURE_COOKIE: set to true when running behind an HTTPS reverse proxy
  • SH__TOKEN_SECRET: secret key used to sign sessions

For the image version number, refer to the Packages page of the SafeHaven organization on Codeberg.

On first startup, the system automatically creates a default administrator account, admin, and its random password can be found in the backend logs. For more configuration details, see the official documentation at docs.safehavenmaps.org.

Development Environment

You need to install Docker first. Run docker-compose up in the repository directory, then open localhost:4000 to start developing.

Technical Requirements

  • Docker (or Podman)
  • PostgreSQL with PostGIS
  • Using a reverse proxy is recommended in HTTPS environments

Notable Characteristics

  • License: GNU GPL v3.0
  • The code is hosted on Codeberg, and CI uses Woodpecker.
  • The project is small and doesn't have many repository watchers, but it is actively maintained.