# Running The Server Once the source install is properly set up the Odoo instance can be started by running the `odoo-bin` script in the install directory. This will run the odoo instance and bind it to port 8069 which is the default. For more info pass the `--help` flag to the script. Here are some useful flags: - `-d` tells the script you want a specific databse to be selected. Also hides other databases from the selector. - `-p` sets the port the instance will bind to - `--addons-path` used to specify additional addon paths (like your development environment) - `-s` saves certain options in the `~/.odoorc` file so you don't have to pass them to the launcher script every time. Use this once to easily configure your instance instead of editing the `~/.odoorc` file manually. # Configuring Services Odoo's community code repository includes a service file fittign for SystemD-based distributions. Here are the steps to enable it: 1. Make a simple bash script to run the `odoo-bin` script with instance-specific arguments like so: ``` #!/bin/bash ./odoo-bin -p [port] -c [path/to/configuration/file/for/this/instance] -d [databases name] --no-database-list ``` Then give it excecution permissions: ``` chmod +x [path/to/your/script] ``` 2. Make a SystemD service in `/usr/lib/systemd/system/` to launch and monitor your launching script at boot: ``` [Unit] Description=Odoo After=postgresql.service [Service] Type=simple User=[your username] Group=[your username] WorkingDirectory=[path/to/scripts/working/directory] ExecStart=[path/to/your/launch/script] [Install] WantedBy=multi-user.target ``` 3. Enable the service so that it runs on boot. ``` sudo systemctl enable odoo.service ``` 4. Start the service. ``` sudo systemctl start odoo.service ``` ## Running Multiple Instances To run additional services simply make seperate scripts and service files for each while changing arguments accordingly (especially the port number).