GitHub

Configuration

Diskus is designed to be highly configurable. You can configure global server behavior using Environment Variables, and control per-site behavior directly from the Admin Dashboard.

Environment Variables

Environment variables are set on the server where you deploy the Backend API.

Required Variables

VariableDescription
JWT_SECRETA secure, random string used to sign authentication tokens. In production, using a weak default secret will cause the server to refuse to start.

Optional Server Variables

VariableDefaultDescription
DATABASE_PATHsqlite.dbThe absolute or relative path to the SQLite database file.
PORT3000The port the backend API listens on.
NODE_ENVdevelopmentStandard Node environment variable. Set to production to enable strict CORS and security checks.
API_BASE_URLhttp://localhost:3000/api/v1The public URL of your backend API. Used to construct verification links in emails.
VITE_API_URL/api/v1The base API route the frontend should use. Required during the build step.

Access Control Variables

VariableDefaultDescription
DASHBOARD_ORIGIN* (in dev)A comma-separated list of allowed origins that can access the Admin API (e.g., https://admin.yourdomain.com). Prevents unauthorized cross-origin requests.
ALLOW_REGISTRATIONfalseDiskus allows the very first user to register as an admin. After that, registration is locked. Set this to true to allow additional users to register admin accounts.

Email Notifications

VariableDefaultDescription
SMTP_HOSTNoneThe SMTP server host (e.g., smtp.gmail.com).
SMTP_PORT587The port for your SMTP server. Use 465 for secure TLS.
SMTP_USERNoneYour SMTP username or email.
SMTP_PASSNoneYour SMTP password or App Password.
SMTP_FROMNoneThe sender address (e.g., "Diskus <noreply@yourdomain.com>").

OAuth & Social Logins

VariableDefaultDescription
API_URLNoneREQUIRED for OAuth. The public root URL of your backend API (e.g., https://api.yourdomain.com). This is used to construct the correct redirect callback URLs for Google and GitHub.
GOOGLE_CLIENT_IDNoneYour Google OAuth 2.0 Client ID.
GOOGLE_CLIENT_SECRETNoneYour Google OAuth 2.0 Client Secret.
GITHUB_CLIENT_IDNoneYour GitHub OAuth App Client ID.
GITHUB_CLIENT_SECRETNoneYour GitHub OAuth App Client Secret.

Special Modes

VariableDefaultDescription
DEMO_MODEfalseSet to true to enable “Read-Only” mode for the admin dashboard. Useful for public live demos. Visitors can still post comments, but dashboard users cannot delete or modify data.
SEED_DBfalseUsed in Docker deployments to auto-seed the database with dummy data on startup.

Site-Specific Settings

In addition to global server variables, Diskus provides per-site settings that can be configured directly from the Admin Dashboard. Navigate to the Websites tab and click the settings icon for a specific domain.

Authentication Mode

  • Guest & Login Allowed (Default): Anyone can comment. Guests only need to provide a name and email.
  • Login Required: Disables guest commenting. Users must create an account and verify their identity to comment.

Moderation Mode

  • Require Moderation (Default): All new comments are placed in a “Pending” queue and will not appear on your website until an admin manually approves them.
  • Auto-Approve: Comments appear instantly. (Honeypot anti-spam measures still apply).

Interface Settings

  • Comments Limit: The initial number of root-level comments to load when the widget initializes. Users can load more by clicking the “Load more” button. (Default: 10)
  • Email Notifications: Toggle whether the site owner should receive an email every time a new comment is posted on this specific domain.