Alternative Database to Self-Host (like Supabase)

Hello everyone,

I just discovered these products and they seem great. I’m excited to deploy them on my local servers and try them out.

I see that MariaDB (and Redis) is standardized across the platform. Is there a precedent for a business or individual self-hosting the Frappe products, but using an alternate database vs. MariaDB?

We use Supabase, and are currently in the process of moving to a Redis alternative since they are no longer an open source licensed product.

Any feedback is appreciated. Thank you.

1 Like

Hi @fakebizprez:

Frappe Framework (not ERPNext) supports Postgres v9 and above.

Just use this at site creation.
bench new-site <site-name> --db-type postgres

Hope this helps.

2 Likes

Thanks, @avc .

I’m OK with ERPNext and HRMS running on MariaDB.

If I want the CRM app to run on Postgres, do I have to create a totally new site?
What would the syntax be to target just the CRM?

Hi @fakebizprez:

Can’t use both database engines for the same site. Should create different site for CRM …

1 Like

Hi @avc ,
I am trying to create a new site using postgresql with the NEW-SITE command. However, it gives the following error. I use subabase as DB.
However, it gives the following error. How do I solve this problem?

bench new-site localhost --db-type postgres --db-host pooler.supabase.com --db-port 6543 --db-root-username postgres.111111 --db-root-password [pass]–admin-password admin

Traceback (most recent call last):
File “/workspaces/frappe-bench/apps/frappe/frappe/commands/site.py”, line 112, in new_site
_new_site(
File “/workspaces/frappe-bench/apps/frappe/frappe/installer.py”, line 83, in _new_site
install_db(
File “/workspaces/frappe-bench/apps/frappe/frappe/installer.py”, line 164, in install_db
setup_database(force, verbose, mariadb_user_host_login_scope)
File “/workspaces/frappe-bench/apps/frappe/frappe/database/init.py”, line 26, in setup_database
return frappe.database.postgres.setup_db.setup_database()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/workspaces/frappe-bench/apps/frappe/frappe/database/postgres/setup_db.py”, line 11, in setup_database
root_conn.commit()
File “/workspaces/frappe-bench/apps/frappe/frappe/database/database.py”, line 1163, in commit
self.sql(“commit”)
File “/workspaces/frappe-bench/apps/frappe/frappe/database/postgres/database.py”, line 233, in sql
return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/workspaces/frappe-bench/apps/frappe/frappe/database/database.py”, line 237, in sql
self.connect()
File “/workspaces/frappe-bench/apps/frappe/frappe/database/postgres/database.py”, line 178, in connect
super().connect()
File “/workspaces/frappe-bench/apps/frappe/frappe/database/database.py”, line 135, in connect
self.get_connection()
File “/workspaces/frappe-bench/apps/frappe/frappe/database/postgres/database.py”, line 194, in get_connection
conn = psycopg2.connect(**conn_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/workspaces/frappe-bench/env/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: server didn’t return client encoding