Odoo ServerΒΆ
Create a systemd service unit file for the Odoo instance on Debian with these steps:
Navigate to the
systemdservice directory:cd /etc/systemd/system/
Create a new service unit file for the Odoo instance
odoo-server.service:sudo nano odoo-server.service
Add the following content:
[Unit] Description=Odoo Server Instance After=network.target [Service] User=odoo Group=odoo WorkingDirectory=/usr/local/logistics/Odoo/Instances/Logistics_16_Develop/ ExecStart=/usr/local/logistics/Python/venv/odoo_16/bin/python3 \ /usr/local/logistics/Odoo/Instances/Logistics_16_Develop/odoo/odoo-bin \ -c /usr/local/logistics/Odoo/Instances/Logistics_16_Develop/logistics_16_test.cfg Type=simple [Install] WantedBy=multi-user.target
Reload systemd to load the new service unit:
sudo systemctl daemon-reload
Enable the service to start automatically on boot:
sudo systemctl enable odoo-server
Start the Odoo service:
sudo systemctl start odoo-server
The Odoo Server should now be running as a systemd service. Manage it using systemctl commands like start, stop, restart, status, etc.