Odoo management
Use an external PostgreSQL database
Keep the Odoo database on your own PostgreSQL server.
By default an instance's database runs in PostgreSQL on the same server as Odoo. On the Pro and Business plans you can keep it on an external PostgreSQL server instead, such as Amazon RDS, Google Cloud SQL, Azure Database for PostgreSQL or a database server you run yourself. Odoo, the filestore and Nginx stay on your CloudPilot server.
Before you start
-
Create a PostgreSQL role for Odoo with the CREATEDB privilege,
for example
CREATE ROLE odoo LOGIN CREATEDB PASSWORD '…';. On Amazon RDS and Azure the admin user already has it. - Allow connections from your CloudPilot server's IP address in the database's firewall or security group.
- Use a PostgreSQL version no newer than the one on your CloudPilot server, so backups can run. CloudPilot checks this before it creates anything.
Create an instance on an external database
- Choose New instance and pick the server and domain as usual.
- Turn on External database and enter the host, port, user and password. Leave TLS on require unless the database is on a private network.
- Choose Create instance.
CloudPilot connects to the server first and stops with a clear message if it can't reach it, if the role can't create databases, or if a database with the same name already exists. It then creates a new database named after the primary domain. It never changes your other databases.
Staging, backups and restores
Staging copies are created on the same external server as their production instance. Backups, restores, one-click login and the database size on the dashboard all work as usual over the same connection.
Change the password
After you change the role's password on the database server, open the instance's Config tab and choose Update external database password. CloudPilot checks the new password, updates odoo.conf and restarts Odoo.
Security
The password is encrypted when you submit it, sent to your server once, and then kept only in the instance's odoo.conf on that server. Deleting the instance drops the database CloudPilot created on the external server, but not the role.
Still stuck? Email hello@cloudpilot.app and we'll help.