.. _reference/cmdline: ================================ Command-line interface: odoo-bin ================================ .. _reference/cmdline/server: Running the server ================== .. program:: odoo-bin .. option:: -d , --database database(s) used when installing or updating modules. Providing a comma-separated list restrict access to databases provided in list. For advanced database options, take a look :ref:`below `. .. 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:: -c , --config provide an alternate :ref:`configuration file ` .. option:: -s, --save saves the server configuration to the current configuration file (:file:`{$HOME}/.odoorc` by default, and can be overridden using :option:`-c`). .. option:: --without-demo disables demo data loading for modules installed comma-separated, use ``all`` for all modules. .. option:: --test-enable runs tests after installing modules .. option:: --test-tags 'tag_1,tag_2,...,-tag_n' select the tests to run by using tags. .. _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``). These operations are case sensitive. Add option ``(?i)`` to match all databases (so domain ``odoo.com`` using ``(?i)%d`` matches the database ``Odoo``). Since version 11, it's also possible to restrict access to a given database listen by using the --database parameter and specifying a comma-separated list of databases When combining the two parameters, db-filter supersedes the comma-separated database list for restricting database list, while the comma-separated list is used for performing requested operations like upgrade of modules. .. code-block:: bash $ odoo-bin --db-filter ^11.*$ Restrict access to databases whose name starts with 11 .. code-block:: bash $ odoo-bin --database 11firstdatabase,11seconddatabase Restrict access to only two databases, 11firstdatabase and 11seconddatabase .. code-block:: bash $ odoo-bin --database 11firstdatabase,11seconddatabase -u base Restrict access to only two databases, 11firstdatabase and 11seconddatabase, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed .. code-block:: bash $ odoo-bin --db-filter ^11.*$ --database 11firstdatabase,11seconddatabase -u base Restrict access to databases whose name starts with 11, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed .. option:: --db-template