Skip to content

Reference

github-actions[bot] edited this page Dec 4, 2026 · 5 revisions

Reference

Commands

Command Does
owncms serve [flags] runs OwnCMS
owncms version prints the version
owncms admin reset-password [-data DIR] [-database URL] <email> sets a new password for a person, prints it once, turns their two-factor sign-in off and ends all their sessions

Every flag can also be set in the environment as OWNCMS_<NAME>, with - as _ (-trusted-proxies is OWNCMS_TRUSTED_PROXIES). A flag on the command line wins.

Flags of serve

Flag Default Meaning
-data /data data directory: the secret key, the SQLite database, uploaded images and files (unless they are kept elsewhere, see [[Media
-database empty Postgres to keep the data in, as postgres://user:password@host:5432/name?sslmode=require; empty keeps it in SQLite in the data directory. Prefer OWNCMS_DATABASE: a flag with a password shows in the list of processes
-listen :8080 address of the web interface and the API, plain HTTP behind a reverse proxy
-trusted-proxies empty addresses or CIDRs of reverse proxies whose X-Forwarded-For and X-Forwarded-Proto are believed, separated by commas
-url empty the address OwnCMS is reached at, such as https://cms.example.com, for the links in llms.txt and Markdown; empty takes it from each request
-max-upload 50 the largest image or file that can be uploaded, in MB (1 to 10240)
-insecure-http false lets the session cookie work over plain HTTP on any host name (only for test setups; localhost always works)

The data directory

Path What
owncms.db (with -wal, -shm) the database, unless -database names Postgres
media/ the content of uploaded images and files; back it up with the database
tmp/ uploads while they are checked; emptied at every start
secret.key the key that seals secrets kept in the database (the keys of storages for media); back it up with the database, it cannot be made again
owncms.lock held while owncms serve runs, so two never use one directory

The directory is made accessible only to the user OwnCMS runs as.

The first administrator

At the first start OwnCMS prints a one-time setup code to its log (setup_code=…). Open /admin/ and enter it with your address and a password of 10 to 200 characters. The code is useless once the first administrator exists.

Addresses

Path What
/admin/ the administration; / leads there
/api/ the administration API (session cookie with the header X-Owncms-Request: 1, or an access token)
/api/mcp the endpoint for AI programs, access tokens only
/content/<site>/ the read API for websites: published content as JSON and Markdown, llms.txt; see [[Reading content

Clone this wiki locally