Category
Frappe/ERPNext
Every guide on Frappe/ERPNext from Code With Karani - 75 field-tested articles on Frappe/ERPNext for developers and teams.
76 articles
August 2026
July 2026
Deploying Frappe apps to a client server you're not allowed to touch
The client will not give you access to their dev server, so every code change means someone on their side pulls and migrates by hand. Here is the complete fix: a self-hosted runner they install, a deploy script they own, and no credential to their environment on your side at all.
13 min read
Bolting a phone onto ERPNext: custom routes, guest endpoints and HMAC auth in Frappe
Frappe claims every /api/* path before website routing, so a fixed third-party path 404s. Here is the before_request rewrite that fixes it, including the cached property you also have to bust, and why allow_guest endpoints can still be strongly authenticated.
12 min read
SSH deployment for Frappe: how it works, and what it costs you
SSH deployment is the right answer when you own the server, and here is a complete working pipeline for it. It is also a private key held by a third party's CI system, which is a bill worth reading before you sign it.
8 min read
What bench migrate actually does, and the rollback you'll wish you had
Every patch commits as it completes and records itself as applied. So a migration that fails halfway is not a failed migration, it is a half-finished one, and re-running will not undo it. Here is the recovery, with real commands.
8 min read
Anatomy of a Frappe bench
Five directories, one of which is not a directory at all but a collection of independent git repositories. Understanding that is the difference between a deploy that works and a Saturday spent fixing file ownership.
8 min read
Installing ERPNext on Ubuntu 16.04: What the Easy Install Script Does Not Tell You
The ERPNext install script works until it does not. Here are the four failures I hit on real servers, the MariaDB settings it needs, and how to finish a half-installed bench.
6 min read
The agent drafts, the human commits: designing the write path for a business AI
A wrong read costs minutes. A wrong write costs a reconciliation. So the commit lives behind an HTTP endpoint the agent cannot call - and everything it can do is scoped to the requesting user, written to an audit row in the same transaction, and given a tested reversal.
6 min read
Find the Query Killing Your ERPNext: A MariaDB Slow Query Log Playbook
Your ERP is slow and three queries are responsible. Configure the MariaDB slow query log properly, run pt-query-digest, and read the numbers that tell you whether it is an index problem or a hardware problem.
8 min read
Hosted brain, dumb connector: splitting an AI agent so the data never leaves the client
Ship your agent to the client and you hand over your product. Pull their data to your platform and you become the custodian of their business records. The third option is a split: a hosted brain that decides what to fetch, and an on-prem connector with no intelligence in it at all.
6 min read
Indexes That Actually Work: A Field Guide to tabGL Entry and tabStock Ledger Entry
ERPNext ships mostly single-column indexes, which are the wrong shape for the reports killing your server. Real EXPLAIN output, the leftmost prefix rule, key_len maths, and the composite indexes that fix ERP reports.
9 min read
Why we did not point an LLM at ERPNext: building a semantic layer for a business agent
Text-to-SQL against a real accounting schema produces confidently wrong numbers, because ERPNext stores revenue in the general ledger, stock valuation in the stock ledger, and gross margin nowhere at all. Here is the metric catalog and catalog-first hybrid engine we built instead.
7 min read
bench backup Is Not a Backup Strategy: Binlogs and Point-in-Time Recovery for ERPNext
A nightly dump means losing a full day of invoices. Set up mariadb-backup plus binary logs, then walk a real recovery: finding the binlog position of a bad bulk cancel and replaying up to the second before it.
8 min read
Rai: what I am building, and which decisions were load-bearing
An AI business analyst for hardware and electronics shops, embedded in ERPNext. The v1 scope is locked, so here is what is in it, which four decisions the whole thing rests on, and the two things I expect to get wrong.
6 min read
June 2026
Your ERPNext Database Hit 40GB: What to Delete, Archive, and Partition
On most large ERPNext sites the real business data is under 20 percent of the total size. Measure the tables, gut the log bloat, chunk your deletes, understand the partitioning trap, and actually reclaim the disk.
8 min read
Upgrading ERPNext from Version 15 to Version 16: A Field-Tested Guide
If you've searched the Frappe forum for a "standard" way to upgrade ERPNext from v15 to v16, you've probably noticed the same thing I did: there isn't one. Every guide assumes a slightly different…
11 min read
May 2026
Why ERPNext Rounds Your Invoice Amounts Wrong, and the Precision Settings That Fix It
ERPNext rounding bugs are one root cause wearing many hats: fieldtype, Currency vs Float Precision, and per-field overrides across three layers. Here is the map.
8 min read
Reverse-Engineering the Frappe REST API: the Reference Nobody Wrote
Frappe auto-generates a REST API from your DocTypes but ships no OpenAPI spec, so integrations are trial and error. Here is the working reference: filters, fields, auth, child tables and the gotchas.
8 min read
Frappe Custom Fields Hit MariaDB's 'max 64 keys allowed': Finding the Excess Indexes
A heavily customised Item or Customer DocType can silently pile up indexes until MariaDB refuses at 64. Here is how to list them, find the wasteful ones, and remove them safely.
6 min read
'Can't pickle LazyUser' With frappe.enqueue: The Background Job Rule Everyone Breaks
frappe.enqueue pickles its arguments, and a Frappe Document drags in a LazyUser pickle cannot handle. Pass doctype and name strings and re-fetch inside the job.
6 min read
Frappe Socket.IO Not Working in Production: Diagnose Before You Reinstall
Realtime updates dead in production? Do not run the blind bench setup reinstall ritual. It is almost always one thing: nginx, supervisor, or a firewalled port.
7 min read
Frappe Scheduled Jobs Not Running: The Full Checklist Nobody Gives You
Frappe scheduled jobs need four things at once: a cron tick, the per-site flag, running workers, and an unblocked queue. Here is how to find the broken link instead of guessing bench enable-scheduler.
8 min read
Redis 'Connection refused' in Frappe: Find the Real Cause, Not Just Restart
Error 111 connecting to localhost:13000 is not a wrong port, it means nothing is listening. Read the real port, ping it, then fix the actual cause per deployment type.
7 min read
'Table tabDefaultValue doesn't exist' on bench new-site: Finding the Real Frappe Cause
The tabDefaultValue error on bench new-site is a symptom, not the cause. The real failure is in the MariaDB log: privileges, charset, version or disk. Here is how to find it.
7 min read