# How to install and upgrade Odoo add-ons

## Overview

Upgrade or install Odoo modules using command-line tools. TurboStack servers provide optimal system configurations, but managing Odoo itself remains your responsibility. For the file layout and service details, see [Odoo reference](reference.md).

> [!IMPORTANT]
> To safely test new modules or updates, use a separate staging server. Do not run staging environments locally on the same production host.
>
> Why separate servers?
>
> - Prevents production disruption.
> - Isolates tests and experiments.
> - Maintains better performance and security.
>
> TurboStack offers affordable and optimized staging environments. Contact support to request a staging clone of your production Odoo.

## Upgrade an add-on

```bash
systemctl --user stop application.service
~/application/odoo/odoo-bin -u <module_name> -c ~/conf/odoo.conf --stop-after-init
systemctl --user start application.service
```

Replace `<module_name>` with your actual add-on/module name.

## Install a new add-on

1. Upload the module to `~/application/custom/`.
2. Run:

```bash
systemctl --user stop application.service
~/application/odoo/odoo-bin -i <module_name> -c ~/conf/odoo.conf --stop-after-init
systemctl --user start application.service
```

## Notes

- Always stop the service before upgrades.
- Make sure your add-on contains a valid `__manifest__.py` file.
- Keep your structure modular by creating symbolic links inside `~/application/custom/` for large or custom add-on libraries, rather than copying whole trees in.
- Always keep your `.env` and `odoo.conf` safe and backed up before changing modules, so you can restore a known-good configuration if an upgrade goes wrong.

## Related

- [Odoo reference](reference.md)
- [How to install Python dependencies for Odoo](python-requirements.md)
- [Deploy Odoo on TurboStack](deploy.md)
- [Odoo best practices](best-practices.md)
- [Troubleshooting Odoo](troubleshooting.md)
- [How to manage user system services](../../technologies/system-services/manage-user-services.md)
- [Connect over SSH](../../platform/hosts/ssh.md)
