Skip to content

Web Admin ​

The Web Admin is the admin's console in a browser. With it you can see everything stored in the database, add and manage users, change settings, take backups, and stop or restart the server. DDBD serves it itself, on the same address and port as the API, so there is nothing else to install.

It is for the admin only. Apps, scripts and AI agents never use it: they sign in as users and go through the API.

Opening it ​

The Web Admin is off until it has a password. On the server, as the operating system user who runs DDBD, set one with the Admin Shell:

bash
$ ddbd admin --data ~/ddbd-data web-password
New web admin password (shown as you type, at least 8 characters): ...
Web admin is on. Open the server address in a browser and sign in with this password. Existing web admin sessions were signed out.

Then open the server's address in a browser: http://localhost:7070/ on the server itself, or the HTTPS address that leads to your server. The login page asks for that password:

The Web Admin login page

  • Run web-password again to change the password, or web-password off to turn the Web Admin off. Either signs out everyone signed in to it. The password can only be set from the server, never from the Web Admin itself.
  • A Web Admin session ends after 60 minutes without use (the admin_session_idle_minutes setting), on [Logout], when the password changes, and when the server restarts.
  • Wrong passwords slow down further attempts, as they do for users.
  • On plain HTTP the password travels unencrypted. Open the Web Admin on the server itself, or through HTTPS.

The screens ​

The menu on the left (behind the menu button on a phone) leads to each screen. The top bar has the light/dark switch and [Logout].

Overview ​

The first screen after signing in. It shows how the server is doing.

The Overview screen

cardwhat it shows
Records, Collections, Usershow many there are in the database
Outboxbackground work waiting to be done, such as feeds and notifications for subscribers; it is normally 0
Sessionsuser sessions that are signed in
Connectionsconnections open to the server right now
Requestsrequests answered since the server started
Listenersopen notification streams (listen)
Serverthe data folder, the port and whether it is plain HTTP or HTTPS, the index and tag limits, how long notifications and private access keys last, and how many Web Admin sessions are open

The counts refresh every 10 seconds.

The log ​

Below the cards is the server log, live: the same lines the server prints in its terminal, one per request.

The Log card

Each request line reads, from left to right:

columnexamplemeaning
time22:04:02when the request came in
whoalice, alice/shop-bot, admin(web)the user; the user and the agent key's name for an agent key; admin(web) for the Web Admin; - when nobody is signed in
whatpostRecordthe API method, or what the Web Admin asked for
collectionproductsthe collection the request touched, if any
time taken0 mshow long the server took to answer
errorNO_ACCESSwhy the request was refused; empty when it succeeded

In the example, bob (level 05) tried to save a record at level 10 and was refused with NO_ACCESS, and someone tried to sign in as carol with a wrong password (UNAUTHORIZED). Lines in brackets, such as [outbox 0 · req/s 1.8 · conns 3], are the status line: background work waiting, requests per second and open connections, printed when they change. The server keeps the last 1000 lines for this card, and only until it stops; to keep a log file, see Reading the log.

Records ​

Every record in the database, newest first, private ones included.

The Records screen

  • Type a collection name in the search box to narrow the list. The button at the left of the box adds the owner, the level, the order and the page size.
  • + Create saves a new record. Records belong to users, so the form asks which user it is saved as, and that user's access level applies.

Creating a record

Click a record to open it. You see every setting, its grants and its data, and you can copy it as JSON, edit it or delete it:

One record

Query ​

Runs a getRecords query with admin rights, so it finds records whatever their level. Fill in the Form tab, or write the request body on the JSON tab. The form shows the request it builds, which you can copy into your own code.

The Query screen

Run query lists the matching records. This query asked for every product with a price of 1000 or more:

Query results

Collections ​

Every collection, with its number of records, its size, and how many records it has at each access level.

The Collections screen

Click a collection to see its tags and its indexes, with how many records use each. Query and Browse records open the collection on those screens.

One collection

Unique IDs ​

Every unique id and the record it names. Search by how an id starts or ends, or by the whole id; click one to open its record.

The Unique IDs screen

Users ​

Every user, with their access level, how many records they have, their subscribers and subscriptions, and when they were added. + Add User adds one with a username, a password and an access level. There is no other way for users to get an account.

The Users screen

Click a user to change their access level or delete them. Records and Agent keys show what belongs to them. Passwords cannot be shown or reset: when a user loses theirs, delete the user and add them again.

One user

Agent keys ​

Every agent key of every user, with its limits and its expiry. [Revoke] stops a key at once.

The Agent keys screen

Settings ​

The server's settings. Cards marked applies now take effect as soon as you save; cards marked next start (network and storage) are saved and take effect when the server restarts.

The Settings screen

Tools ​

Work on the whole database:

  • Version: the DDBD version this server runs. [Check for updates] asks https://cdn.broadwayinc.com/get/ddbd/latest for the newest release and says whether this one is up to date, or which command updates it. The Web Admin contacts that address only when you click, and sends nothing but the request.
  • Back up, Export and Import, to and from folders and files on the server. See Operations.
  • Delete records by query, delete users in batch, or delete every record. Each asks you to type a word to confirm.
  • Rotate the secret behind private access keys.
  • Restart or Stop the server. After a restart the page asks you to sign in again; after a stop it shows the command that starts the server again.

The Tools screen

Deleting here is final

Deleting records or users on the Tools screen cannot be undone. Back up first.

Released under the Apache License 2.0.