Debian and Ubuntu
Supported and tested: Debian 13 (trixie) and Ubuntu 24.04, amd64, with systemd.
Debian 12 is not supported: its GDAL 3.6 lacks ogrinfo -json, which Loka needs, so the
package requires gdal-bin (>= 3.7) and apt refuses to install it there. On Debian 12, use the
Docker bundle.
Install
Section titled “Install”sudo apt install ./loka-server_<version>_amd64.debapt pulls in MapServer, GDAL, MapCache and the Apache binary. The system Apache web server
(port 80) is not installed or started. Loka runs its own private MapCache instance on
127.0.0.1:8090.
At the end, the installer prints the console address (default http://127.0.0.1:8080) and a one-time setup code. Open the console and create the first administrator with it. To see the code again:
sudo cat /var/lib/loka/config/setup.codeServices and files
Section titled “Services and files”| What | Where |
|---|---|
| Services | loka (API and console), loka-mapcache (tiles, loopback only) |
| Settings | /etc/loka/loka.env; then sudo systemctl restart loka loka-mapcache |
| Data | /var/lib/loka (catalog, datasets, styles, cache, secrets); keep it on a local filesystem |
| Logs | journalctl -u loka, /var/log/loka/mapcache-error.log |
To reach the console from other machines, set LOKA_LISTEN=0.0.0.0:8080 and
LOKA_PUBLIC_BASE_URL=http://<server>:8080. A better option is an HTTPS reverse proxy with
LOKA_SECURE_COOKIES=true and LOKA_TRUSTED_PROXIES.
Backup and restore
Section titled “Backup and restore”sudo loka-backup # writes /var/backups/loka/loka-backup-<date>.tgz + .sha256The service stops for the copy. The archive contains secrets, so keep it private. The restore
steps are in the header of /usr/sbin/loka-backup.
Upgrade and removal
Section titled “Upgrade and removal”- Upgrade:
sudo apt install ./loka-server_<new>_amd64.deb. Make a backup first. A new release migrates the catalog automatically on start and keeps a copy of the old catalog in/var/lib/loka/catalog/backups/. - Removal:
sudo apt remove loka-server(orpurge). The services stop and the data in/var/lib/lokais kept.