:banner: banners/cmdline.jpg .. _reference/cmdline: =============================== Command-line interface: odoo.py =============================== .. _reference/cmdline/server: Running the server ================== .. program:: odoo.py .. option:: -d , --database database used when installing or updating modules. .. option:: -i , --init comma-separated list of modules to install before running the server (requires :option:`-d`). .. option:: -u , --update comma-separated list of modules to update before running the server (requires :option:`-d`). .. option:: --addons-path comma-separated list of directories in which modules are stored. These directories are scanned for modules (nb: when and why?) .. option:: --workers if ``count`` is not 0 (the default), enables multiprocessing and sets up the specified number of HTTP workers (sub-processes processing HTTP and RPC requests). .. note:: multiprocessing mode is only available on Unix-based systems A number of options allow limiting and recyling workers: .. option:: --limit-request Number of requests a worker will process before being recycled and restarted. Defaults to 8196. .. option:: --limit-memory-soft Maximum allowed virtual memory per worker. If the limit is exceeded, the worker is killed and recycled at the end of the current request. Defaults to 640MB. .. option:: --limit-memory-hard Hard limit on virtual memory, any worker exceeding the limit will be immediately killed without waiting for the end of the current request processing. Defaults to 768MB. .. option:: --limit-time-cpu Prevents the worker from using more than CPU seconds for each request. If the limit is exceeded, the worker is killed. Defaults to 60. .. option:: --limit-time-real Prevents the worker from taking longer than seconds to process a request. If the limit is exceeded, the worker is killed. Differs from :option:`--limit-time-cpu` in that this is a "wall time" limit including e.g. SQL queries. Defaults to 120. .. option:: --max-cron-threads number of workers dedicated to cron jobs. Defaults to 2. The workers are threads in multithreading mode and processes in multiprocessing mode. For multiprocessing mode, this is in addition to the HTTP worker processes. .. option:: -c , --config provide an alternate configuration file .. option:: -s, --save saves the server configuration to the current configuration file (:file:`{$HOME}/.openerp_serverrc` by default, overridable using :option:`-c`) .. option:: --proxy-mode enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy support`_. .. warning:: proxy mode *must not* be enabled outside of a reverse proxy scenario .. option:: --test-enable runs tests after installing modules .. option:: --debug when an unexpected error is raised (not a warning or an access error), automatically starts :mod:`python:pdb` before logging and returning the error .. _reference/cmdline/server/database: database -------- .. option:: -r , --db_user database username, used to connect to PostgreSQL. .. option:: -w , --db_password database password, if using `password authentication`_. .. option:: --db_host host for the database server * ``localhost`` on Windows * UNIX socket otherwise .. option:: --db_port port the database listens on, defaults to 5432 .. option:: --db-filter hides databases that do not match ````. The filter is a `regular expression`_, with the additions that: - ``%h`` is replaced by the whole hostname the request is made on. - ``%d`` is replaced by the subdomain the request is made on, with the exception of ``www`` (so domain ``odoo.com`` and ``www.odoo.com`` both match the database ``odoo``) .. option:: --db-template