kumaconf
Export the configuration of an Uptime Kuma instance from its SQLite file as JSON, and restore it into an empty instance. Nothing else is read.
pip install kumaconf==0.1.0
Read the configuration of an Uptime Kuma instance out of its SQLite file, as readable JSON, and write it back into an empty instance. Monitors, notifications, tags, status pages and settings come out. Heartbeats and statistics never do.
Everything is done on the database file. There is no API call, no token, no account, no network traffic of any kind, and nothing is sent anywhere.
Look before you touch
kumaconf check /path/to/kuma.db
check only reads. It prints the tables it found, how many rows each one holds, the history tables it will never read, and the columns it will leave out because they hold secrets. Run it first.
An instance runs its database in WAL mode, and SQLite writes a -shm file next to a WAL database even when it is only reading it. So the file has to sit in a directory you can write to, and a copy of kuma.db alone loses whatever is still in its -wal file. Take the copy like this, or stop the instance and copy the three files together:
sqlite3 kuma.db ".backup copy.db"
Export
kumaconf export /path/to/kuma.db -o kuma-config.json
The output is plain JSON, one entry per table, with the column names written next to the rows. It holds configuration rows only, never history, so it stays small enough for a git repository, unlike a copy of the data directory.
Passwords, tokens and notification settings are left out by default, and the command says on standard error exactly which ones it left out. If you want them in the file:
kumaconf export /path/to/kuma.db -o kuma-config.json --include-secrets
That file then holds live credentials. Treat it as a secret.
A file exported without --include-secrets comes back with empty notification settings and empty passwords. A notification whose settings are empty will not send anything, and a status page that was password protected comes back without its password, so it comes back public. Export with --include-secrets if you want a restore that stands on its own, and keep that file out of git.
Import into an empty instance
kumaconf import /path/to/new/kuma.db kuma-config.json --dry-run
The dry run says what it would write and writes nothing. When it looks right, drop the flag:
kumaconf import /path/to/new/kuma.db kuma-config.json
Stop the target instance first, so that it is not writing to the file at the same time.
For every table the file carries, the import refuses to run if that table already holds rows in the target, and it refuses before writing anything at all. It is a restore into a fresh install, not a merge of two instances. The one exception is the setting table, where a key that already exists is left exactly as it is, and only missing keys are added. Keys that look like secrets, and the keys that identify the instance itself, are never written back, even from a file exported with --include-secrets.
Identifiers are kept, so the links between monitors, tags, notifications and status pages survive. Columns that exist in the file but not in the target database are dropped, and the command says so.
What it never touches
heartbeat,stat_minutely,stat_hourly,stat_daily,monitor_tls_infoandnotification_sent_history: history, never read, never written.user,api_keyand thebetter_auth_*tables: accounts, password hashes, two factor seeds and sessions. They belong to the instance, not to its configuration.- Secret columns, unless you ask for them:
basic_auth_pass,push_token,radius_password,radius_secret,oauth_client_secret,database_connection_string,headers,tls_key,kafka_producer_sasl_options,grpc_metadata, the wholeconfigcolumn ofnotification, the status page password, and any setting key that looks like a secret. A column is treated as a secret when its name matches password, pass, secret, token, api key, credential, connection string, private key or two factor, plus the few above that carry a secret without saying so in their name.
Note that the body column of a monitor is exported as it is. If you put credentials in a request body, they are in the file.
What is not verified
This was written against the upstream database schema, read on 2026-09-28 from db/knex_init_db.js and db/knex_migrations of the version 2 branch. It has not been run against a live version 2 instance, because I do not have one. The tool reads the real tables and columns of the file you give it rather than assuming a fixed schema, and it reports anything it did not expect, but the shape of the data in a running installation is not something I have checked.
This is why check exists, and why reading is done on a read only connection that cannot write to the database. The database file itself is never modified. Run check first, work on a copy of your database file, and please open an issue if what you see does not match what you expected.
Why this exists
Request thread: https://github.com/louislam/uptime-kuma/issues/6045
People there dump the whole database while excluding four history tables by hand, or stop the service and archive the entire data directory. This tool knows which tables to exclude, so you do not have to.
License and honesty
MIT. Not affiliated with the Uptime Kuma project. Built with AI assistance, reviewed and tested by me.
Tests: python -m unittest discover -s tests -t tests with src on PYTHONPATH.
Metadata
Release files for kumaconf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kumaconf-0.1.0.tar.gz | 16.4 kB | Without provenance | Details for kumaconf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kumaconf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for kumaconf-0.1.0-py3-none-any.whl |
Total release size: 29.4 kB
Release files / kumaconf-0.1.0.tar.gz
| Download URL | kumaconf-0.1.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82bfcc73f500dd9f30b75f4c06db1f95fd97893b19910374d3da3c734cdb1bf8
|
|
BLAKE2b-256 checksum How to use checksums |
48deb536287572011ec1bb15ec40e9a5ca742c332b58fdb37eb8238d8cea40f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / kumaconf-0.1.0-py3-none-any.whl
| Download URL | kumaconf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b1933ea2e20768827219cb9c64545cf89785d07defe10837300b36fc776e030
|
|
BLAKE2b-256 checksum How to use checksums |
5daafb9ab6955875f805a5543a75b0008fae2ed2cc86a936bdb51bc4501af6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for kumaconf 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.