Running Coil yourself
Everything needed to install Coil, get email sending, reach it from outside the office, back it up and keep it current. If you have not got an install key yet, the download page issues one in about a minute.
Coil is one container and one database file. It runs on a Mac mini in the office, a laptop, a Windows PC with Docker Desktop, or a small cloud server. Your data never leaves the machine you run it on.
What you need
- A computer that stays on when you want to use Coil (a Mac mini or an old laptop is plenty).
- Docker Desktop (Mac, Windows) or Docker Engine (Linux). Free for a firm of your size.
- A free install key from coil.legal/download. Coil asks for it once, on the first screen, together with the email it was issued to. The same email always gets the same key back, so losing it costs you one form submission.
- Ten minutes.
Install on a Mac or Linux
Open Terminal and paste:
curl -fsSL https://coil.legal/install.sh | sh
Then open http://localhost:8080 and create the owner account. That first screen asks for your install key and the email it is tied to. Coil checks it once and never again.
Install on Windows
In PowerShell:
irm https://coil.legal/install.ps1 | iex
If you would rather do it by hand: install Docker Desktop and start it, make a folder such as
C:\coil, save the two files below inside it, then run cd C:\coil and docker compose up -d.
Open http://localhost:8080.
.env:
SECRET_KEY=change-this-to-a-long-random-string
BASE_URL=http://localhost:8080
DATABASE_URL=sqlite:////app/data/practice.db
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
MAIL_FROM=
docker-compose.yml:
services:
coil:
image: ghcr.io/law-firm-automate/coil:latest
restart: unless-stopped
env_file: .env
ports:
- "8080:8000"
volumes:
- ./data:/app/data
Let a coding agent do it for you
If a terminal is not your idea of a good afternoon, a coding agent will run the whole install and answer questions in plain English while it works. Install one of Claude Code, OpenAI Codex or Grok, open it in a folder on your machine, and give it something like this:
Install Coil, the open-source law practice management app, on this computer.
The installer is at https://coil.legal/install.sh and the setup guide is at
https://coil.legal/docs. Install Docker Desktop first if it is not already
there. When Coil is running, open it and help me create the owner account.
My install key is COIL-XXXX-XXXX-XXXX and the email it is tied to is
[email protected].
Put your own key and email in the last two lines. An agent needs your permission before it runs anything, so read what it proposes rather than approving on autopilot, and do not paste any client information into it during setup.
The install is the easy part. Where an agent earns its keep is everything after: wiring up email, setting up a nightly backup, getting Coil reachable from your phone through Tailscale or a Cloudflare Tunnel, and putting the scheduled jobs on a timer. Point it at the sections below and ask it to do those one at a time.
Sending email
Invoices, engagement letters and portal links go out by email. Until you fill in the SMTP
settings, Coil stores them under Settings > Dev outbox so you can see what would have been sent.
Any mailbox works: Google Workspace (smtp.gmail.com, port 587, an app password), Microsoft 365
(smtp.office365.com, port 587), or a transactional provider. Set MAIL_FROM to the address
clients should reply to.
Reaching it from outside the office
The install listens on your local network only. To use Coil from home or a phone:
- Tailscale (simplest): install it on the Coil machine and your devices, then use the Tailscale address. Nothing is exposed to the internet.
- Cloudflare Tunnel: gives you a real HTTPS address like coil.yourfirm.com without opening
ports. Set
BASE_URLto that address so links in emails work. - A reverse proxy (Caddy, nginx) with HTTPS if you run it on a cloud server.
Do not forward port 8080 on your router to the internet. Coil expects HTTPS in front of it.
Backups
Everything is in the data folder next to your .env: the database, uploaded documents,
generated PDFs. Copy that folder somewhere safe on a schedule (Time Machine, a cloud drive, or a
nightly rsync). To restore, put the folder back and start the container.
Updating
cd ~/coil && docker compose pull && docker compose up -d
Your data folder is untouched by updates, and your install key is not asked for again.
Online payments
Create a Stripe account, paste the secret and publishable keys into .env, and point a Stripe
webhook at BASE_URL/webhooks/stripe for checkout.session.completed and
checkout.session.async_payment_succeeded. Restart the container after editing .env.
Scheduled jobs
Coil sends the morning agenda, invoice and engagement reminders, and follow-up sequence steps from a small command. Run these from cron or Task Scheduler on the Coil machine:
15 7 * * * cd ~/coil && docker compose exec -T coil python -m app.cli agenda
30 7 * * * cd ~/coil && docker compose exec -T coil python -m app.cli reminders
0 8 * * * cd ~/coil && docker compose exec -T coil python -m app.cli sequences
0 6 1 * * cd ~/coil && docker compose exec -T coil python -m app.cli interest
Getting help
Open an issue at github.com/Law-Firm-Automate/coil/issues, or reply to the email you get when your install key is issued.
Something missing or wrong? The source of this guide lives beside the code on GitHub, and a pull request is the fastest way to fix it.