Run the CRM without Docker
Install and start each Closeline app with Node.js and Yarn, one terminal per app, then build them for production.
For the Full Stack package
Before you start: install Node.js 22.22.3 or a later 22 release, 24.15 or a later 24 release, or 26 or newer, and run corepack enable once. No database server and no compiler are needed.
Open every terminal where the commands below expect it: inside closeline-full-stack for the full stack, or next to the app's folder for a single-app package.
| App | Folder | Address |
|---|---|---|
| API | back-end | localhost:8000Local |
| Website | website | localhost:3030Local |
| CRM dashboard | dashboard | localhost:3031Local |
Start the API first: the dashboard reads all of its data from it, and the website's contact form sends to it.
Start the API
Install and configure
.env.exampleworks as it is on your own computer: SQLite in./database.sqlite, the API on port8000, and the website and the dashboard allowed to call it.Terminalcorepack enable cd back-end yarn install cp .env.example .envHaving trouble?Create the database
yarn seedcreatesdatabase.sqlite, its tables and the sample workspace Studio Sales: 12 companies with a contact each, 12 open and 50 closed deals with their timeline and notes, 34 activities, six months of revenue history, seven delivery projects with 24 tasks, the team of three with two pending invitations, a Team plan with three paid invoices and six sample assistant conversations. Run again on a database that already has accounts, it adds no account or workspace.Terminalinback-endyarn seedExpected result: It ends with
Seed complete. Sign in as demo@closeline.example (Admin), manager@closeline.example or member@closeline.example with CloselineDemo!2026.Start the server
Terminalinback-endyarn devExpected result: localhost:8000/
Having trouble?api/ healthLocal answers {"success":true,"data":{"status":"ok","database":"up"},"message":""}.
Start the API
Install and configure
.env.exampleworks as it is on your own computer: SQLite in./database.sqlite, the API on port8000, and the website and the dashboard allowed to call it.Terminalcorepack enable cd closeline-backend yarn install cp .env.example .envHaving trouble?Create the database
yarn seedcreatesdatabase.sqlite, its tables and the sample workspace Studio Sales: 12 companies with a contact each, 12 open and 50 closed deals with their timeline and notes, 34 activities, six months of revenue history, seven delivery projects with 24 tasks, the team of three with two pending invitations, a Team plan with three paid invoices and six sample assistant conversations. Run again on a database that already has accounts, it adds no account or workspace.Terminalincloseline-backendyarn seedExpected result: It ends with
Seed complete. Sign in as demo@closeline.example (Admin), manager@closeline.example or member@closeline.example with CloselineDemo!2026.Start the server
Terminalincloseline-backendyarn devExpected result: localhost:8000/
Having trouble?api/ healthLocal answers {"success":true,"data":{"status":"ok","database":"up"},"message":""}.
Start the website
In a second terminal:
Install and configure
Every value in the website's
.envis optional. The copy points it at the API on port8000and the dashboard on3031.Terminalcd website yarn install cp .env.example .envStart it
Terminalinwebsiteyarn devExpected result: localhost:3030Local opens the home page in English; Arabic is at
Having trouble?/ar.
Start the website
Started with no .env, the website runs on its built-in sample data: the contact form is answered in the browser and nothing is sent anywhere. To send messages to the template's API, start the API first and run cp .env.example .env before yarn dev: the copy expects it at http://localhost:8000/api.
Start it
Terminalincloseline-websiteyarn devExpected result: localhost:3030Local opens the home page with a "Sample data" notice; Arabic is at
Having trouble?/ar.
Start the CRM dashboard
In a third terminal:
Install and configure
The copied
.envpoints the dashboard at the API and its live updates on port8000, and serves it on port3031.Terminalcd dashboard yarn install cp .env.example .envStart it and sign in
Terminalindashboardyarn devExpected result: localhost:3031Local opens the sign-in page. Sign in with
Having trouble?demo@closeline.exampleand the passwordCloselineDemo!2026.
Start the CRM dashboard
Started with no .env, the dashboard runs on its built-in sample data: any password signs in, and what you change stays in that browser. To use the template's API, start the API first and run cp .env.example .env before yarn dev: the copy expects it at http://localhost:8000/api.
Start it and sign in
Terminalincloseline-dashboardyarn devExpected result: localhost:3031Local opens the sign-in page with a "Sample data" notice. Any password signs in:
Having trouble?demo@closeline.exampleopens the Admin,manager@closeline.examplethe Manager andmember@closeline.examplethe Member.
Production build of the API
The same folder, built once and then started. First set the API's .env for production: with NODE_ENV=production the API never changes the tables by itself, and it refuses to start while JWT_SECRET is empty or still the example value, or while CORS_ORIGIN is empty.
NODE_ENV=production
JWT_SECRET=paste-the-generated-secret-here
CORS_ORIGIN=http://localhost:3030,http://localhost:3031
FRONTEND_URL=http://localhost:3031
DASHBOARD_URL=http://localhost:3031
PUBLIC_API_URL=http://localhost:8000Generate the secret with node -e "console.log(require('crypto').randomBytes(48).toString('hex'))". Then build, create the tables once, and start. On a new database, yarn admin:create:prod creates the tables and your own first account from ADMIN_EMAIL and ADMIN_PASSWORD, with an empty workspace and no sample data; it asks in the terminal for whichever is empty. yarn seed:prod in its place loads the sample workspace with its published sign-ins, for a sample install only.
yarn build
yarn admin:create:prod
yarn start:prodThere are no migrations. After an update whose code changes the tables, back up the database, then run yarn build and yarn schema:prod before yarn start:prod. The schema update also drops a column the code no longer has, with its data.
Production build of the frontends
In each frontend's folder, stop yarn dev, build once and start. The website serves on 3030 and the dashboard on 3031.
yarn build
yarn startThe frontends compile their NEXT_PUBLIC_* values in at build time, so set them before yarn build and run it again after changing one.
Start over with fresh sample data
Stop the API, then delete the database file and seed it again, in the API's folder. This deletes everything you created.
rm -f database.sqlite* && yarn seedIn PowerShell:
Remove-Item database.sqlite*; yarn seedyarn drop drops every table, on SQLite and MySQL alike, and yarn seed creates them again. yarn reset empties every table instead.