Skip to Content
Menu
This question has been flagged
9 Replies
145471 Views

How can I change the native port of odoo server in order to make it listen to different port than 8069 ? (needed in order to run multiple server instances at the same time)

Here I'm NOT looking for solutions that forward/redirect/reroute traffic to port 8069 like these:

  1. Reverse proxy through Apache or Nginx
  2. Port forwarding / port routing through e.g. iptables
Avatar
Discard
Best Answer

There is one more option. If you need to change port number permanently to another, then you can change it in config file,

In openerp/tools.config.py     

group.add_option("--xmlrpc-port", dest="xmlrpc_port", my_default=8069,
                         help="specify the TCP port for the XML-RPC protocol", type="int")

Change this 8069 to any port number you wish to use.

Avatar
Discard
Author

True that's one more option but I would avoid making any changes in odoo server code files. In order to be 'upgrade safe' I try to make any changes in server conf file or in custom modules. Thanks for the extra info though.

Author Best Answer

Let's say that we want to use the port 8070 instead of 8069

We can do this by setting the server option xmlrpc-port to xmlrpc_port = 8070

This can be done by starting the server manually with this option using something like this (paths may be different):

./openerp-server --config=/etc/odoo-server.conf --xmlrpc-port=8070

Or by adding in the config file (e.g. /etc/odoo-server.conf)

xmlrpc_port = 8070

There is one more option (added by Janeesh below) but it involves editing odoo server files, something I would avoid in order to keep any changes 'upgrade safe':

In openerp/tools.config.py     

group.add_option("--xmlrpc-port", dest="xmlrpc_port", my_default=8069,
                         help="specify the TCP port for the XML-RPC protocol", type="int")

Change this 8069 to any port number you wish to use.

Avatar
Discard

do you know which method odoo uses in their saas offerings?

Author

Can you please make your question a little more specific? You ask about the method they use to do what? To run multiple instances? If you ask about running multiple instances I can only assume (I don't really know for sure) that they use reverse proxy (probably using nginx).

Thanks for the tip. I have noticed something strange though, when changing the port in the conf file everything loads fine but headers and footers are missing from reports - like when printing an invoice it's distorted with no header and footer. What would be the cause of this? Thanks.

Author

I can't reproduce the problem that you report. I can normally print invoices to pdf and headers and footers show up without any problem. If you have a problem when you change the xmlrpc_port option which you don't have if you leave it as it is by default, probably this is a bug. If you want, please create a new question about your issue and post a link here with a comment.

Thanks George, I opened a question here: https://www.odoo.com/forum/help-1/question/changing-xmlrpc-port-from-8069-to-8070-causes-report-issues-60767

Best Answer

Either you can run your odoo server like

python odoo-server --xmlrpc-port=your_port_number

If you wish to do permanently, then you can modify odoo/tools.config.py     

group.add_option("--xmlrpc-port", dest="xmlrpc_port", my_default=your_port_number, help="specify the TCP port for the XML-RPC protocol", type="int") 

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 15
3002
1
Apr 25
912
9
Feb 24
126279
4
Oct 16
5207
8
Dec 23
21326