Skip to content
Enjazy documentation

Self-hosting Enjazy

This guide describes how to deploy the Enjazy server on your own machine. It covers the requirements, installing and running the server, Docker, HTTPS and reverse proxying, e-mail, first-run setup, the AI assistant, backups, migrating a 1.x server, and the database CLI.

For the console itself see the admin guide.

Requirements

Install and run

Download the server archive (enjazy-server-<version>.zip) from the Enjazy download page and extract it. The archive holds the built server (apps/server/dist/, with the web app and the documentation inside), the Dockerfile (apps/server/Dockerfile) and a README.txt. From the extracted folder, start the server with:

node apps/server/dist/server.mjs

The server serves the API, the server-rendered pages, the admin console (/console/), the same-origin web app, this documentation (/docs/), the API reference (/docs/api) and the OpenAPI document (/docs/json). It keeps its data under ./data/ in the folder you start it from, unless the variables below say otherwise.

To build the archive's contents from a source checkout instead, run npm run build:server; the bundle is then apps/server/dist/server.mjs.

Docker

Build the image from the extracted archive and run it:

docker build -t enjazy-server -f apps/server/Dockerfile .
docker run -p 8787:8787 -v enjazy-data:/data enjazy-server

The image is based on node:24-slim, runs as a non-root user, exposes port 8787, and mounts a volume at /data for the database and per-user stores. The environment defaults inside the image point the data files at /data.

Environment variables

Every variable the server reads is listed below, with its default. Nothing else is configuration. Product constants (lockout windows, link lifetimes, retention) are not environment-configurable.

VariableDefaultPurpose
ENJAZY_HOST0.0.0.0The interface the HTTP server binds to.
ENJAZY_PORT8787The TCP port the HTTP server listens on.
ENJAZY_AUTHnoneAuth mode: none, api-key or accounts (truthy 1.x values map to accounts).
ENJAZY_API_KEYS(empty — no API keys)A comma-separated list of API keys for single-tenant api-key mode.
ENJAZY_API_KEYS_SYNCfalseIn api-key mode, true puts the API-key guard on the sync channel /api/sync/* too (no or wrong key answers 401 unauthorized). Off keeps sync public so 1.x apps keep syncing, and the server logs the api_key_sync_public boot warning. Turn it on once every app that syncs with the server sends a key.
ENJAZY_DB_DRIVERsqliteThe single-tenant store driver: sqlite or mysql.
ENJAZY_DB./data/enjazy-server.dbThe single-tenant SQLite database path.
ENJAZY_MYSQL_HOST127.0.0.1The MySQL host when ENJAZY_DB_DRIVER=mysql.
ENJAZY_MYSQL_PORT3306The MySQL port.
ENJAZY_MYSQL_USERenjazy_userThe MySQL user.
ENJAZY_MYSQL_PASSWORD(empty)The MySQL password.
ENJAZY_MYSQL_PASSWORD_FILEunsetA file whose content (without its final line ending) is the MySQL password; ENJAZY_MYSQL_PASSWORD wins when both are set.
ENJAZY_MYSQL_DATABASEenjazy_dbThe MySQL database name.
ENJAZY_MYSQL_TLS_CAunsetA PEM CA used for the MySQL TLS connection.
ENJAZY_MYSQL_TLS_REJECT_UNAUTHORIZEDtrueWhether to verify the MySQL server certificate.
ENJAZY_AUTH_DB./data/auth.dbThe auth/control database path in accounts mode.
ENJAZY_USERS_DIR./data/usersThe per-user store directory in accounts mode.
ENJAZY_ISSUERunsetThe public issuer URL ({issuer}) used in links and e-mails.
ENJAZY_SITE_ORIGINunsetOnline only: the public website and /console origin. Defaults to http://localhost:<port> on Online; its app/issuer defaults to the. plus this hostname, with the same scheme and port. Ignored by the self-hosted composition root.
ENJAZY_CORS*The CORS allow-list; unset, blank or * reflects any origin.
ENJAZY_TLS_CERTunsetA TLS certificate file to enable the built-in HTTPS listener.
ENJAZY_TLS_KEYunsetThe TLS key file for the built-in HTTPS listener.
ENJAZY_HTTP_PORTunsetAn optional cleartext companion port alongside built-in TLS.
ENJAZY_TRUST_PROXYloopbackWhich proxies' X-Forwarded-* headers are trusted: none, loopback, or a list of addresses.
ENJAZY_ADMIN_USERunsetThe first-run admin username.
ENJAZY_ADMIN_EMAILunsetThe first-run admin e-mail.
ENJAZY_ADMIN_PASSWORDunsetThe first-run admin password.
ENJAZY_ADMIN_PASSWORD_FILEunsetA file whose content (without its final line ending) is the first-run admin password; ENJAZY_ADMIN_PASSWORD wins when both are set.
ENJAZY_SIGNUPSfalseWhether self-service sign-up is enabled.
ENJAZY_SETUP_SKIP_VALIDATIONfalseSkips the first-run public-URL validation.
ENJAZY_PLAN_GATESoffPlan gates: off, legacy or all.
ENJAZY_SMTP_URLunsetA full SMTP connection URL.
ENJAZY_SMTP_HOSTunsetThe SMTP host (used when ENJAZY_SMTP_URL is unset).
ENJAZY_SMTP_PORT587The SMTP port.
ENJAZY_SMTP_USERunsetThe SMTP user name.
ENJAZY_SMTP_PASSWORDunsetThe SMTP password.
ENJAZY_SMTP_PASSWORD_FILEunsetA file whose content (without its final line ending) is the SMTP password; ENJAZY_SMTP_PASSWORD wins when both are set. The setup wizard writes this one.
ENJAZY_SMTP_SECUREfalseWhether SMTP uses a secure connection.
ENJAZY_MAIL_FROMunsetThe sender address; unset derives no-reply@<public host>.
ENJAZY_MAIL_FROM_NAMEunsetThe sender name; unset uses the public host on a self-hosted server.
ENJAZY_MAIL_TRANSPORTsmtp when ENJAZY_SMTP_URL or ENJAZY_SMTP_HOST is set; otherwise file in development and none in productionThe mail transport override: smtp, file or none.
ENJAZY_SUPPORT_EMAILunsetThe support e-mail published in the public config.
ENJAZY_DEVICE_LICENCE_SALESfalseEnjazy Online only: true sells the lifetime Desktop + Mobile licence at Checkout. Off by default (the Desktop and Mobile apps are free; Checkout refuses device). A self-hosted server ignores it.
ENJAZY_SALES_EMAILinfo@roaa.techEnjazy Online only: the inbox that receives the Business "Contact us" requests from the website's pricing page (one e-mail per request, through the mail outbox). One address. A self-hosted server has no such form.
ENJAZY_WEB_APP_ORIGINunsetThe public origin used in copied links behind a rewriting proxy.
ENJAZY_PRIVACY_URLunsetThe target of /privacy; unset renders the family 404.
ENJAZY_TERMS_URLunsetThe target of /terms; unset renders the family 404.
ENJAZY_HELP_URLunsetThe target of /help; unset renders the family 404.
ENJAZY_STATUS_URLunsetThe status link published in the public config.
ENJAZY_LOG_LEVELinfoThe pino log level: fatal, error, warn, info, debug, trace or silent.
ENJAZY_SAAS_URLunsetThe Enjazy Online URL used by clients, and where a Free server buys Pro (unset: https://the.enjazy.app). A server key names its own issuer, so a key does not need it.
ENJAZY_LICENSE_KEYunsetA signed server key (esk1.…) from Enjazy Online. It wins over a key installed on the admin Licence page, which then shows it read-only. Old esl_ keys are not accepted.
ENJAZY_LICENSE_OWNER_TOKENunsetRetired: ignored. When it is set the server logs licence.owner_token_ignored at boot and the Licence page says so. Use a server key.
ENJAZY_LICENCE_ROOT_KEY_FILEunsetEnjazy Online only: the licence root private key file (Ed25519 JWK) that signs server keys and server licences. Keep it secret and outside the repository. A release build without it cannot create server keys.
ENJAZY_PLANS_DB./data/saas/plans.dbThe plans catalogue database path.
ENJAZY_SERVER_LICENSES_DB./data/saas/server-licenses.dbThe server licence keys database path.
ENJAZY_CLIENT_LICENSES_DB./data/saas/client-licenses.dbThe client licence keys database path.
ENJAZY_PLAN_SUBSCRIPTIONS_DB./data/saas/plan-subscriptions.dbThe subscriptions database path.
ENJAZY_TRIAL_DAYS14Enjazy Online only: the days of the free Business trial each new account gets (counted only while it is the plan in force, after the sign-up offer); 0 turns it off. A self-hosted server has no trial.
ENJAZY_SIGNUP_PROMO_MONTHS4Enjazy Online only: the sign-up offer of each new account in months of 30 days (counted only while it is the plan in force, before the trial); 0 turns it off. A self-hosted server has no offer.
ENJAZY_REQUIRE_VERIFIED_EMAILfalse (Enjazy Online: true)When true, an account must confirm its e-mail address before it can use a paid plan or share lists. Turn it on only when mail delivery works (ENJAZY_SMTP_URL or ENJAZY_SMTP_HOST), so people get the confirmation link. Administrators can mark an address verified in the console.
ENJAZY_REFERRALStrueEnjazy Online only: invite codes and their rewards; false turns the program off. A self-hosted server has no invite program.
ENJAZY_STRIPE_SECRET_KEY_FILEunsetEnjazy Online only: the file holding the Stripe secret key. With the two settings below it turns billing on; a self-hosted server ignores it.
ENJAZY_STRIPE_WEBHOOK_SECRET_FILEunsetEnjazy Online only: the file holding the Stripe webhook signing secret (whsec_…).
ENJAZY_STRIPE_PRICESunsetEnjazy Online only: the Stripe price ids, plan:interval=price_id, comma-separated (plans pro, team, business; intervals month, year).
ENJAZY_STRIPE_AUTOMATIC_TAXfalseEnjazy Online only: Stripe Tax calculates tax at Checkout.
ENJAZY_STRIPE_SUCCESS_URL<web app>/settings/planEnjazy Online only: where Stripe Checkout returns after a payment.
ENJAZY_STRIPE_CANCEL_URL<web app>/settings/planEnjazy Online only: where Checkout returns when abandoned, and where the billing portal returns.
ENJAZY_WEBHOOKS(empty — no webhooks)The operator-configured webhook URLs.
ENJAZY_WEBHOOK_SECRETunsetThe HMAC secret for webhook signing.
ENJAZY_WEBHOOK_POLL_MS1000The webhook poll interval in milliseconds.
ENJAZY_TEST_MYSQL_URLunsetA MySQL URL used by tests only.
ENJAZY_AI_PROVIDERunsetThe AI provider type: openai (OpenAI-compatible) or anthropic (Anthropic-compatible). See AI assistant.
ENJAZY_AI_BASE_URLunsetThe provider's base URL, for example https://api.deepseek.com.
ENJAZY_AI_MODELunsetThe provider's model id, for example deepseek-chat.
ENJAZY_AI_KEY_FILEunsetA file whose whole content (trimmed) is the provider API key. The key itself is never an environment value.
ENJAZY_AI_TIMEOUT_MS30000The time limit of one provider request in milliseconds, kept within 1000–120000.
ENJAZY_AI_MAX_TOKENS1024The most tokens the provider may write in one answer, kept within 64–8192.
ENJAZY_PUSH_CONTACTunset (falls back to mailto: + ENJAZY_SUPPORT_EMAIL, then an https:// ENJAZY_ISSUER)The operator contact sent to browser push services with every web push reminder (VAPID sub): mailto:you@example.com or an https:// URL.
ENJAZY_PUSH_VAPID_FILEpush-vapid.json in the data directoryThe VAPID key file of web push reminders. Created at first start when missing; keep it with your backups.
ENJAZY_ENVunsetSet to production (or set NODE_ENV=production) to enable production behaviour.
NODE_ENVunsetSet to production to enable the same production behaviour as ENJAZY_ENV=production.
ENJAZY_STRIPE_SERVER_PRICESunsetEnjazy Online only: Server Pro prices, month=price_…, year=price_… (recurring) and lifetime=price_… (paid once, the lifetime server licence), comma-separated and distinct from the Online prices. Unset disables server purchases. Use Stripe test-mode prices until the owner configures the live account.

In development the file transport writes e-mails as .eml files to the data directory's outbox/; in production without SMTP configured, mail is off until the admin provides the mail configuration.

Server licence

A self-hosted server unlocks Server Pro with a server key issued by Enjazy Online (Subscriptions → Server keys). Install it in one of two ways:

  1. Admin console. Open Settings → Server license, paste the key and choose Install. The key is saved in the data directory (server-licence.key, readable only by the server's user) and takes effect at once, without a restart.
  2. Settings file. Set ENJAZY_LICENSE_KEY. It wins over a key installed in the console, and the console shows it read-only.

The key names the Enjazy Online that issued it, and the server checks it offline against the Enjazy licence root key built into the server, so a forged or altered key is refused before anything is sent. Keys in the old esl_ format no longer work: ask for a new server key.

Server ID, checks and one key per server

HTTPS and reverse proxy

Two supported options:

  1. Built-in TLS. Set ENJAZY_TLS_CERT and ENJAZY_TLS_KEY to enable an HTTPS listener. Optionally set ENJAZY_HTTP_PORT for a cleartext companion port.
  2. Reverse proxy. Terminate TLS at the proxy and forward to ENJAZY_HOST:ENJAZY_PORT. Set ENJAZY_TRUST_PROXY to the proxy addresses so X-Forwarded-* headers are trusted; without it every user behind the proxy shares one lockout IP (and one sign-up quota: 20 new accounts per IP per hour) and Secure/HSTS cannot be decided. Set ENJAZY_WEB_APP_ORIGIN when the proxy rewrites the public host, so copied links use the public origin. Passkeys work only on the server's own origins: ENJAZY_ISSUER, ENJAZY_WEB_APP_ORIGIN, ENJAZY_SITE_ORIGIN and the origins listed in ENJAZY_CORS; a passkey prompt opened from any other address fails. Proxy the WebSocket upgrade for /api/sync/ws.

Plain HTTP on a LAN host. The admin console sets its session cookies as Secure __Host- cookies, and the web app's sign-in, passkeys and two-step setup need a secure browser context. Browsers grant both only to https:// origins and to localhost / *.localhost names. On a plain-HTTP host such as http://server1.lan:8787 the admin sign-in loops back to the login page and those features fail in every browser; use the *.localhost development hosts from .env.example, or put HTTPS in front as described above.

The web app is always served same-origin by the server that hosts its API.

Web push reminders

Installed or open in a browser, the web app can receive task reminders while no Enjazy tab is open (Settings › Notifications › Push notifications, on the web only). The server sends them through the browser's push service (Google FCM for Chrome, Edge on some systems, Opera and Samsung Internet; Mozilla for Firefox; Microsoft WNS for Edge; Apple for Safari and web apps added to the Home Screen on iPhone and iPad).

SMTP and e-mail

Set ENJAZY_SMTP_URL, or ENJAZY_SMTP_HOST with ENJAZY_SMTP_PORT, ENJAZY_SMTP_USER, ENJAZY_SMTP_PASSWORD and ENJAZY_SMTP_SECURE. The mail transport is smtp when SMTP is set, file in development, and none in production when unset. In development the file transport writes e-mails under the data directory's outbox/. Never use SMTP in automated runs.

First-run setup

In accounts mode the server validates the public URL before any database initialisation. Provide ENJAZY_ADMIN_USER, ENJAZY_ADMIN_EMAIL and ENJAZY_ADMIN_PASSWORD to seed the first admin, then sign in to the console at /console. Set ENJAZY_SETUP_SKIP_VALIDATION=1 only for local development behind *.localhost.

Setup in the browser

When the server starts with no .env or .env.local (or, with --instance=<name>, no .env.<name> pair) in its working folder or its data folder, no ENJAZY_* configuration variable in its environment and no completed setup (<data>/setup.json), it starts in setup mode instead. The variables a launcher always sets do not count: ENJAZY_HOST, ENJAZY_PORT, ENJAZY_DB, ENJAZY_AUTH_DB, ENJAZY_USERS_DIR (the Docker image's) and ENJAZY_ENV. Anything else boots exactly as before, so a headless or Docker install that passes its answers in the environment keeps the flow above.

In setup mode the server opens no database. It prints one line on standard output with the wizard address and a one-time setup code:

Enjazy setup: open http://localhost:8787/setup in a browser and enter the setup code XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

The code is shown only there, never written to a file or a log, and stops working when setup completes or the process exits. Five wrong codes from one address within 15 minutes block that address for the rest of the window. Every path other than the wizard answers 503 {"error":"setup_required"}; / and /console lead to /setup.

The wizard asks for the language, the code, the public address (checked with the same reachability test as above; Enjazy Online also shows the app host the.<address> and <address>/console), the data folder (shown, not asked: accounts mode keeps every account and its tasks in the built-in database there), e-mail (optional, with Send test email), the first administrator, and the optional AI provider (with Test connection) and, on Enjazy Online, Stripe. Save and start Enjazy writes .env in the data folder (the folder of ENJAZY_AUTH_DB: ./data by default, ./data/saas for Enjazy Online, /data in the Docker image), beside setup.json, with mode 0600. It puts every secret (the SMTP password, the AI key, the Stripe keys) in its own file under secrets/ in that folder, referenced by a *_FILE variable, seeds the administrator, writes setup.json and starts normally in the same process. It never replaces an existing .env, and a failed write leaves no partial file. AI configured this way stays off until Test connection succeeds in the admin console.

Every start reads the env files in this order, and a value already set is never replaced: exported variables, then the working folder's .env.local and .env, then the data folder's .env.local and .env. A recreated Docker container that keeps its /data volume therefore keeps the configuration the wizard wrote; back up the data folder as a whole.

If setup.json exists but its configuration is gone (no env file and no ENJAZY_* configuration variable sets ENJAZY_AUTH any more, or Enjazy Online no longer has the addresses setup saved), the server refuses to start and names the marker and the folders it looked in. It never falls back to open mode after setup. Restore the .env from the data folder backup, or pass the configuration in the environment.

The wizard always sets up accounts mode, which keeps sign-in accounts and each person's and share's tasks in SQLite files under the data folder, so it has no database choice. MySQL (ENJAZY_DB_DRIVER=mysql with the MySQL settings above, the password inline or in ENJAZY_MYSQL_PASSWORD_FILE) is for the shared-workspace modes without accounts (ENJAZY_AUTH=none or api-key); set it by hand in .env instead of running the wizard.

The wizard page is part of the admin build (npm run build:admin builds apps/admin/dist-setup; the release bundle carries it as public/setup).

AI assistant (bring your own key)

The AI assistant suggests sub-tasks and a priority for a task, summarizes the week, and plans a goal: a person describes what they want to plan and gets a plan of projects, lists, tasks and sub-tasks to choose from before anything is added. On a self-hosted server it runs with your own provider account and key. The app never holds the key: it calls this server, and the server calls the provider.

AI needs accounts mode (ENJAZY_AUTH=accounts), because every request is counted against a signed-in account. In none and api-key mode AI is always off.

AI is included on the server Free plan. No plan gates it.

When AI is on

AI is off until both of these are true:

  1. The provider type, base URL, model and key are all set.
  2. Test connection in the admin console (Settings → AI assistant) succeeded for exactly that configuration.

Any change of the provider type, base URL, model or key needs a new test. This includes a new key in the key file. Test connection must succeed for AI to be on: a failed test turns AI off. Changing the timeout, the maximum tokens or the daily limit does not need a new test. The admin guide describes the console section.

Once AI is on, a provider that is slow, unreachable or refuses a request does not turn it off. The person sees "Couldn’t reach the AI provider" with Try again, and the request is not counted. Only a change of the configuration or a failed Test connection turns AI off.

A model on your own machine

A local model (for example one served by llama.cpp or Ollama with an OpenAI- or Anthropic-compatible API) answers much more slowly than a hosted one. Set the AI timeout to 120000 ms (ENJAZY_AI_TIMEOUT_MS=120000, or 120 seconds in Settings → AI assistant), then run Test connection. A plan always gets up to 120 seconds, whatever the timeout, because a whole plan takes 25 seconds or more on a local model. If a reverse proxy sits in front of the server, let it wait at least as long for an answer (for example proxy_read_timeout 130s; in nginx). Otherwise the proxy gives up first.

Provider types

A trailing slash on the base URL is ignored.

The key

The key is never an environment value. Give it in one of two ways:

  1. Key file. Set ENJAZY_AI_KEY_FILE to a file whose whole content is the key (surrounding spaces and line breaks are trimmed). Make the file readable only by the server's user. The server reads the file each time it needs the key; an unreadable or empty file counts as no key.
  2. Admin console. Paste the key in Settings → AI assistant. It is write-only: no page or API shows it again. The server stores it sealed (AES-256-GCM, under a key derived from the server secret in the accounts database).

A key entered in the console wins over the key file. Remove it in the console to use the key file again.

Configuration

Set the provider with the AI variables in the environment table, in the admin console, or both. A value set in the console wins over the environment. Clearing a field in the console falls back to the environment value. The maximum tokens can only be set in the environment.

Each provider request has the timeout (default 30 seconds). A server error (5xx) or a network failure is retried once. A timeout is not retried.

Example settings. The key goes only in the key file, never in a settings file or the repository:

ENJAZY_AUTH=accounts
ENJAZY_AI_PROVIDER=openai
ENJAZY_AI_BASE_URL=https://api.deepseek.com
ENJAZY_AI_MODEL=deepseek-chat
ENJAZY_AI_KEY_FILE=/etc/enjazy/ai-key

Create the key file on Linux:

sudo install -m 600 -o enjazy -g enjazy /dev/null /etc/enjazy/ai-key
sudo nano /etc/enjazy/ai-key    # paste the key, save

Use the user the server runs as in place of enjazy. In Docker the server runs as node: mount the key file read-only into the container and set ENJAZY_AI_KEY_FILE to its path there. Then restart the server, sign in to the admin console and choose Test connection.

Check a provider before you turn AI on

tools/ai-smoke.mjs checks a provider from a repository checkout (after npm ci), without starting the server. It sends one small sub-task request and one priority request through the server's own provider code (the same adapters, prompts and answer checks the server uses) and prints, for each, ok or the failure kind with the time it took. It never prints the key, the prompt or the provider's answer, and it stores nothing.

The key is read only from a file (--key-file); the tool refuses a key given on the command line. Each option falls back to the server's variable (ENJAZY_AI_PROVIDER, ENJAZY_AI_BASE_URL, ENJAZY_AI_MODEL, ENJAZY_AI_KEY_FILE, ENJAZY_AI_TIMEOUT_MS), so the server's own settings can be checked as they are.

Check DeepSeek (or any OpenAI-compatible provider):

node tools/ai-smoke.mjs --type openai --base-url https://api.deepseek.com --model deepseek-chat --key-file /etc/enjazy/ai-key

A working provider prints:

ai-smoke: openai-compatible · model deepseek-chat
subtasks  ok  812 ms
priority  ok  640 ms

For an Anthropic-compatible provider use --type anthropic and its base URL. The exit code is 0 when both requests are ok, 1 when one failed and 2 for a missing option or an unreadable or empty key file. A failure line names the gateway's kind and reason, for example priority failed unavailable (auth, HTTP 401) 95 ms:

ReasonWhat to check
authThe key is refused: check the key file.
not_foundWrong base URL or model, or an address that is not http(s).
rate_limitedThe provider's rate limit or balance.
http_5xx, network, timeoutThe provider or the network; try again, or raise --timeout-ms.
http_4xx, bad_response, invalid_output (kind failed)The provider answered, but not as expected: check that the model follows instructions and can answer in JSON.

The tool sends two real requests, which the provider may bill. They are not counted against any person's daily limit. After a successful check, turn AI on with Test connection in the admin console.

Daily limit

The administrator can set a daily limit per person in the admin console. The default is no limit. One successful request counts as one; a failed request is not counted. A plan counts as one request; Regenerate in the planner asks again and counts as another.

A plan is a longer answer than a sub-task suggestion. The server asks the provider for up to 4,096 output tokens for a plan (never more than 8,192, and never less than the maximum tokens you set). It waits up to 120 seconds for a plan, or longer than the timeout you set if that is longer, up to the same 120-second maximum. The count starts again at midnight UTC. When a person's requests for the day are used up, the app shows when they start again.

The AI usage section of the admin console (in Settings, below AI assistant) shows how many successful requests the server answered today and in the last 30 days, with the daily limit. It shows counts only. A failed or cancelled request is not counted.

Privacy

Endpoints and errors

GET /health on an accounts server includes "ai": {"available": true} or "ai": {"available": false}. A signed-in app asks GET /api/ai/status to know whether the Cloud provider can be chosen.

The app uses these endpoints. Each needs a signed-in account.

EndpointPurpose
POST /api/ai/subtasksSuggests up to five sub-tasks for a task.
POST /api/ai/prioritySuggests importance and urgency for a task, with a reason.
POST /api/ai/summarySummarizes the week.
POST /api/ai/planPlans a goal: up to 3 new projects, 6 new lists and 40 tasks, nested at most three levels, with priorities and dates between today and two years ahead. The server checks the answer and drops what does not fit.
GET /api/ai/statusWhether AI is on, and the person's limit, use and reset time today.

A request must carry consent: true; without it the server answers 400 invalid_body and sends nothing to the provider. The AI errors are:

CodeStatusMeaning
ai_quota429The daily limit is used up. resetsAt gives the next midnight UTC.
ai_unavailable503AI is not on here: no accounts mode, the provider is not set up, or Test connection has not succeeded for this configuration.
ai_provider_unavailable502AI is on, but the provider did not answer or refused now. retryable is true for a timeout, a network failure, a provider server error or a rate limit, and false for a refused key or a wrong model or URL (fix the provider settings).
ai_failed502The provider refused this request for another reason, or its answer could not be read.

Backups

Back up the data directory: in accounts mode this holds auth.db, users/, setup.json and outbox/; in every mode it also holds push-vapid.json (and push.db once a browser turned push notifications on). Restore by placing the files back while the server is stopped. Backups contain user data, never the PIN hash, credentials or device-local state.

Enjazy desktop apps on your team's computers

For administrators who install the Enjazy desktop app for their users:

Migrating a 1.x server

migrate-v1 migrates a 1.x server into a new database, never in place and never without a backup copy:

npm run -w @enjazy/server migrate-v1 -- --from <1.x data dir or MySQL URL> --to <new data dir> [--dry-run]

Run the dry run first; it reports the count of each mapping. Accounts, password hashes, two-step, passkeys, shares, invitations, plans, subscriptions and keys are carried.

Database CLI

npm run -w @enjazy/server db -- status
npm run -w @enjazy/server db -- up
npm run -w @enjazy/server db -- down

status reports the current schema, up applies the forward-only ladder, and down restores the pre-upgrade backup copy instead of running destructive down migrations.

Self-hosted bundles serve the app at / and the console at /console; they do not include the public website. Old /admin links redirect permanently to /console.

The setup wizard preserves the SMTP encryption choice. For a host/port SMTP configuration, ENJAZY_SMTP_REQUIRE_TLS=true requires STARTTLS for normal delivery; implicit TLS uses ENJAZY_SMTP_SECURE=true. Existing configurations keep their defaults when the new variable is absent.