6 min read

How to run your own CRM without paying for every seat

An open-source CRM on one small server can replace a per-seat subscription. Here is how we set ours up, with a login wall in front, AI built in and an assistant that updates it from a chat.

By Intelligent Systems

Most CRMs charge for every person who logs in. Even a low-cost hosted plan is about $12 a user a month. For a team of 10, that is $120 a month, and it goes up every time you hire.

Twenty is an open-source CRM. Its makers sell a hosted version, and they also let you run it yourself for free. We did that, on a server we already had.

Here is how we set ours up: a login wall in front, AI built in, and an assistant that updates records from a chat.

What you pay instead

Per-seat fees grow with the team, one server stays flatTop: ten people join one by one, and a per-seat bill at about 12 dollars a user a month grows with each, to 120 dollars a month for ten. Bottom: one small server costs roughly 7 to 25 dollars a month, the same for two people or twenty.Per-seat planAbout $12 a user a month$120 a month for 10Your own serverRoughly $7 to $25 a monthThe same for 2 people or 20$0$40$80$120
Fig 1Per-seat fees grow with every hire. One small server costs the same for 2 people or 20.
  • The server. A small cloud server with 4 GB of memory costs roughly $7 to $25 a month, depending on the host. It costs the same for 2 people or 20.
  • The login wall. Cloudflare's free plan covers up to 50 users.
  • The AI. Paid as you use it, to the AI provider you pick. A quick question costs a fraction of a cent. A task that changes records costs a few cents.
  • The software. Twenty is free to run yourself.

It is not free. You swap seat fees for a small server bill, some AI usage and a little upkeep. The bigger the team, the bigger the saving.

The setup on one page

How the CRM is set up and protectedThree kinds of visitor reach a Cloudflare login wall. Your team passes with an email code. The assistant passes with a service token. Anyone else is stopped. Those who pass travel through an encrypted tunnel to your server, which runs the Twenty app, a worker, a Postgres database and Redis. The worker calls AI models from the provider you choose, such as OpenRouter.WhoCloudflare AccessYour serverStoppedTunnelEncryptedYour teamEmail codeAnyone elseNo passAssistantService tokenTwenty appWorkerPostgresRedisRuns in DockerAI providerYour choice
Fig 2Only your team and your assistant get past the wall. The server opens no ports, and AI models are called from the provider you choose, such as OpenRouter.
  • Twenty. Four parts run in Docker on the server: the app, a background worker, a Postgres database and Redis.
  • A Cloudflare tunnel. It links the server to Cloudflare from the inside. No ports are open, so nobody can reach the server directly.
  • Cloudflare Access. A login wall in front of the CRM's address. Only emails on your list get in.
  • An AI provider. Use the one you prefer. We used OpenRouter, which gives one account and one key for many AI models.
  • An assistant. Ours is OpenClaw, set up through Agent Manager HQ. It reads and updates the CRM from a chat.

Step 1: Run Twenty on a server

  • Pick a server. Twenty needs at least 2 GB of memory. 4 GB is more comfortable.
  • Get Twenty's two files. Its self-hosting guide gives a Docker Compose file and a settings file.
  • Set the address. Put the address your team will use, such as https://crm.yourcompany.com, in SERVER_URL. If it does not match, logins break.
  • Set the secrets. Generate a long random database password and encryption key. Keep the settings file private.
  • Keep it on the server. Let the app listen only on the server itself, at 127.0.0.1:3000. The tunnel becomes the only way in.
  • Start it. Run docker compose up -d. The first start takes a couple of minutes while the database sets up.
  • Check the worker is running. It runs the AI chat, workflows and email sync. Without it, the chat looks as if it is ignoring you.

Step 2: Put a login wall in front

  • Put your domain on Cloudflare. The free plan is enough.
  • Create a tunnel. In Cloudflare's Zero Trust dashboard, create a tunnel and install its small connector on the server. It starts again on its own after a reboot.
  • Add a route. Point crm.yourcompany.com at http://localhost:3000. Choose HTTP, not HTTPS, for this route. That last hop never leaves the server. Visitors still get HTTPS, and the tunnel is encrypted.
  • Add the wall before you share the link. Create an Access application for the CRM's address, with a policy that allows only your team's emails. Until then, the address is open to anyone.
  • Test it in a private window. An email that is not on the list should get no code. Yours should get one, and then the CRM loads.

Put two locks on your client list: a wall at the front door, and the CRM's own login.

Cloudflare's wall stops strangers before they see a single page. Twenty's own login is the second lock, so a stranger has to get past both.

Step 3: Add AI from your provider

Twenty has an AI chat and AI steps for workflows. You choose the AI provider behind them. We used OpenRouter, so it is our example below.

  • Add your provider. In Twenty's admin panel, add the provider and your key. We added OpenRouter as a custom provider, with its address. It takes effect without a restart.
  • Match models to jobs. Twenty groups models into tiers, from fast to smart. Put a cheap, fast model in the fast tier for quick questions. Put a stronger one in the smart tier for anything that changes records.
  • Test with a real task. Our first choice, a small GLM model, answered politely and did nothing. It never used the CRM's tools. Kimi, a larger model, looked up the right tools and did the job.

Step 4: Let an assistant update it from a chat

Twenty has a built-in MCP server. MCP is a standard way for AI assistants to use software. With it, an assistant outside the CRM can look up a contact, log a call or move a deal, from a message on your phone.

Updating the CRM from a chatThree panels. One, you ask in a chat: log a call with Acme and move the deal to Proposal. Two, the assistant acts through the CRM's MCP: it finds Acme, logs the call and moves the deal, ticking each off. Three, the CRM is updated: the deal's stage moves from Meeting to Proposal and a call appears in its activity. The assistant replies: done, call logged, deal in Proposal.1 · You askLog a call with Acme.Move the deal toProposal.Done. Call logged,deal in Proposal.From a chat on your phone2 · The assistant actsFinds AcmeLogs the callMoves the dealUsing the CRM’s own tools3 · The CRM is updatedAcme · DealLeadMeetingProposalActivityCall logged · todayEmail sent · MondayWith the history kept
Fig 3Ask in a chat. The assistant uses the CRM’s tools, and the record changes with its history kept.
  • The wall applies to assistants too. Cloudflare Access lets in only people who log in with a browser. An assistant has no browser, so it is stopped like anyone else.
  • Give it its own pass. Create a Cloudflare service token and allow it on the CRM's Access application. The assistant sends it as two extra headers with every request.
  • And its own CRM key. Create a Twenty API key for the assistant. That makes two credentials, from two systems.
  • Check your assistant can send headers. Not every one can. Look for a setting for extra request headers on its MCP connection, and check that it stores them encrypted.
  • Start read-only. Let it look things up before it changes anything. It is the rule from our post on the layers of an AI system: read first, write later.

Make it fit how you work

Twenty lets you change its data model from the settings, with no code. We have kept adjusting ours as we learn what the team needs.

Changing the CRM's data model without codeFour record types. Companies, People and Deals come built in. A new field, renewal date, is added to Deals. A new object, Projects, is created with name, client, due date and stage fields, and its client field links to Companies.Client links to a companyCompaniesNameWebsiteEmployeesPeopleNameEmailCompanyDealsNameAmountStage+ Renewal dateProjectsNewNameClientDue dateStageAdded in settings, no codeReady in the API, for the AI and the assistant
Fig 4Add a field to a built-in record, or a whole new object, from the settings. No code, and the API picks them up.
  • Add fields. Put the details your team tracks on contacts, companies and deals, such as a renewal date or where a lead came from.
  • Add objects. Create new record types for the things your business runs on, such as projects, properties or shipments, and link them to companies and people.
  • Nothing extra to wire up. Twenty builds its API from your data model, so new objects and fields show up there too, ready for the AI and your assistant.

What to keep up

  • Backups. Copy the database off the server every night.
  • Updates. Twenty changes quickly. Back up first, then update.
  • One owner. Someone, on your team or ours, looks after updates and who has access.

Where to start

Start with steps 1 and 2. Run Twenty on a small server, put the wall in front, and move one team's contacts across. Keep your current CRM running beside it, as with everything we build. Add the AI and the assistant once the team trusts the basics.

Our written audit maps where your client records live today, what each tool costs you a year, and what a move would take.

Let us work out what your CRM really costs you.

Twenty is open source. The code is on GitHub at github.com/twentyhq/twenty.

Its Docker Compose guide covers the self-hosting steps in full.