Skip to content

Configuration reference ​

Supadomain has three layers of settings. Environment variables are read when the server starts. The Slack webhook and the per-domain options are set in the app and stored in MongoDB. A few limits are fixed in the code and listed here so you know what to expect.

Environment variables ​

Set these in .env at the project root, or in the environment of the process.

VariableRequiredDefaultPurpose
MONGODB_URIYesnoneMongoDB connection string, for example mongodb://localhost:27017/supadomain.
NUXT_SESSION_PASSWORDYesnoneSeals the session cookie. At least 32 characters.
ADMIN_EMAILNoadmin@supadomain.comEmail of the admin account created on first start.
ADMIN_PASSWORDNorandomPassword of that account. If unset, a random one is printed to the server log once.

ADMIN_EMAIL and ADMIN_PASSWORD are read only while the database has no user. After the first start they have no effect.

Changing NUXT_SESSION_PASSWORD invalidates existing sessions, so you will have to sign in again.

Slack webhook ​

SettingWhereNotes
Incoming webhook URLNotifications pageOne URL for the whole app. Must start with https://.

The URL is stored in MongoDB as plain text and shown again on the Notifications page to the signed-in admin. Treat database backups accordingly. Setup steps are in the Slack alerts guide.

Per-domain settings ​

Open a domain's row menu on the Domains page and choose Edit.

SettingValuesDefault
NotificationsOn or offOn
Notify me before expirationAny of 30, 7 and 1 days30, 7 and 1

One alert is sent per domain, when it crosses the largest threshold that is ticked. When an alert fires has the full rule.

Fixed behaviour ​

These values live in the code and have no setting.

WhatValue
Expiry check scheduleEvery hour at minute 0 (0 * * * *)
RDAP endpointhttps://rdap.org/domain/<domain>
When RDAP is queriedOn add and on Refresh
Warning status30 days or fewer left
Critical status7 days or fewer left
Expired statusThe stored date has passed
Unknown statusNo expiry date stored
Domains per page in the table10
Dashboard activity listLast 10 events
Dashboard "Expiring soonest"5 domains

Login rate limit ​

Requests to the login endpoint are rate limited per IP address:

WhatValue
Allowed attempts12 within 108 seconds
Ban after exceeding it3600 seconds
Log folderlogs/

The limiter takes the client address from the last X-Forwarded-For entry and trusts one proxy hop. Run the app behind exactly one reverse proxy for the limit to apply per visitor.

What is stored in MongoDB ​

Four kinds of documents make up the whole state of the app.

ModelHolds
DomainOne document per monitored domain
ActivityEvents: added, removed, refresh, alert, expired
NotificationsThe Slack webhook URL
UserThe admin's email and a bcrypt hash of the password

A domain document has these fields:

FieldTypeMeaning
urlString, uniqueThe domain name
expireTimeDateExpiry date from RDAP
registrationDateDateRegistration date from RDAP
lastUpdateDateThe registry's "last changed" date
lastUpdatedInRdapDateWhen the registry's RDAP database was last updated
lastCheckedDateWhen Supadomain last ran a lookup for this domain
nameserversArray of stringsNameserver names from RDAP
notificationsBooleanWhether alerts are on. Default true.
notifyDaysBeforeArray of numbersAlert thresholds in days. Default [30, 7, 1].
lastNotifiedDaysNumber or nullThe threshold of the last alert sent. Cleared by a refresh.

Backing up the MongoDB database backs up everything Supadomain knows. There are no other data files apart from the rate limiter's logs.

Ports and processes ​

The production build is a single Node process started with node .output/server/index.mjs. It listens on port 3000 unless PORT is set. The hourly check runs inside this process, so keep it running under a process manager or a container that restarts it.

Released under the MIT License.