Skip to content

Self-host with Docker

Crewtavo runs anywhere Docker does: a laptop, an office server or a rented server (VPS). It’s the same five services the Railway template creates. This page is for whoever looks after the server; most businesses are better off on Railway.

  • Docker
  • Node.js 20 or newer, only to generate the secrets and start Docker
Terminal window
git clone https://github.com/jviars/crewtavo.git
cd crewtavo
npm run instance

The first run writes .env.instance with new secrets, builds Crewtavo, starts everything and prints the address: http://localhost:8080. Open it and create the owner account.

Terminal window
npm run instance -- logs # follow what's happening
npm run instance -- stop # stop it; the data stays in Docker volumes
npm run instance # start again, or update after a git pull
docker compose --env-file .env.instance down -v # delete the instance and all its data

To update, run git pull in the Crewtavo folder, then npm run instance again.

Settings → Web address walks you through these steps with your domain filled in, and checks each one.

  1. Point a DNS record for your domain (say ops.example.com) at the server.
  2. In .env.instance, set APP_URL=https://ops.example.com, then run npm run instance again.
  3. Put a web server with HTTPS in front of port 8080, on the same server. With Caddy, this whole Caddyfile gets a certificate and forwards everything:
ops.example.com {
reverse_proxy localhost:8080
}

Port 8080 only answers on the server itself (CREWTAVO_BIND, 127.0.0.1 by default), so visitors come in through the web server.

Public pages (booking forms, promo codes, Client Hub payments and messages, sign-in links, the first-run setup) limit how often each visitor can use them, by the visitor’s address. Crewtavo only trusts the address its own proxy sets:

  • Caddy adds each visitor’s address to X-Forwarded-For, which is what Crewtavo reads. Nothing to change.
  • nginx needs proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;.
  • A web server on another machine: set CREWTAVO_BIND to this server’s address on the private network between them, not 0.0.0.0.
  • No web server, trying Crewtavo from other computers on your network: set CREWTAVO_BIND=0.0.0.0 and CREWTAVO_VISITOR_IP=connection.
  • Something else in front, like Cloudflare’s proxy before Caddy: set CREWTAVO_VISITOR_IP. See Behind other proxies.

Back up the crewtavo-instance_db-data and crewtavo-instance_storage-data Docker volumes, and .env.instance. See Back up and export your data.

Texting, online payments, maps, AI and accounting each take a key or two in .env.instance. See Optional settings.

© 2026 Crewtavo · Website · Compare · Deploy on Railway · GitHub · Contact