Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hotosm/tasking-manager/llms.txt

Use this file to discover all available pages before exploring further.

Tasking Manager is configured entirely through environment variables. In a Docker Compose deployment these are loaded from a file named tasking-manager.env in the repository root; the backend reads this file via python-dotenv at startup. Start by copying the included template:
cp example.env tasking-manager.env
Then edit tasking-manager.env with the values appropriate for your instance. Variables without a default listed below are unset unless explicitly provided.
TM_DEFAULT_CHANGESET_COMMENT must be unique to your instance. Using the same hashtag as another Tasking Manager deployment will mix changeset data across instances, corrupting project statistics. Always set a value specific to your organisation (e.g. #myorg-tm-project).

Application URLs

These variables define the public-facing addresses of the frontend and backend. Both the backend (for email links and OAuth callbacks) and the frontend (for API calls) read these values.
Use 127.0.0.1 rather than localhost in development. OSM OAuth requires an exact URI match and localhost is not always treated as equivalent.
VariableDefaultDescription
TM_APP_BASE_URLhttp://127.0.0.1:3000Full public URL of the frontend. Used by the backend to build links in emails and OAuth callbacks. Set to your production domain in live deployments (e.g. https://tasks.hotosm.org).
TM_APP_API_URLhttp://127.0.0.1:3000/apiFull URL of the backend API. Used by both the backend itself and the frontend to locate the API.
TM_APP_API_VERSIONv2API version string appended after /api/ in all API routes.

Organisation Branding

These values customise the name, logo, and social links displayed throughout the interface.
VariableDefaultDescription
TM_ORG_NAMEHumanitarian OpenStreetMap TeamFull name of the organisation hosting the instance.
TM_ORG_CODEHOTShort three-letter code for the organisation. Used in automated tests and some UI labels.
TM_ORG_LOGOhttps://cdn.img.url/logo.pngURL of the organisation logo image.
TM_ORG_URLhttps://example.comHomepage URL of the hosting organisation.
TM_ORG_PRIVACY_POLICY_URLhttps://www.hotosm.org/privacyURL of the organisation’s privacy policy page.
TM_ORG_TWITTERhttp://twitter.com/hotosmTwitter/X profile URL.
TM_ORG_FBhttps://www.facebook.com/hotosmFacebook page URL.
TM_ORG_INSTAGRAMhttps://www.instagram.com/open.mapping.hubs/Instagram profile URL.
TM_ORG_YOUTUBEhttps://www.youtube.com/user/hotosmYouTube channel URL.
TM_ORG_GITHUBhttps://github.com/hotosmGitHub organisation URL.

OSM Server

Configure which OpenStreetMap server the instance connects to. Change these only if you are running a private OSM instance.
VariableDefaultDescription
OSM_SERVER_URLhttps://www.openstreetmap.orgBase URL of the OSM web server.
OSM_SERVER_API_URLhttps://api.openstreetmap.orgBase URL of the OSM API.
OSM_NOMINATIM_SERVER_URLhttps://nominatim.openstreetmap.orgNominatim geocoding server URL used for AOI searches.
OSM_REGISTER_URLhttps://www.openstreetmap.org/user/newURL for new user registration, shown to unauthenticated visitors.
OSM_USER_AGENTHOT-TaskingManagerUser-Agent string sent with requests to OSM APIs.

OSM OAuth2

TM_CLIENT_ID, TM_CLIENT_SECRET, TM_REDIRECT_URI, and TM_SECRET are required. The application will not start without valid OAuth2 credentials.
Register an OAuth2 application at https://www.openstreetmap.org/oauth2/applications to obtain the client ID and secret.
VariableDefaultDescription
TM_CLIENT_IDOAuth2 client ID issued by OSM when you register the application. Required.
TM_CLIENT_SECRETOAuth2 client secret issued by OSM. Required.
TM_REDIRECT_URIhttp://127.0.0.1:3000/authorizedRedirect URI registered with the OSM OAuth2 application. Must exactly match the value set in the OSM application settings. Required.
TM_SCOPEread_prefs write_apiSpace-separated OAuth2 scopes requested from OSM.
TM_SECRETs0m3l0ngr4nd0mstr1ng-b3cr34tiv3A random secret string shared between the frontend and backend for internal authentication. Required. Generate a long random value for production.

Database

The backend uses asyncpg to connect to PostgreSQL with the PostGIS extension. Individual variables are assembled into a postgresql+asyncpg:// URI at startup, unless DB_CONNECT_PARAM_JSON is provided.
VariableDefaultDescription
POSTGRES_DBtasking-managerName of the main PostgreSQL database.
POSTGRES_USERtmPostgreSQL username.
POSTGRES_PASSWORDtmPostgreSQL password. Use a strong password in production.
POSTGRES_ENDPOINTtm-dbHostname or IP of the PostgreSQL server. Defaults to the Docker Compose service name tm-db. Set to a remote host when using an external database.
POSTGRES_PORT5432PostgreSQL port.
DB_MIN_CONNECTIONS4Minimum number of connections in the asyncpg connection pool.
DB_MAX_CONNECTIONS8Maximum number of connections in the asyncpg connection pool.
POSTGRES_TEST_DBtaskingmanagertestDatabase name used when running the test suite. All other connection parameters are inherited from the main database settings.
DB_CONNECT_PARAM_JSONJSON string containing full connection parameters. When set, overrides all individual POSTGRES_* variables. Keys: username, password, host, port, dbname. Example: '{"username":"tm","password":"secret","host":"db.example.org","port":"5432","dbname":"taskingmanager"}'

Email (SMTP)

Email is optional but required for automated notifications such as project update messages. Configure an SMTP server or AWS SES credentials here.
VariableDefaultDescription
TM_EMAIL_FROM_ADDRESSnoreply@localhostSender address on all outgoing automated emails.
TM_EMAIL_CONTACT_ADDRESSsysadmin@localhostRecipient address for messages submitted via the contact form.
TM_SMTP_HOSTsmtp.gmail.comHostname of the SMTP server.
TM_SMTP_PORT587SMTP server port.
TM_SMTP_USERSMTP authentication username.
TM_SMTP_PASSWORDSMTP authentication password.
TM_SMTP_USE_TLS0Set to 1 to enable STARTTLS.
TM_SMTP_USE_SSL1Set to 1 to enable implicit SSL (port 465).
TM_SEND_PROJECT_EMAIL_UPDATES1Set to 0 to disable project update notification emails. Recommended for testing or staging instances.

Editors & Maps

These control the URLs for external editors and the Mapbox token for map tiles.
VariableDefaultDescription
ID_EDITOR_URLhttps://www.openstreetmap.org/edit?editor=id&URL for the iD editor. Change only when directing users to a private OSM instance.
POTLATCH2_EDITOR_URLhttps://www.openstreetmap.org/edit?editor=potlatch2URL for the Potlatch 2 editor.
RAPID_EDITOR_URLhttps://mapwith.ai/rapidURL for the Meta Rapid editor.
TM_MAPBOX_TOKENMapbox access token for vector tile basemaps. If unset, the application falls back to the raster-tile Humanitarian Layer. Costs apply above 50,000 map loads per month on a paid Mapbox plan.

Mapping Limits

These values control task locking behaviour and project creation constraints.
VariableDefaultDescription
TM_TASK_AUTOUNLOCK_AFTER2hDuration after which a locked task is automatically released. Accepts values like 30m, 2h, 7d, or combined 1h30m.
TM_MAPPER_LEVEL_INTERMEDIATE250Number of OSM changesets required to reach intermediate mapper level.
TM_MAPPER_LEVEL_ADVANCED500Number of OSM changesets required to reach advanced mapper level.
TM_IMPORT_MAX_FILESIZE1000000Maximum allowed file size in bytes when importing a project geometry from a file. Default is ~1 MB.
TM_MAX_AOI_AREA5000Maximum allowed project Area of Interest in square kilometres.

Integrations

VariableDefaultDescription
OHSOME_STATS_BASE_URLhttps://stats.now.ohsome.orgBase URL for ohsomeNow Stats used on project statistics pages.
OHSOME_STATS_API_URLhttps://stats.now.ohsome.org/apiAPI URL for ohsomeNow Stats.
OHSOME_STATS_TOPICSroad,waterway,building,poiComma-separated list of OSM feature topics tracked by ohsomeNow Stats.
OHSOME_STATS_TOKENtestSuperSecretTestTokenAuthentication token for the ohsomeNow Stats API.
MAPSWIPE_API_URLhttps://backend.mapswipe.org/graphql/MapSwipe GraphQL API URL for integrating MapSwipe campaign data.
EXPORT_TOOL_S3_URLS3 base URL for the HOT Export Tool integration.
ENABLE_EXPORT_TOOL0Set to 1 to enable the Export Tool integration.
TM_IMAGE_UPLOAD_API_URLURL of an image upload service for storing organisation logos and comment images.
TM_IMAGE_UPLOAD_API_KEYAuthentication key for the image upload API.

Monitoring & Logging

VariableDefaultDescription
TM_SENTRY_BACKEND_DSNSentry DSN for backend error tracking (e.g. https://foo.ingest.sentry.io/1234567).
TM_SENTRY_FRONTEND_DSNSentry DSN for frontend error tracking.
USE_SENTRYfalseSet to true to enable Sentry error reporting. Requires TM_SENTRY_BACKEND_DSN to be configured.
TM_LOG_LEVELDEBUGLogging verbosity level. Accepted values: DEBUG, INFO, WARNING, ERROR, CRITICAL. Use ERROR on live sites.
TM_LOG_DIR/home/appuser/logsDirectory path where log files are written on the server.
PROFILINGFalseSet to True to enable request profiling middleware. Intended for development and performance analysis only; do not enable in production.
TM_MATOMO_IDMatomo site ID for web analytics.
TM_MATOMO_ENDPOINTMatomo tracker endpoint URL.

Languages

VariableDefaultDescription
TM_DEFAULT_LOCALEenDefault language locale code shown to unauthenticated visitors.
TM_SUPPORTED_LANGUAGES_CODESar, cs, de, el, en, es, fa_IR, fr, he, hu, id, it, ja, ko, mg, ml, nl_NL, pt, pt_BR, ru, sv, sw, tl, tr, uk, zh_TWComma-separated list of locale codes to enable. Must have the same number of entries as TM_SUPPORTED_LANGUAGES.
TM_SUPPORTED_LANGUAGESعربى, Čeština, Deutsch, Ελληνικά, English, Español, فارسی, Français, עברית, Magyar, Indonesia, Italiano, 日本語, 한국어, Malagasy, Malayalam, Nederlands, Português, Português (Brasil), Русский язык, Svenska, Kiswahili, Filipino (Tagalog), Türkçe, Українська, 繁體中文Comma-separated list of human-readable language names corresponding 1:1 with TM_SUPPORTED_LANGUAGES_CODES.

Sandbox

The sandbox mode lets users experiment without affecting production data. Set TM_ENABLE_SANDBOX to true only when a sandbox database and dashboard are already configured.
VariableDefaultDescription
TM_ENABLE_SANDBOXfalseSet to true to enable the sandbox environment toggle in the UI.
TM_SANDBOX_DBsandbox_dbName of the sandbox PostgreSQL database.
TM_SANDBOX_DASHBOARD_API_URLhttps://sandboxurl.orgAPI URL of the sandbox statistics dashboard.

Other

VariableDefaultDescription
TM_ENABLE_SERVICEWORKER0Set to 1 to register a service worker for offline support and faster loads. Note: more complex to configure when the frontend and backend share the same origin.
TM_HOMEPAGE_IMG_HIGHURL of a high-resolution (2500px wide) image for the homepage banner. Falls back to the bundled default if unset.
TM_HOMEPAGE_IMG_LOWURL of a low-resolution (824px wide) version of the homepage banner image.
TM_HOMEPAGE_VIDEO_URLURL of an MP4 video to play as the homepage banner background. When unset, a static image is used instead.
DEFAULT_VALIDATOR_TEAM_IDTeam ID to automatically populate as the default validator team on new projects. HOT uses this for the HOT Global Validators team.
TM_SERVICE_DESKURL to the organisation’s service desk, shown in the Contact page and fallback error component.

Build docs developers (and LLMs) love