Linking a Domain to an Odoo Website Hosted on a VPS
===================================================
1. Point Your Domain to the VPS (DNS Setup)
-------------------------------------------
Go to your domain registrar (e.g., GoDaddy, Namecheap, Cloudflare) and set:
- A Record:
- Host/Name: @ (or www for subdomain)
- Type: A
- Value/IP: Your VPS public IP address
- TTL: Default or 3600 seconds
Optional: Add both @ and www A records pointing to the same IP.
2. Configure Odoo to Use Your Domain
------------------------------------
On your VPS:
- Edit Odoo config file (e.g., /etc/odoo/odoo.conf)
- Enable proxy mode:
proxy_mode = True
3. Set Up a Reverse Proxy with Nginx (Recommended)
--------------------------------------------------
Install Nginx to forward requests to Odoo.
more details in the below link:
https://www.odoo.com/documentation/18.0/administration/on_premise/deploy.html#https
4. Get a Free SSL Certificate (HTTPS)
-------------------------------------
Install Certbot and enable HTTPS:
$ sudo apt install certbot python3-certbot-nginx
$ sudo certbot --nginx
This updates the Nginx config to serve your site securely.
5. Restart Everything
---------------------
Restart Odoo and Nginx:
$ sudo systemctl restart odoo
$ sudo systemctl restart nginx
Now, your Odoo website should be accessible domain name