Troubleshooting
The errors you can meet while installing Closeline, what causes each one, and how to fix it, with Docker or without.
For the Full Stack package
Docker is not running
failed to connect to the docker API at unix:///…/docker.sock; check if the path is correct and if the daemon is runningOlder Docker versions say "Cannot connect to the Docker daemon" instead. Either way, the Docker engine is not started.
Open Docker Desktop
Start Docker Desktop and wait until it reports that the engine is running. On Linux, start the service:
sudo systemctl start docker.Check that Docker answers
Terminaldocker infoExpected result: It prints a Server section instead of an error.
Run your start command again
docker compose up --buildfor the full stack, or yourdocker buildanddocker runfor a single app.
A port is already in use
ports are not available: exposing port TCP 0.0.0.0:3031 … bind: address already in use
Bind for 0.0.0.0:3031 failed: port is already allocated
Error: listen EADDRINUSE: address already in use :::3031The first two lines come from Docker, the last from yarn dev. Another program already listens on 3030, 3031 or 8000: often an earlier run of the CRM, or another project's dev server. Docker names one busy port at a time.
Find what holds the port
On macOS or Linux, with the port from the message:
Terminallsof -i :3031On Windows, in PowerShell:
Terminalnetstat -ano | findstr :3031Stop it
Close that program, or stop the earlier run: Ctrl+C in its terminal,
docker compose downin its folder, ordocker stopfor a container you started withdocker run. Then start the CRM again.Or run the CRM on other ports
With the full stack in Docker, create a file named
.envin thecloseline-full-stackfolder, besidedocker-compose.yml, with the port you need.SITE_PORTmoves the website,ADMIN_PORTthe dashboard andAPI_PORTthe API; every address the apps use,CORS_ORIGINincluded, follows by itself.closeline-full-stack/.envADMIN_PORT=3041Then run the same command again. A failed start picks up where it stopped. If the next start stops on another busy port, add that one to
.envtoo.Terminalincloseline-full-stackdocker compose up --buildExpected result: The app answers on its new port, here localhost:3041Local.
For a single app started with docker run, change the number on the left of -p, for example -p 3041:3031, and open that port. Without Docker: the dashboard's port is PORT in its .env; the website's is 3030 in its package.json, so start it with yarn next dev -p 3040; the API's is PORT in its .env, and moving it means changing NEXT_PUBLIC_API_BASE_URL in both frontends, and PUBLIC_API_URL and PUBLIC_MEDIA_URL in the API, together. A frontend on a new address also goes into the API's CORS_ORIGIN.
The Docker build fails
The first build downloads the base images and every dependency, then builds the images. It stops with "failed to solve" and the step that failed when something gets in the way.
- No connection or a timeout: the build needs internet access. Run the command again once you are online; finished steps are cached.
- No space left on device: free space in Docker Desktop, or check what Docker uses with
docker system df. - It fails at the same step every time: rebuild without the cache, then start.
closeline-full-stackdocker compose build --no-cache
docker compose upFor a single-app package, add --no-cache to your docker build command.
A first start that seems stuck is usually still seeding the sample workspace. The website and the dashboard start only once the API reports itself healthy.
Yarn says its version is 1.22
This project's package.json defines "packageManager": "yarn@4.8.1…". However the current global version of Yarn is 1.22…Each app pins Yarn 4.8.1 through Corepack. This message means Corepack is not enabled yet, so the old global Yarn answered instead.
corepack enableThen run yarn install again. Node.js 26 and newer no longer include Corepack: install it first with npm install -g corepack. npm and pnpm are not used: each app ships its own yarn.lock.
An install or a start fails on another Node.js
Every app declares Node.js 22.22.3 or a later 22 release, 24.15 or a later 24 release, or 26 and newer, and the Docker images run on Node.js 24. Yarn does not stop another version by itself, so an older Node.js shows up later, as an install that fails on a package or an app that stops at start.
node -vIf it prints a version outside that range, install a supported Node.js, run corepack enable again, then delete the app's node_modules folder and run yarn install again. No compiler is needed on any supported version. With Docker none of this applies: the images bring their own Node.js.
The API stops before starting
The API cannot start: JWT_SECRET is not set. Set it in back-end/.env to the output of: …
The API cannot start: JWT_SECRET is still the example value from .env.example, so anyone can sign a token for any account. …
The API cannot start: CORS_ORIGIN is not set. List the website and dashboard origins, comma separated, …The API checks its settings before it starts and prints one line per problem. The causes:
- There is no `.env` file, or `JWT_SECRET` is empty. Create the file in the API's folder with
cp .env.example .env. - `JWT_SECRET` is still the example value with `NODE_ENV=production`. Anyone could sign a token with the public example, so a production start refuses it. Generate your own secret.
- `CORS_ORIGIN` is empty with `NODE_ENV=production`. List the website's and the dashboard's addresses, comma separated.
Generate a secret with:
node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"With Docker you do not need one: a container without a JWT_SECRET of its own, or with the example one, generates a secret and keeps it in the data volume.
The database is empty and nobody can sign in
→ No database at /data/database.sqlite. Creating the schema without sample data.
→ No account exists yet. Create the first Platform admin with: docker compose exec -u node api node dist/database/create-admin.js …The database was created with tables only. That happens when a new volume starts with SEED_SAMPLE_DATA=false but without ADMIN_EMAIL and ADMIN_PASSWORD, or without Docker when yarn schema ran instead of yarn seed. There is no workspace and no account to sign in with.
- For your own first account: run the command the log names (with a single API container,
docker exec -it -u node <container> node dist/database/create-admin.js), oryarn admin:createwithout Docker. It asks for the email and the password. - For the sample workspace: without Docker, run
yarn seed. With the full stack, removeSEED_SAMPLE_DATA=falsefrom the.env, thendocker compose down -vanddocker compose up.
An existing database is never seeded again by the container, whatever SEED_SAMPLE_DATA says, so the variable only matters on a new volume.
Sign-in fails
That email and password do not match an account. Try again.
Too many failed sign-in attempts. Wait 15 minutes, then try again.- Check the account. Sign in on the dashboard at port
3031, not on the website:demo@closeline.example,manager@closeline.exampleormember@closeline.example, withCloselineDemo!2026. The eight other seeded accounts have random passwords and are not meant for signing in. - The database has no accounts when it was created with
SEED_SAMPLE_DATA=false. See The database is empty and nobody can sign in, above. - Ten failed sign-ins from one address within 15 minutes lock the form for that address. The API answers
429until the oldest failure is 15 minutes old. Wait, or restart the API: the count is kept in its memory. - While maintenance mode is on, a correct sign-in by an account that is not platform staff answers
503. Maintenance mode is the platform settingmaintenance_mode. - You changed a sample password and no longer have it: start over with fresh sample data, below.
Sign-in fails
- Check the account and the route. Sign in at
POST /api/auth/login:demo@closeline.examplewithCloselineDemo!2026on a seeded database. A failed sign-in answers401with the same message whether the email or the password is wrong. - No account works at all: the database was created without the sample data. Run
yarn seed, or create your own first account withyarn admin:create. - A `429` answer means one address failed 10 sign-ins within 15 minutes. It clears once the oldest failure is 15 minutes old, or when the API restarts.
RATE_LIMIT_LOGINchanges the number.
Sign-in fails
With NEXT_PUBLIC_API_BASE_URL empty, the dashboard runs on its built-in sample data and any password signs in. Otherwise it signs in against the template's API, so the account has to exist there: on a seeded API, demo@closeline.example with CloselineDemo!2026. The website has no sign-in of its own: its Sign in button opens the dashboard at NEXT_PUBLIC_DASHBOARD_URL. If no account works, either the API was started without its sample data (run yarn seed in its folder), or the dashboard cannot reach the API: see the next problem.
The app shows sample data and the browser reports CORS
Access to XMLHttpRequest at 'http://localhost:8000/api/…' from origin 'http://localhost:3041' has been blocked by CORS policyThe browser's console shows this line when a frontend runs on an address the API does not accept. The API answers browsers only from the addresses in CORS_ORIGIN, which defaults to http://localhost:3030 and http://localhost:3031. A website or dashboard moved to another port, or served on your own domain, is refused until it is listed. A refused app gets no answer, so it shows its built-in sample data instead, with a "Sample data" notice that the API is not answering.
CORS_ORIGIN=http://localhost:3030,http://localhost:3041
FRONTEND_URL=http://localhost:3041
DASHBOARD_URL=http://localhost:3041- Write each address exactly as the browser shows it, with the scheme and the port and without a trailing slash, comma separated. Then restart the API.
FRONTEND_URLis the dashboard's address, which its live permission updates connect from, andDASHBOARD_URLis where invitation, password-reset and checkout links send people. Move them together with the dashboard.- For an API container, pass the same values with
-e, such as-e CORS_ORIGIN=http://localhost:3030,http://localhost:3041. - With the full stack in Docker you do not edit these:
SITE_PORT,ADMIN_PORT,SITE_URLandADMIN_URLin the.envbesidedocker-compose.ymlset them. - A frontend that cannot reach the API at all, because it is stopped or at another address, does the same without the CORS line. The dashboard tries the API again every 30 seconds and returns to it once it answers. Check that localhost:8000/
api/ healthLocal answers, and that the frontend's NEXT_PUBLIC_API_BASE_URLnames that API. - The website shows the notice in
yarn dev, and in a production build only when built withNEXT_PUBLIC_SAMPLE_DATA_NOTICE=always.
A change to a frontend's .env does nothing
Every NEXT_PUBLIC_* value is compiled into the JavaScript the browser loads when the app is built. Changing the file changes nothing until the app is built again.
| How you run it | After changing a value |
|---|---|
yarn dev | Stop it and run yarn dev again. |
yarn build and yarn start | Run yarn build again, then yarn start. |
| Docker Compose | Run docker compose up --build. Set the value in the .env beside docker-compose.yml, not in the app's folder. |
docker build for one app | Build the image again with the value as a --build-arg. |
The API's own .env needs only a restart.
A role change reaches an open dashboard only after a reload
When an Admin changes a member's role or a role's grants, an open dashboard updates itself over a live connection to the API. The dashboard connects to NEXT_PUBLIC_WEBSOCKET_BASE_URL, or to the API's address without /api when that is empty, and the API accepts the connection only from FRONTEND_URL, the dashboard's own address.
- Set both to match where the apps really run, then restart the API and rebuild the dashboard.
- A reload always shows the current permissions: only the live update depends on the connection.
Invitations and password resets are not emailed
Mail is not set up (SMTP_HOST is empty): invitations, password resets and forwarded contact messages are written to this log instead of being sent.Without SMTP_HOST the API sends nothing and writes each message to its log, links included, so you can open an invitation or a reset link from there while you develop. With Docker Compose, read it with docker compose logs api.
- Set
SMTP_HOST,SMTP_PORT,SMTP_SECURE,SMTP_USER,SMTP_PASSWORDandSMTP_FROMin the API's.env, then restart the API. - A link in a message opens the dashboard at
DASHBOARD_URL. Set it to the dashboard's real address, or the link points atlocalhost. - Contact form messages are always stored in the database; they are forwarded only when
CONTACT_INBOXnames an address.
The assistant asks for an API key
The server has no key for this model's provider. Add your own API key to keep going.The server has no key for the provider of the model picked in the assistant. With no key at all, the suggested questions on the empty chat and the follow-ups under each answer are still answered from the workspace's records; a question you type needs a model, and so a key.
- Add a provider key to the API's settings and restart the API: every reader then uses it, and each message is billed to that key.
- Or add your own key in the assistant's key dialog. It stays in that browser, is sent with your own requests only, and is used before the server's key.
- On the dashboard's sample data, with no API at all, the assistant answers that it needs the API.
A plan stays on trial after a Stripe payment
A Stripe payment counts when the API confirms it: when the buyer comes back to the Billing tab, which asks Stripe about the session, or when Stripe's webhook arrives.
- The buyer never came back. Stripe returns the browser to the dashboard at
DASHBOARD_URL. On your own domain, set it to the dashboard's real address. - The webhook is not set up. On your own computer Stripe cannot reach the API, and the return page is enough. On a server, point a webhook at
https://<api>/api/billing/webhooks/stripeand setSTRIPE_WEBHOOK_SECRET, or renewals and failed payments are never recorded. - A test key moves no money. With
sk_test_..., pay on Stripe's page with the card4242 4242 4242 4242, any future date and any CVC. - `BILLING_PROVIDER=simulator` keeps the built-in test checkout even with a Stripe key, so Stripe's page never opens.
A workspace can no longer invite people
A workspace whose trial ended unpaid, or whose renewal failed, is past due. Its Admins are mailed and everything keeps working, but once BILLING_GRACE_DAYS (7 by default) have passed, it cannot invite people until a plan is paid. The Billing tab says until when people can still be invited. Nothing is ever deleted for an unpaid plan.
Pay for a plan on the Billing tab of Settings, through the built-in test checkout or Stripe, and invitations work again.
A page says a feature is on another plan
The forecast is on the Team plan.
The AI assistant is on the Team plan.
Editing role permissions is on the Team plan.
Custom roles are on the Scale plan.Nothing is broken: the workspace's plan does not include that feature. The forecast, the AI assistant and editing a role's permissions are on the Team and Scale plans, and custom roles are on Scale. The API refuses the same requests with 403 and the code plan_upgrade_required, so another client meets the same limit.
- An Admin changes the plan on the Billing tab of Settings; See plans in Billing under the notice opens it. A role that cannot see billing reads "An Admin can change the plan." instead.
- A larger plan applies as soon as it is paid, in the built-in test checkout or with Stripe. A smaller one waits for the renewal.
- A workspace made on the sign-up page trials the plan chosen on the website, Starter when none was chosen, so it has none of the four. Choose Team or Scale from the website's plans, or change the plan in Billing.
- A smaller plan deletes nothing: custom roles stay assigned and keep their permissions; only creating and editing them waits for a plan that has them.
MySQL refuses to start or to seed
The API creates its tables in a database that already exists; it does not create the database itself. Create an empty database first, give its name to DB_DATABASE in the API's .env, then run yarn seed (or yarn admin:create for your own first account and no sample data).
- Check the five
DB_*connection values and thatDB_TYPE=mysql. - With
NODE_ENV=productionthe running API never creates tables, so one of those commands has to run before the first start (yarn seed:prodoryarn admin:create:prodafteryarn build). - The Docker image creates the database by itself only on SQLite. On MySQL, run the seed or the first-account command once yourself, with the same environment.
The API container cannot find its entrypoint
exec /usr/local/bin/docker-entrypoint.sh: no such file or directoryThe script has Windows line endings, which an editor or Git on Windows can add. The shipped API Dockerfile strips them while it builds, so this appears only with an image built from a changed Dockerfile. Keep its sed -i 's/\r$//' line, or save the script with LF line endings, then rebuild without the cache.
The unzip command fails, or the folder looks different
caution: filename not matched: closeline-full-stack-….zipThis means two ZIPs of the same package sit in the folder, an older download and the new one, so * matches both and unzip reads the second name as a file to find inside the first. Delete the older ZIP, or type the full file name, and run the command again.
no matches found(zsh) orcannot find or open(bash) means the terminal is not in the folder that holds the ZIP. Move into it withcd, such ascd ~/Downloads, first.- If the
unzipcommand is missing, extract the ZIP with your file manager instead. Some tools add an extra folder named after the ZIP: move into the inner one.
| Package | Folder | Contains |
|---|---|---|
| Full Stack | closeline-full-stack | back-end, dashboard, website, docker-compose.yml |
| CRM Website | closeline-website | Dockerfile, package.json, .env.example |
| CRM Dashboard | closeline-dashboard | Dockerfile, package.json, .env.example |
| Backend API | closeline-backend | Dockerfile, package.json, .env.example |
Start over with fresh sample data
This deletes your data
Everything you created locally is removed, and the sample workspace is seeded again.
With the full stack in Docker, from the closeline-full-stack folder:
closeline-full-stackdocker compose down -v
docker compose upWith a single API container, remove the container first (docker ps -a lists it, docker rm -f with its id removes it), then delete the volume and run it again:
docker volume rm closeline-api-data
docker run -p 8000:8000 -v closeline-api-data:/data closeline-apiWithout Docker, stop the API, then in its folder:
rm -f database.sqlite* && yarn seedIn PowerShell:
Remove-Item database.sqlite*; yarn seedRunning yarn seed again on a database that has accounts is not a reset: it adds no account or workspace and only gives the built-in platform roles their permissions back. yarn drop drops every table, on SQLite and MySQL alike; run yarn seed after it.
Start over on the dashboard's sample data
On the sample data, what you change is kept in that browser's storage. To get the original sample back, clear the site data for the dashboard's address in your browser (or open it in a private window), then reload.