Featured image of post Retiring the Six-Container ERPNext Setup, Running Odoo 18 Chinese Accounting on Port 8090

Retiring the Six-Container ERPNext Setup, Running Odoo 18 Chinese Accounting on Port 8090

In the previous post, 107 AI agents helped select the Odoo Community Edition + l10n_cn. This post covers the execution: decommissioning the entire six-container ERPNext v15 stack from port 8090, replaced by a single Docker Compose with Odoo 18 + PostgreSQL. Config, addons, and data directories are mounted as three separate volumes. Database creation comes pre-loaded with the Small Enterprise Accounting Standards chart of accounts. The official 13%/9%/6% VAT rates are preconfigured; the 3% collection rate is added manually. The first expense voucher auto-generates its debit/credit entries and trial balance output, with a fully Chinese interface. For fully digitalized invoices (数电票) and Golden Tax System integration, you need to go through an external paid add-on layer — all the pitfalls I encountered are documented here.

Bottom line: port 8090 is the same port, but a different tenant. The six-container ERPNext v15 that was running there has been fully decommissioned—compose stopped, volumes deleted, images purged, instance directory moved, and the hosts entry removed. The slot now belongs to Odoo 18 Community + PostgreSQL. The database was created with China selected, the small-enterprise accounting standards chart of accounts was applied automatically, and the official VAT rates of 13% / 9% / 6% came pre-configured. I manually added one more entry for the 3% levy rate. The moment I confirmed the first test expense voucher, the journal entries were generated instantly, and the trial balance posted with debits equaling credits, all in Chinese UI.

This post is an execution record. In the previous article I ran 107 parallel AI agents, 949 tool calls, and finished the report in 20 minutes—dissecting three open-source accounting foundations down to source code. The conclusion: Odoo Community + the official l10n_cn. The analysis is in Choosing an Open-Source Accounting Foundation for a Company. Research done. Now it’s time to build. Every step below includes a verification method—you can follow along and have a Chinese accounting system running on your own server today.

Let me put one counterintuitive observation up front. For a small company’s accounting foundation, the key decision is the maintenance path, not the software itself. After installing this stack, Odoo has zero e-invoice integration and zero golden tax phase-four connectivity. All three open-source platforms I evaluated are the same—deep compliance has always sat in an external paid layer from day one. Once you accept that, a lot of the later doubts simply never arise.

Prerequisites

The material list has three items.

  • A machine that can run Docker, with the Compose plugin installed; docker compose version producing output is enough.
  • A way to reach port 8090 on that machine—use the internal IP directly for LAN access, or add a reverse proxy for external access.
  • Reading the previous article is recommended but not required. The rationale for the selection is all in the linked post.

A note on cost: zero at the software layer. All three pieces are community editions or GPL-family self-hosted solutions, running on the server you already have. No new expense. A domain name is optional—an internal IP plus port gets your books running. Add the reverse proxy when you actually need external access.

Cleaning Out the ERPNext Six-Container Stack

Port 8090 was previously running ERPNext v15 at domain erp.lingxu.local—the same instance I ssh’d into to browse the erpnext_china source code in the last article. I ran the decommissioning math: a China plugin that has been unmaintained for over eight months, plus a container build pipeline that exists solely to assemble it. Six containers, day in and day out, all maintenance overhead, zero financial localization benefit. Now that I’ve chosen Odoo, leaving this stack means one more thing to babysit every single day.

Here I focus strictly on how to decommission, four actions, verified at each step.

  1. Run docker compose down -v in the old instance directory. Compose handles the six-container shutdown ordering itself, respecting dependency relationships. The -v flag also removes the mounted volumes—if you omit it, anonymous volumes linger on disk and keep consuming space.
  2. Delete images. Run docker image ls | grep frappe to find the family, then docker rmi each one.
  3. Delete the directory. ERPNext stores its data in MariaDB: first run a mysqldump export, then rsync the attachments directory, save both to persistent storage, and finally rm -rf the entire instance directory. This step is irreversible; the backup is your only way back.
  4. Clean hosts. Remove the erp.lingxu.local entry from /etc/hosts—the domain is no longer needed.

After the four steps, run a unified verification:

1
2
3
4
docker ps -a                             # No frappe-prefixed containers should appear
docker image ls | grep frappe            # Should return empty
curl -s http://localhost:8090            # Connection refused—the port is free
grep erp.lingxu /etc/hosts               # No results

Port 8090 is truly free only after this verification. The decommission is just these four commands plus a verification pass—cheaper and easier than you’d expect, and easier to procrastinate on than you’d expect.

If your old system contains real historical ledger entries, you’ll need to plan a chart-of-accounts mapping and a opening-balance import before decommissioning. That belongs in a separate article. For everything unrelated to the ledger, a single dump in your backup is sufficient. The principle here is simple: back up first, delete second. Never reverse the order.

One Compose File, Raising the Odoo 18 Stack

The new foundation lives under ~/odoo-cn, a single docker-compose.yml. Only official images and the official l10n_cn module—no third-party China modules. The reasons for that decision go in the pitfalls section below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ~/odoo-cn/docker-compose.yml
services:
  web:
    image: odoo:18
    depends_on:
      - db
    ports:
      - "8090:8069"
    volumes:
      - odoo-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
    environment:
      HOST: db
      USER: odoo
      PASSWORD: odoo
  db:
    image: postgres:16
    environment:
      POSTGRES_USER: odoo
      POSTGRES_PASSWORD: odoo
      POSTGRES_DB: postgres
    volumes:
      - pg-data:/var/lib/postgresql/data

volumes:
  odoo-data:
  pg-data:

The 8090:8069 mapping means the outside world continues to use 8090 while traffic enters the container on Odoo’s default 8069. If you ever want to change the external port, only the left-hand number needs to change—the container internals are unaffected.

The three mounts each have a single responsibility. The odoo-data volume holds attachments and session files; pg-data is the PostgreSQL data store. Lose either one and your books are gone. ./config holds odoo.conf so you can tweak parameters without entering the container. ./addons is reserved for custom modules later on. The directory tree looks like this:

1
2
3
4
~/odoo-cn
├── docker-compose.yml
├── config/odoo.conf
└── addons/

Data lives in exactly two places—pg-data and odoo-data. The backup surface is pg_dump plus a volume copy. No third home for your ledger to hide in. In a single-server deployment, this is the structure least prone to mistakes.

Starting the service takes two commands. The first up pulls both odoo:18 and postgres:16, then brings the containers up automatically.

1
2
cd ~/odoo-cn
docker compose up -d

If it doesn’t come up, run docker compose logs -f web and check the logs. Two common issues: db not ready when web races ahead (restart the web container), or port 8090 still held by a stale process (change the left-side port number).

Verification: docker compose ps should show both web and db as Up. Open http://:8090 in a browser and you should see a Chinese-language database management page. The foundation is live.

Create the Database, Select China—Chart of Accounts and Tax Rates Grow Automatically

Click Create Database. Enter admin as the Master Password—this is the default for the official Odoo image, and you should change it before going to production. The database name is up to you. Select Chinese (Simplified) as the language, China as the country, and fill in your email and password.

When you install the Accounting app, Odoo automatically attaches the l10n_cn financial localization based on the country you selected at database creation, then asks which chart of accounts template you want. There are two official templates: one for large-enterprise accounting standards and one for small-enterprise accounting standards. The large-enterprise version has more granular accounts; the small-enterprise version is more than enough for us. My company, Hangzhou Lingxu Technology, was established on 2025-09-19 as a small-scale taxpayer, so I selected the small-enterprise accounting standards. A few minutes later the chart of accounts is fully laid out.

I installed four apps together: Accounting, Sales, Purchasing, and Inventory. Website and Marketing I’m leaving for later. In the Community Edition, opening any number of apps carries no additional charge—you can enable modules as needed. There is no “pay to unlock a module” wall.

Everything in l10n_cn was audited against its manifest in the previous article: account types, chart-of-accounts templates, VAT structure, Chinese province names, and voucher-printing layout templates. The first four take effect at database creation; the last one kicks in when you print vouchers, producing documents that look like Chinese accounting vouchers.

You basically don’t need to create any tax rates manually. Go to Accounting → Configuration → Taxes, and the official template pre-configures the 13%, 9%, and 6% tiers. Items and expense lines pick up the correct rate automatically from the tax template. As a small-scale taxpayer issuing invoices, I needed to add a 3% levy rate manually—the split-and-apply logic follows the same pattern as the pre-configured tiers. When we eventually register as a general taxpayer, the three pre-configured tiers are ready to go.

Two housekeeping items after the database is created. Change the admin_passwd in config/odoo.conf and restart the web container for it to take effect. Set up a nightly pg_dump on crontab, retaining seven rolling snapshots. This is the cheapest insurance policy for the entire system.

Verification: Go to Accounting → Configuration → Chart of Accounts. The first entry is 1001 Cash on Hand, followed by 1002 Bank Deposits. Expense accounts sit under 5602 Administrative Expenses, revenue under 5001 Main Business Revenue—all in Chinese. Not a single English string on menus, buttons, or report titles.

Also check Accounting → Configuration → Settings: the Localization section should say China, and the currency should be set to CNY. Once these two pages look right, localization is verified, and every subsequent document’s accounts and tax rates will flow from here.

First Expense Voucher: Journal Entries Auto-Written, Trial Balance Balances Instantly

The hard test for this system is whether it dares to write journal entries for you. I created a test supplier, opened a vendor bill, selected an expense line under Administrative Expenses → Office Supplies, picked the applicable VAT rate, entered the tax-exclusive amount, saved, and confirmed—in one go, no skipping. After confirming, I went to Accounting → Accounting → Journal Entries, and there, under the same bill number, were three lines:

1
2
3
Debit  Administrative Expenses (Office Supplies)
Debit  Taxes Payable — Input VAT
Credit  Accounts Payable

The system auto-balanced the directions and amounts across all three lines. I didn’t type a single character in the journal entry form. The benefit of having a chart of accounts that grew from the small-enterprise standards is exactly this: account names are all standard Chinese, and the tax line was拆解 (split) by the system. Select 3% or 6% on the tax column of the bill line, leave the amount unchanged, and the tax amount column calculates itself.

Because the system writes the entries, the accounts payable for that test supplier is automatically posted to its reconciliation statement, and the aging clock starts from this first transaction. The receivables/payables aging that I flagged as out-of-the-box in the previous article is exactly what’s happening here.

Finally, open Accounting → Reports → Trial Balance, select the period. The report shows three columns—opening balance, period activity, and closing balance. In every column, total debits equal total credits. This balance means that the sum of all debit entries across every account for the period equals the sum of all credit entries. A single mis-posted entry breaks the balance.

I also pulled up the Balance Sheet and Income Statement out of curiosity—their titles are all in Chinese. These two reports share the same foundation as the trial balance; if the entries are right, the statements are right. They’re also the raw material you’ll need for quarterly filings. At this point, every critical component of the foundation has been verified.

  • Chart of Accounts — small-enterprise accounting standards, fully in Chinese
  • Journal Entries — expense vouchers auto-generate debit/credit pairs
  • Trial Balance — total debits equal total credits

Three Pitfalls I Hit Along the Way

These pitfalls weren’t discovered in this round—they were dug out in advance by the 107 agents and a live run in the previous article. I’m restating them here in execution order.

  1. Containers are immutable; custom apps must go into the image. During the ERPNext era, installing a custom app like erpnext_china required building it into a custom image and pushing to a registry. Installing apps into a running container is not officially supported. Maintaining a build pipeline for a plugin you barely use is pure waste for a newly founded small company. The same principle applies to Odoo, which is why ./addons is mounted separately: drop a module in and restart the container. Don’t edit files inside the container by hand—if the container restarts, your hand-edits vanish. That’s the direct cost of immutability.
  2. erpnext_china has been unmaintained for over eight months. The last meaningful commit landed in January 2026. The community still recommends it as “the ERPNext China localization solution,” but it’s actually a CRM/HRM localization plugin with no connection to financial accounting. I scrolled through its module清单 in the previous article. Betting your accounting foundation on it is betting on a personal project that has already been abandoned.
  3. Third-party Odoo China modules inject ads. Free chart-of-accounts modules in the Odoo App Store bundle two dependencies—app_common and app_odoo_customize. Installing them modifies official settings, syncs content from odooapp.cn, and injects vendor advertisements. Some users report the app crashing immediately after installation. So this time I installed only the official l10n_cn. For any third-party module, I inspect the manifest dependencies before deciding.

End State: One Foundation, Two Extensions, All Open-Source Self-Hosted

With the foundation standing, the extensions fill in the gaps per the positioning in the previous article. The entire system now has three pieces.

PurposeSolutionLicense
Accounting, Inventory, Email MarketingOdoo 18 CommunityLGPL-3
Automated Campaign JourneysMauticGPL
Social Media SchedulingPostizAGPL-3.0

Each piece owns its own lane, connected via webhooks and APIs to a shared customer list. Zero subscription fees, no legal gray areas. The key word throughout is self-hosted: financial data, customer lists, and publishing schedules all live on your own server.

I picked Mautic and Postiz to round out the ecosystem based on the cost analysis in the previous article. Odoo Enterprise offers two marketing-specific modules: Marketing Automation and Social Marketing. The former is a drag-and-drop automation builder (e.g., if a customer registers but doesn’t order within three days, an email is sent automatically); the latter is a dashboard for scheduling multi-platform posts. The Community Edition already includes email marketing, UTM tracking, and event registration—enough for daily use. There’s no need to upgrade to Enterprise for those two modules. Mautic’s drip sequences and audience segmentation are actually more granular than Enterprise’s, and Postiz’s multi-platform scheduled publishing is a direct open-source alternative to Social Marketing.

One boundary I stressed repeatedly in the previous article and am钉ing down again here: deep-compliance integrations like e-invoices and golden tax phase four are absent from all three open-source platforms I evaluated. Swapping to any other open-source software won’t fill the gap. This layer must sit in an external paid service. This is the ceiling of the entire open-source ecosystem—not a shortcoming specific to Odoo.

Back to that opening line: the maintenance path now boils down to a handful of words. Official images, official modules, plus Mautic and Postiz—two open-source projects that are still actively updated. Behind every link in this chain stands a community that continues to push improvements. Laid out plainly, the most fragile component in this entire stack is still the human: quarterly filings, e-invoice回填, the reminders that fall on you.

What’s Next

We’re a small-scale taxpayer filing quarterly. Bills, journal entries, and the trial balance map directly to what a quarterly filing requires. Four things are on the board:

  1. E-invoice issuance and receipt will be handled by an external paid service. Need to finalize a provider before the next quarterly filing.
  2. Fields like invoice number and invoice date on bill forms are still empty—waiting for the external e-invoice service to回填 data.
  3. Put the Inventory module to work so that purchase and sales orders drive stock movements, not just treating it as a ledger appendage.
  4. Connect Mautic and Postiz to one real use case each—no installs for the sake of installing; anything you bring in must have a user.

Open http://localhost:8090 now and you’ll see the Odoo 18 Chinese login page, with one test expense voucher and a trial balance with matching debits and credits waiting inside the ledger. The six ERPNext containers—images, volumes, directories—are all gone.

This post is a deployment execution record and does not constitute tax or legal advice. For accounting and filing compliance, consult a certified tax professional or a licensed bookkeeping agency.