Your own CRM on your own domain and server
Contacts, a deals pipeline, tasks and invite-only users with roles, on crm.yourbusiness.com. Built in small steps with Claude Code, secured properly, and with backups you've tested.
A rented CRM charges per user every month and still makes you work its way. Your own costs the server, fits your stages and keeps your clients' data with you.
The catch is that security and backups become your job. This guide covers both, step by step, so a non-programmer can build it with Claude Code and sleep at night.
Watch the full video on YouTube
What you need
- A small VPS with Ubuntu (2 vCPU, 4 GB RAM is plenty for 20 people), around 7–9 €/month
- A domain you already own: a subdomain like crm.yourbusiness.com is perfect
- Claude Code (Claude Pro or Max) to write, test and review the code with you
- Two or three afternoons, and the habit of reading before you accept
1. Your server, locked
Create the VPS in a European data centre if your clients are European, with your SSH key instead of a password. Then create your own user, switch off root login and password logins, and open only three ports.
adduser ana && usermod -aG sudo ana
# /etc/ssh/sshd_config.d/hardening.conf
PermitRootLogin no
PasswordAuthentication no
sudo systemctl restart ssh
sudo ufw allow OpenSSH && sudo ufw allow 80,443/tcp && sudo ufw enable
sudo apt install fail2ban unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
2. Point your domain
In your DNS, add an A record named crm pointing to the server's IP. Check it with dig before moving on. Never open the database port to the internet.
A crm 203.0.113.25
dig +short crm.yourbusiness.com
3. Describe it before building it
In an empty folder, write a CLAUDE.md with what you sell, who uses the CRM, your stages in your own words and the rules: invite-only accounts, every change logged, archive instead of delete.
Ask Claude Code for a boring stack (one Node app, SQLite or PostgreSQL, Docker) and for the table plan before it creates anything: contacts, companies, deals, tasks, notes and activity.
# Our CRM
Stages: enquiry → call booked → quote sent → enrolled → lost
## Rules
- Invite-only accounts. No public sign-up.
- Log every create / edit / archive.
- Never delete records. Archive them.
4. Users, roles and logins
Three roles: admin (users and settings), sales (own and shared clients) and viewer (read only). Permissions are checked on the server on every request, in one place every route goes through. Hiding a button is not security.
Ask for these by name: Argon2 or bcrypt password hashes; HttpOnly, Secure, SameSite cookies; a CSRF token on every form; five failed logins then a 15-minute wait; two-step login with an authenticator app, mandatory for admins, with backup codes.
5. Build in small steps, then attack it
Login and users first, then contacts, deals and the pipeline, tasks with a today list, and the activity log. For each step: plan, read, write, test on your computer.
Before going online, ask Claude Code to write tests for every role and action, and to do a security review as if it were an attacker. Fix what it finds and run the tests again.
6. Put it online
A Docker Compose file with your app and Caddy in front. Caddy gets and renews the HTTPS certificate by itself. Secrets go in a .env file on the server, never in the code. Create the first admin with a one-time command on the server, switch on two-step login and invite your team.
# Caddyfile
crm.yourbusiness.com {
reverse_proxy app:3000
}
docker compose up -d
7. Backups you've restored
Every night, a dated copy of the database, encrypted and sent off the server, kept for 30 days. Once a month, restore yesterday's copy on your computer and open it. A backup you've never restored is only a hope.
For your clients' data: keep only what you use, add export and anonymise buttons for the admin, and mention the CRM in your privacy policy. This isn't legal advice; check it with whoever handles your data protection.
8. Checklist before going live
SSH keys only and no root login. Firewall with three ports, fail2ban and automatic updates. HTTPS on your domain. Invite-only accounts, two-step login for admins and permission tests passing. Activity log working and last night's backup restored once.
Start this week with the server and the domain. The rest is one small step at a time.
The full video walks through every step. Rather have us build it with you? Send us a message.
Tu propio CRM en tu dominio y tu servidor. Contactos, embudo de oportunidades, tareas y usuarios por invitación con roles, en crm.tunegocio.com. Construido en pasos pequeños con Claude Code, bien protegido y con copias de seguridad probadas.