Skip to Content

How to move Odoo to another server? Step-by-step guide

June 9, 2026 by

Moving Odoo to another server is a process that may be necessary for various reasons - from infrastructure modernization and performance improvements to changing hosting providers. Although the task may seem complicated, proper preparation and following a proven procedure will allow you to migrate safely without losing any data.

Preparing for the Odoo migration

Before you start moving Odoo to another server, thorough preparation is essential. Checking the system requirements for Odoo on the new server is the first step that will protect us from compatibility issues.

Pre-migration checklist

Make sure you have the following items ready:

  • Administrative access to both servers (source and target)
  • Information about the Odoo version and installed modules
  • A list of custom modules and add-ons along with their versions
  • A backup of the PostgreSQL database
  • A copy of the filestore directory with attachments
  • The odoo.conf configuration file
  • Documentation of all external integrations and APIs

Testing the new environment

The new server should meet all system requirements for your Odoo version. Make sure that:

  • The operating system is up to date and supported (recommended: Ubuntu 22.04 LTS or Debian 11/12)
  • The appropriate PostgreSQL version is installed (for Odoo 17-18: PostgreSQL 14-16, for Odoo 19: PostgreSQL 16 or newer)
  • Python is in the right version (Odoo 17+ requires Python 3.10 or newer)
  • Sufficient disk space is available (we recommend at least 2x the size of your current data)
  • All required system dependencies are installed (wkhtmltopdf, Python libraries, etc.)

Important: We strongly recommend performing a trial migration in a test environment before carrying out the production migration.

Step 1: Installing Odoo on the new server

The first technical step is the installation of Odoo on the new server. It is important to install exactly the same Odoo version as the one running on the source server - including the same release number (e.g. Odoo 17.0, not just Odoo 17). Version differences can lead to database compatibility issues.

After the installation, also install all custom modules in the same versions as on the source server, but do not start Odoo yet - first we will transfer the data from the current server.

Step 2: Database backup

Creating the database backup correctly is the most important part of the entire process. On the source server, stop the Odoo service to guarantee data consistency:

sudo systemctl stop odoo

Then create a dump of the PostgreSQL database:

sudo su - postgres
pg_dump -Fc nazwa_bazy > /tmp/odoo_backup.dump
exit

The -Fc parameter creates a compressed backup in the custom format, which is more efficient for larger databases. Alternatively, you can use the SQL format:

pg_dump nazwa_bazy > /tmp/odoo_backup.sql

PostgreSQL configuration on the new server

On the new server, configure the PostgreSQL database with appropriate performance and security parameters. Create a database user for Odoo:

sudo su - postgres
createuser odoo -d -R -S -P
exit

The -P parameter lets you set a password when creating the user. Alternatively, you can set the password later:

sudo su - postgres
psql
ALTER USER odoo WITH PASSWORD 'silne_haslo';
\q
exit

Try Odoo for free

Step 3: Transferring data to the new server

Files can be transferred in several ways. The most popular is using rsync or scp.

Database transfer

Copy the database dump file to the new server:

scp /tmp/odoo_backup.dump uzytkownik@nowy_serwer:/tmp/

Restore the database on the new server. Important: Before restoring the database, make sure Odoo is stopped:

sudo systemctl stop odoo
sudo su - postgres
createdb -O odoo nazwa_bazy
pg_restore -d nazwa_bazy -O /tmp/odoo_backup.dump
exit

The -O parameter in pg_restore prevents attempts to restore the original object owners, which could cause errors.

Filestore directory transfer

The filestore directory contains all files uploaded to Odoo (attachments, product images, documents). By default, it is located in ~/.local/share/Odoo/filestore/NAZWA_BAZY/ or in the location specified in the configuration file as data_dir.

Note: The filestore path contains the database name as a subfolder. If you change the database name during the migration, you must rename this subfolder accordingly.

rsync -avz ~/.local/share/Odoo/filestore/nazwa_bazy/ uzytkownik@nowy_serwer:~/.local/share/Odoo/filestore/nazwa_bazy/

rsync parameters:

  • -a - archive mode (preserves permissions and attributes)
  • -v - verbose (detailed information)
  • -z - compression during transfer

After copying, set the appropriate permissions:

sudo chown -R odoo:odoo ~/.local/share/Odoo/filestore/
sudo chmod -R 750 ~/.local/share/Odoo/filestore/

Custom modules transfer

If you use external modules, you must also transfer the add-ons directory. Read more about how to install external modules in Odoo.

rsync -avz /sciezka/do/custom-addons/ uzytkownik@nowy_serwer:/sciezka/do/custom-addons/

Make sure that all Python dependencies required by the custom modules are installed on the new server.

Step 4: Configuring Odoo on the new server

Copy the configuration file from the current server and adapt it to the new environment. The odoo.conf file configuration should take the new server parameters into account.

scp /etc/odoo.conf uzytkownik@nowy_serwer:/etc/odoo.conf

Edit the configuration file on the new server, paying particular attention to:

  • db_host - can remain localhost if PostgreSQL is on the same server
  • db_port - 5432 by default
  • db_user and db_password - the PostgreSQL user
  • db_name - the database name (optional, for a single database)
  • db_filter - an important security parameter, e.g. ^nazwa_bazy$
  • data_dir - the path to the filestore directory
  • addons_path - paths to all module directories (separated by commas)
  • xmlrpc_port - the Odoo port (8069 by default)
  • proxy_mode - set to True if you use nginx as a reverse proxy

Example configuration file section:

[options]
db_host = localhost
db_port = 5432
db_user = odoo
db_password = silne_haslo
db_filter = ^nazwa_bazy$
data_dir = /home/odoo/.local/share/Odoo
addons_path = /opt/odoo/addons,/opt/odoo/custom-addons
xmlrpc_port = 8069
proxy_mode = True
logfile = /var/log/odoo/odoo.log
log_level = info

Step 5: Starting Odoo on the new server

Once everything is configured, you can start Odoo. I recommend first doing a test run in debug mode, explicitly specifying the database:

odoo -c /etc/odoo.conf -d nazwa_bazy --logfile=/var/log/odoo/odoo.log --log-level=debug

The -d nazwa_bazy parameter ensures that Odoo connects to the correct database. Check the logs for errors. Pay particular attention to:

  • Database connection errors
  • Missing Python dependencies
  • Filestore access problems
  • Warnings about missing modules

If everything works correctly, configure Odoo as a systemd serviceso that it starts automatically after a server restart.

Verifying that the system works

After starting Odoo, perform the following tests:

  • Log in to the administrator account
  • Check that all installed modules are available
  • Verify attachments and documents - check a few random records with attachments
  • Test key business functions (creating a quotation, invoice, order)
  • Check that scheduled tasks work (Settings > Technical > Automation > Scheduled Actions)
  • Verify integrations with external systems
  • Test sending emails
  • Check reports and data exports

Attachment verification: You can check the consistency of attachments in the database with an SQL query:

SELECT count(*) FROM ir_attachment WHERE store_fname IS NOT NULL;

Make sure the number matches the number of files in the filestore directory.

Contact us

Step 6: Configuring the infrastructure

For a professional production environment, we recommend setting up additional layers of security and optimization.

Reverse proxy with Nginx

Configure nginx as a reverse proxy for Odoo, which will provide better performance, static file handling and an additional layer of security.

SSL/HTTPS certificate

To secure communication, configure HTTPS/SSL for Odoo. This is especially important if the system will be accessible over the internet. Let's Encrypt certificates are free and easy to set up.

Try Odoo for free

Step 7: Redirecting traffic to the new server

After fully testing the new server, you can redirect traffic from the current server:

  • Update the DNS records to point to the new IP address
  • Optionally: configure redirects at the reverse proxy level on the old server
  • Monitor the logs for problems during the first hours after the switch
  • Check that all domain email addresses work correctly

Keep in mind that DNS propagation can take from a few minutes to 48 hours, depending on the TTL settings. You can lower the TTL a few days before the migration to speed up propagation.

Best practices for Odoo migration

Perform the migration outside peak hours

Plan to move Odoo to another server on weekends or evenings, when user traffic is minimal. This minimizes the impact on the company's operations. Inform users in advance about the planned maintenance window.

Run a trial migration

Before the production migration, perform a full trial migration in a test environment. This will let you identify problems and estimate the actual downtime.

Keep the current server as a backup

Do not shut down the old server immediately after the migration. Leave it running for at least a week as a safeguard against unforeseen problems. Before shutting it down, make a final backup.

Document the process

Record all the steps, problems encountered and their solutions. This documentation will be valuable for future migrations and can serve as a disaster recovery procedure.

Test performance

After the migration, monitor the new server's performance for several days. Pay attention to:

  • Application response times - whether they are better or worse than on the old server
  • CPU and RAM load - especially during peak hours
  • Disk space usage and I/O speed
  • Database query execution times - use slow query logging in PostgreSQL
  • PDF report generation speed

Troubleshooting common problems

File access permission problem

If Odoo cannot read the filestore or a "Permission denied" error appears, make sure the Odoo system user has the appropriate permissions:

sudo chown -R odoo:odoo ~/.local/share/Odoo/filestore/
sudo chmod -R 750 ~/.local/share/Odoo/filestore/

Also check the permissions for the session files:

sudo chown -R odoo:odoo ~/.local/share/Odoo/sessions/
sudo chmod -R 750 ~/.local/share/Odoo/sessions/

Database connection errors

Check the pg_hba.conf configuration in PostgreSQL so that the Odoo user has access to the database:

sudo nano /etc/postgresql/16/main/pg_hba.conf

Add the following line (adjust the PostgreSQL version to your installation):

local   all   odoo   md5

Then reload the PostgreSQL configuration:

sudo systemctl reload postgresql

Missing modules or module errors

If some modules do not work after the migration or errors appear, update the module list in update mode:

odoo -c /etc/odoo.conf -d nazwa_bazy -u all --stop-after-init

For specific modules:

odoo -c /etc/odoo.conf -d nazwa_bazy -u nazwa_modulu --stop-after-init

Note: The -u all option can take a long time on large databases. Consider updating only the problematic modules.

User session errors

After the migration, users may have problems with sessions. You can clear the sessions in the database:

sudo su - postgres
psql nazwa_bazy
DELETE FROM ir_session;
\q
exit

Ask users to log out and log in again.

FAQ - Frequently asked questions

How long does it take to move Odoo to another server?

The migration time depends on the size of the database and the number of files. For a small instance (a few GB), the process can take 2-4 hours. Larger installations with hundreds of GB of data may require a whole day or longer. The key factor is the data transfer time between servers - with a good internet connection (100 Mbps+), speeds of several dozen MB/s can be achieved. The system downtime itself (while Odoo is stopped) can be limited to 1-3 hours with good planning.

Do I need to stop Odoo during the migration?

Yes, Odoo must be stopped while the database backup is being made to ensure data consistency. However, you can minimize downtime by performing an initial synchronization of files (filestore, modules) while the system is still running, and then carrying out a final synchronization of the differences and the database migration with the service stopped. This can shorten the system's unavailability to 30-60 minutes. Restoring the database on the new server should also be done with Odoo stopped.

What should I do if something goes wrong during the migration?

That is why it is so important to leave the old server untouched. If you run into problems on the new server, you can quickly return to the old setup by pointing DNS back to the current server (or removing the redirect on the reverse proxy). Always make a full backup before starting the migration and test the new environment before redirecting production traffic. Have a rollback plan ready and test it in a test environment.

Can I change the Odoo version during the migration?

This is not recommended. Migrating to another server and upgrading the Odoo version are two separate processes that should not be combined. First move Odoo in the same version to the new server and test that it works, and only then consider upgrading to a newer version. An Odoo upgrade requires additional steps, testing and often updates to custom modules.

Summary

Moving Odoo to another server is a process that requires planning and accuracy, but with proper preparation it can be carried out safely and efficiently. The key elements are making complete backups, keeping the software versions consistent, carefully transferring all components (database, filestore, modules, configuration) and thorough testing after the migration.

Remember to take a systematic approach: preparing the environment, migrating the data, configuring the system, extensive functional testing and, finally, redirecting traffic. Each of these stages is equally important for the success of the whole undertaking. Do not skip the trial migration in a test environment - it is an investment of time that can save you many problems in production.

Document every step of the process and prepare a contingency plan for returning to the old setup. After the migration, monitor the system for at least a week to make sure everything works as expected.

Need help migrating Odoo to a new server? The KK Innovations team of experts has extensive experience in moving Odoo instances between servers. We will take care of the entire migration process - from planning and execution to testing and post-implementation support. We ensure minimal downtime and guarantee the security of your data. Contact us to discuss the details of your project and get professional support with your Odoo infrastructure.

Contact us