Skip to content
TheChatArchiveThe Chat Archive
o4-mini-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

is it possible to use postgresql for erpnext? if not, best alternative considering that…

  1. User

    is it possible to use postgresql for erpnext?

    if not, best alternative considering that i have right now all my deployments in railway and they dont have a managed mariadb ? (they do have redis and postgres)

  2. Assistant

    Out of the box, ERPNext (and the underlying Frappe framework) only ships with MySQL/MariaDB support. There is an “experimental” PostgreSQL port in Frappe’s v14+ branches, but it’s not yet considered stable or production-ready (a lot of hooks, reports and extensions still assume MySQL’s dialect).

    Your two practical paths on Railway are therefore:

    1. Stand up your own MariaDB instance in Railway
    2. Use an external MySQL/MariaDB‐compatible managed service

    — Here’s how each breaks down:

    1. Self‐hosted MariaDB on Railway
      • Railway supports arbitrary Docker containers, so you can spin up a MariaDB/Mysql image directly in your project.
      • You’ll need to set up persistence (volumes) and backups yourself.
      • Redis (for caching/queue) already exists in your stack, so just point Frappe’s redis_cache, redis_queue, redis_socketio URLs to Railway’s Redis.

    2. External Managed MySQL/MariaDB
      • If you’d rather offload backups, updates, HA, etc., you can plug in an external provider:
      – Amazon RDS (free tier for dev)
      – DigitalOcean Managed Databases
      – ClearDB (on AWS Marketplace)
      – PlanetScale (MySQL-compatible)
      • Simply grab the connection string from that provider and drop it into your sites/common_site_config.json.

    — Why not PostgreSQL today?
    • Frappe’s SQL builder, report engine and some plugins still rely on MySQL-specific syntax (e.g. INSERT … ON DUPLICATE KEY UPDATE, certain JSON operators, system tables).
    • The community‐maintained PG port is improving but not yet 1:1 feature-complete.

    If you just want to experiment or help contribute to the PG port, check out:
    https://github.com/frappe/frappe/tree/develop-postgres

    —but for anything serious, stick with MariaDB/MySQL.

    Feel free to ask if you’d like sample Docker-Compose/bench commands for running MariaDB + ERPNext on Railway! 😊

  3. User

    would mysql be possible instead of mariadb? railway has managed mysql too

  4. Assistant

    Yes—ERPNext/Frappe officially supports both MariaDB and MySQL (8.0+). You can point your Railway-managed MySQL straight at your Frappe site. Here’s a quick run-down:

    1. ✅ MySQL vs. MariaDB compatibility
      • Both speak the same SQL dialect ERPNext needs (e.g. INSERT … ON DUPLICATE KEY UPDATE, JSON columns, full-text search, etc.).
      • We generally recommend MySQL 8.0 or MariaDB 10.3+—anything older may lack features or security patches.

    2. Wiring up Railway’s Managed MySQL
      • In Railway you’ll get a connection string, e.g.

      mysql://USERNAME:PASSWORD@HOST:PORT/DATABASE
      

      • Pass that into your site’s site_config.json (or via bench flags):

      {
        "db_type": "mysql",
        "db_host": "HOST",
        "db_port": "PORT",
        "db_name": "DATABASE",
        "db_user": "USERNAME",
        "db_password": "PASSWORD",
        "redis_cache": "redis://…",
        "redis_queue": "redis://…",
        "redis_socketio": "redis://…"
      }
      
    3. Installing a new site with MySQL
      If you’re using bench to create a fresh site against that MySQL, you can do:

      bench new-site mydomain.com \
        --db-host HOST \
        --db-port 3306 \
        --db-name DATABASE \
        --db-user USERNAME \
        --db-password PASSWORD \
        --db-type mysql \
        --admin-password YourAdminPass
      
    4. Things to watch for
      • Make sure your MySQL user has enough privileges (CREATE, ALTER, DROP, INDEX, etc.).
      • Enable the innodb_large_prefix, innodb_file_format=Barracuda and innodb_file_per_table settings if you build your own MySQL container. Railway’s managed MySQL should have sensible defaults.
      • Backups: Railways’ MySQL includes point-in-time backups if you’ve enabled them in your plugin.

    — That’s it! You’ll get feature-parity with a MariaDB setup, but using Railway’s existing MySQL service. Let me know if you need a Docker-Compose snippet or any Bench troubleshooting. 😊

  5. User

    how would managing mariadb in railway myself look like? for example, how to handle backups? any other operational hurdles?

  6. Assistant

    Here’s what running your own MariaDB in Railway looks like—from “day 1” setup through backups, HA and maintenance.

    1. Provisioning MariaDB as a Railway Service
      • In your Railway project, click “Add Service” → “Docker”
      • Point it at the official image (e.g. mariadb:10.9)
      • In “Variables” set:
      • MYSQL_ROOT_PASSWORD (or better, MYSQL_PASSWORD + MYSQL_USER)
      • MYSQL_DATABASE
      • Under “Volumes” add a bind:
      • Host path → e.g. mariadb-data
      • Container path → /var/lib/mysql
      • Size → however big your data will grow

      This gives you a single-node MariaDB with persistent disk.

    2. Connect ERPNext → MariaDB
      In your site_config.json (or via bench CLI) point at:

      {
        "db_type":   "mariadb",
        "db_host":   "<your-service-host>",
        "db_port":   "3306",
        "db_name":   "your_db",
        "db_user":   "your_user",
        "db_password": "secure_pass",
        "redis_cache":   "redis://<host>:6379",
        "redis_queue":   "redis://<host>:6379",
        "redis_socketio":"redis://<host>:6379"
      }
      
    3. Backups
      Railway doesn’t auto-snapshot your custom container’s filesystem—you’ll have to roll your own. Two easy patterns:

      A. Scheduled mysqldump + upload to S3

      1. Add a Scheduled Job (or a small “cron” container) that runs daily:
        #!/bin/bash
        TIMESTAMP=$(date +%Y-%m-%d_%H-%M)
        mysqldump -h $DB_HOST -u $DB_USER -p$DB_PASSWORD $DB_NAME \
          > /tmp/${DB_NAME}_$TIMESTAMP.sql
        
        # (optional) Upload to S3 or Railway volume
        aws s3 cp /tmp/${DB_NAME}_$TIMESTAMP.sql s3://my-backups/${DB_NAME}/
        
      2. Mount a small volume at /tmp or stream directly to S3.
      3. Retention/logrotate: purge >30d old files in S3 or locally.

      B. Percona XtraBackup / mariabackup container

      1. Spin up a side-car container that mounts the same volume.
      2. Run mariabackup --backup --target-dir=/backups/$TIMESTAMP
      3. Compress & ship to object storage.
    4. Operational Hurdles & Tips
      • Single-node = no HA out of the box. If you need failover you’d have to stand up a replica (→ two containers + replication user + manual/failover switch).
      • Upgrades: bump your Docker image tag, redeploy service. A rolling-restart will pick up new binaries; data stays on the volume.
      • Monitoring:
      – Use Railway’s Metrics tab for CPU/RAM/disk
      – For SQL-level metrics, deploy a Prometheus exporter (e.g. prom/mysqld-exporter) as another service pointing at your DB.
      • Configuration tweaks:
      – If you build your own image, bake in /etc/mysql/my.cnf with innodb_file_per_table=1, innodb_buffer_pool_size=…, max_connections, etc.
      • Security:
      – Use Railway’s “Network Policies” to lock your DB service so only your ERPNext service can talk to it.
      – Rotate passwords regularly (you can roll the DB container with a new MYSQL_ROOT_PASSWORD and dump/restore if you really need a clean reset).

    5. Pros & Cons

      • Full control over versions & config
      • You manage backup cadence, retention, encryption
        – You’re on the hook for high-availability, point-in-time restores, upgrades, monitoring alerts

    If that sounds like too much ops, you can always fall back to Railway’s Managed MySQL (they handle backups, HA, PITR) or an external managed MariaDB. But if you want everything “in-Railway,” the above pattern is how you’d run & operate your own MariaDB for ERPNext.

    Let me know if you need example Dockerfiles, CronJob configs or a full “Railway project” template! 🚀

  7. User

    does erpnext / odoo offer email server like zoho, or at least ability to send emails from records to contacts etc? what about phone ? (any integrations?) what would be missing out migrating from zoho when it comes to functionalities?

  8. Assistant

    Here’s a feature-by-feature look at how ERPNext or Odoo compare to Zoho when it comes to email, telephony and “what you’d miss” by moving off Zoho:

    1. Email Hosting vs. Transactional/CRM Email
      • Zoho Mail
      – Full-blown mail hosting (inbox, webmail, calendars, contacts)
      – Included “out of the box” with Zoho CRM: you get @your-domain mailboxes & drag-drop UI
      • ERPNext / Odoo
      – Do NOT include mail hosting: you point them at any SMTP/IMAP provider (Gmail, Office365, SendGrid, Mailgun, your own Postfix, etc.)
      – Once configured you can:
      • Send transactional emails (order confirmations, invoices, notifications)
      • Trigger Email Alerts (e.g. “when Sales Order is submitted, email Customer”)
      • Use Mail Templates, Jinja (Odoo) or QWeb (ERPNext) for nice layouts
      • View the full email thread on each Doc (e.g. on the Lead, Opportunity or Ticket)
      ✎ In short, you lose Zoho’s “free mailboxes + web UI,” but retain 100% CRM-side emailing.

    2. Phone / Telephony
      • Zoho
      – Built-in telephony bridge with click-to-call, call logging, call analytics
      – Native integrations (Twilio, RingCentral, Aircall, etc.) via Zoho PhoneBridge
      • ERPNext
      – Community/official connectors: Twilio, AWS Connect, Plivo, Asterisk/FreePBX
      – Bi-directional call logging: inbound/outbound calls can create Communication docs against Contacts/Leads
      – Soft-phone UI available via Frappe Dialer
      • Odoo
      – ‘VOIP’ module + Asterisk connector in Enterprise
      – Click-to-call from list views, automatic call pop-up
      – Can pull in recordings, dispositions into your CRM
      ✎ You won’t have Zoho’s tightly-packaged telephony-add-on—-you’ll need to pick a provider and install/configure the matching module.

    3. What You’d Miss Moving Off Zoho
      • Zoho Workplace
      – Mail hosting + Docs/Sheets/Slides in one suite
      – Integrated chat (Cliq), meetings
      • Zoho Marketing Tools
      – Zoho Campaigns (email marketing), Social, SalesIQ (website chat), Survey, Forms
      – Unified analytics across all channels
      • Zoho Creator (low-code apps)
      – Drag-and-drop form & workflow builder + mobile app packaging
      • “One-stop” managed services
      – You never had to provision mail servers, dialer integrations or host anything yourself
      – Zoho handles multi-tenant scaling, backups, upgrades
      • Zoho’s native ecosystem “slickness”
      – Deep cross-app passes (e.g. push a Deal to Project to Invoice with zero config)
      – Zoho Analytics embedded dashboards

    4. What ERPNext/Odoo Give You Instead
      • Fully open-source—unlimited customizations & no per-user/feature fees (ERPNext) or affordable apps marketplace (Odoo)
      • Rich core modules beyond CRM:
      – Manufacturing, Inventory, MRP, Quality, Projects, HR, Help Desk (ERPNext)
      – Website builder & e-commerce (both platforms)
      – Accounting with local tax engines
      • Developer-friendly low-code: Odoo Studio or ERPNext’s Doctype customizer & Server Scripts
      • Self-host or pick any cloud (you control data residency & uptime SLAs)

    5. Summary & Recommendations
      – If you heavily rely on Zoho Mail (email hosting) and PhoneBridge, plan to plug in an external mail host and choose a VOIP provider + module.
      – CRM-centric features (leads, pipeline, email campaigns, workflows) are fully covered in both ERPNext and Odoo—often with more depth once you install community/marketplace apps.
      – You will trade Zoho’s turnkey “all-in-one” SaaS convenience for more deployment/ops responsibility—but gain flexibility, extensibility and cost control.

    🙋‍♀️ Happy to dive deeper on any of these (e.g. “how to set up SendGrid & Twilio in ERPNext”), just let me know!