On a Linux server (PM2 + Nginx)
Install Node.js 22+ and copy the project to the server, for example
/var/www/dar.Create
.envas in Installation and set the public address:SITE_URL="https://www.your-agency.om" DEMO_MODE="false"SITE_URLis used for canonical links,sitemap.xml, the listing JSON-LD and share links. When it starts withhttps://the staff session cookie is marked secure.Install, create the database and build:
npm ci npm run setup npm run buildKeep it running with PM2:
npm install -g pm2 pm2 start npm --name dar -- start pm2 save && pm2 startupPut Nginx in front for HTTPS:
server { server_name www.your-agency.om; client_max_body_size 25m; # several listing photos per upload location / { proxy_pass http://127.0.0.1:3303; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; # AI staging can take a minute } }Then add a certificate, for example with
certbot --nginx.X-Forwarded-Formatters: request limits (sign-in, inquiries) count per visitor IP.
With Docker
A minimal image:
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npx prisma generate && npm run build
EXPOSE 3303
CMD ["sh", "-c", "npx prisma db push && node prisma/seed.mjs && npm start"]
Mount volumes for prisma/ (the SQLite file) and storage/uploads, or use PostgreSQL and object storage.
Updating
git pull # or copy the new files
npm ci
npx prisma db push # applies new tables or columns, keeps your data
npm run build
pm2 restart dar
Backups
With SQLite the whole agency is prisma/dar.db plus the uploaded photos in storage/uploads. Back up both every night:
sqlite3 prisma/dar.db ".backup /backups/dar-$(date +%F).db"
tar czf /backups/uploads-$(date +%F).tgz storage/uploads
After going live
- Remove or deactivate the sample staff accounts (Dashboard > Team) and change the owner password (Dashboard > My account).
- Submit
https://www.your-agency.om/sitemap.xmlin Google Search Console. - Check
robots.txt: the dashboard, the API, saved homes and the comparison page are not indexed.