mantica

command module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Mantica

Mantica

Self-hosted MBTiles / PMTiles atlas with MapLibre UI

NixOS | Downloads | Run locally | Options

GitHub Latest release

Introduction

Mantica (Latin mantica — a traveler’s bag): maps you keep with you on your own host.

Serves local *.mbtiles / *.pmtiles, a MapLibre front-end, catalog downloads, and optional geocoding proxies. HTTP Basic auth is optional (both credentials together, or none).

Default listen: 127.0.0.1:8091 (NixOS module). CLI default is :8080.

  • GET /health — liveness (no auth)
  • UI at /
  • Tile / map APIs under /api/*, /services, /pmtiles/

NixOS (flake)

{
  inputs.mantica.url = "github:NickRI/mantica";
  inputs.mantica.inputs.nixpkgs.follows = "nixpkgs";

  # modules = [ inputs.mantica.nixosModules.default ];
}
{
  services.mantica.enable = true;
  services.mantica.workDir = "/var/lib/mantica";
  # Optional Basic auth (both or neither):
  # services.mantica.authUserFile = config.sops.secrets."mantica/username".path;
  # services.mantica.authPassFile = config.sops.secrets."mantica/password".path;
}

Downloads

Latest binary: GitHub Releases

Asset Download
Linux amd64 binary mantica-linux-amd64.tar.gz
curl -fsSL -o mantica-linux-amd64.tar.gz \
  https://github.com/NickRI/mantica/releases/latest/download/mantica-linux-amd64.tar.gz
tar -xzf mantica-linux-amd64.tar.gz   # → ./mantica

Run locally

go run . -dir . -listen :8080
# with auth:
go run . -dir . -auth-user USER -auth-pass PASS
nix build
./result/bin/mantica -dir .

-dir is the data root (default .):

Path Purpose
<dir>/tilesets/ *.mbtiles / *.pmtiles
<dir>/settings.json UI settings
<dir>/downloads.json Download jobs
<dir>/hashes.json Checksum verify state
<dir>/geocode-cache.gz Geocode LRU
<dir>/downloads/ In-progress download workdirs

Keep runtime state out of git.

Options (NixOS)

Option Default Description
services.mantica.enable — Enable service
services.mantica.listenAddress 127.0.0.1 Bind address
services.mantica.port 8091 Listen port
services.mantica.workDir /var/lib/mantica Data root (-dir)
services.mantica.authUserFile null Basic auth user file (with authPassFile)
services.mantica.authPassFile null Basic auth password file
services.mantica.geocoderKeysFile null JSON API keys for geocoders
services.mantica.geocodeCache 32MB Geocode LRU size (0 disables)

Develop

go build -o mantica .
make release-artifacts
nix build

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址