Running Odoo at erp.yourcompany.com instead of a server IP or generic hostname is a small change that makes a big difference for professionalism and brand trust. This guide walks through every step: DNS configuration, nginx setup, SSL provisioning, and propagation verification.
Prerequisites
- A domain you control (access to DNS settings)
- An Odoo instance accessible by IP or existing hostname
- nginx installed as a reverse proxy in front of Odoo
- Certbot installed for free SSL via Let's Encrypt
If you have not yet set up nginx, read our Odoo nginx reverse proxy guide first.
Step 1 — Choose Your DNS Record Type
You have two options depending on what you are pointing the domain to:
| Scenario | Record Type | Value |
|---|---|---|
| Pointing to a static IP (VPS/dedicated server) | A record | Your server's IPv4 address |
| Pointing to a hostname (load balancer, CDN) | CNAME record | Hostname of the target |
| Root domain (@) pointing to a hostname | ALIAS or ANAME | Hostname (provider-dependent) |
For most self-hosted Odoo setups on a VPS, an A record is the right choice.
Step 2 — Create the DNS Record
Log into your domain registrar or DNS provider (Cloudflare, Route 53, Namecheap, etc.) and add:
Type: A
Name: erp (or @ for root domain, or * for wildcard)
Value: 203.0.113.42 (your server's public IP)
TTL: 300 (5 minutes — use low TTL during setup, raise later)
For a CNAME pointing to another hostname:
Type: CNAME
Name: erp
Value: your-instance.deploymonkey.com
TTL: 300
Important: You cannot use a CNAME on the root domain (@) with standard DNS. Use an ALIAS/ANAME record if your provider supports it, or use a subdomain instead.
Step 3 — Verify DNS Propagation
DNS changes propagate globally in minutes to hours depending on TTL. Verify propagation before proceeding to nginx and SSL configuration:
# Check from your server
dig erp.yourcompany.com A +short
# Check globally using a public resolver
dig @8.8.8.8 erp.yourcompany.com A +short
dig @1.1.1.1 erp.yourcompany.com A +short
# Or use an online tool
# https://dnschecker.org — shows propagation across dozens of global resolvers
The output should show your server's IP address. If it shows the old IP or nothing, wait and check again. Do not proceed to SSL until the record is resolving correctly — Let's Encrypt will fail its HTTP challenge otherwise.
Step 4 — Configure nginx server_name
Edit your nginx Odoo server block (commonly /etc/nginx/sites-available/odoo) and add your custom domain to server_name:
server {
listen 80;
server_name erp.yourcompany.com;
location / {
proxy_pass http://127.0.0.1:8069;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Test and reload nginx:
sudo nginx -t && sudo systemctl reload nginx
At this point, http://erp.yourcompany.com should load Odoo. HTTPS comes next.
Step 5 — Provision SSL with Let's Encrypt
# Install certbot and the nginx plugin
sudo apt install -y certbot python3-certbot-nginx
# Obtain and install the certificate
sudo certbot --nginx -d erp.yourcompany.com
# Follow the prompts: enter email, agree to TOS, choose to redirect HTTP→HTTPS
Certbot automatically modifies your nginx config to add the SSL certificate paths and a redirect from port 80 to 443. Your resulting nginx config will look similar to:
server {
listen 443 ssl;
server_name erp.yourcompany.com;
ssl_certificate /etc/letsencrypt/live/erp.yourcompany.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/erp.yourcompany.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
location / {
proxy_pass http://127.0.0.1:8069;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name erp.yourcompany.com;
return 301 https://$host$request_uri;
}
Step 6 — Update Odoo Configuration
Tell Odoo its canonical URL so that links in emails and portal pages are correct:
# In odoo.conf
proxy_mode = True
Then in the Odoo UI: Settings → General Settings → Discuss → Custom Email Servers — set the Alias Domain to erp.yourcompany.com.
For the web base URL: Settings → Technical → Parameters → System Parameters, find web.base.url and set it to https://erp.yourcompany.com.
Custom Domains on DeployMonkey
DeployMonkey handles the nginx and SSL complexity automatically:
- Go to Instance Settings → Custom Domain.
- Enter your domain (
erp.yourcompany.com) and click Save. - DeployMonkey shows you the CNAME record to add to your DNS provider.
- Once DNS propagates, click Verify & Enable SSL. DeployMonkey provisions the Let's Encrypt certificate and configures nginx automatically.
- SSL auto-renews every 60 days — no manual action needed.
Custom domains are available on all paid plans ($15/month and above). See pricing for details.
FAQ
How long does DNS propagation take?
With a TTL of 300 seconds (5 minutes), most resolvers update within 5–15 minutes. With a high TTL (24 hours), propagation can take up to 48 hours globally. Always set a low TTL (300) before making changes, then raise it to 3600+ once the new record is confirmed working.
Can I use Cloudflare with my Odoo domain?
Yes, but set the Cloudflare proxy (orange cloud) to DNS-only (grey cloud) if you are using Certbot for SSL — Certbot needs a direct connection to your server. Alternatively, use Cloudflare's full SSL mode with an origin certificate if you want Cloudflare proxying active.
Why does Odoo show the wrong URL in emails after I add a custom domain?
Odoo uses the web.base.url system parameter for links in emails. Update it to your new custom domain URL (including https://) in Settings → Technical → System Parameters.
Does Let's Encrypt SSL work with Odoo?
Yes. Let's Encrypt issues free 90-day certificates that work perfectly with Odoo via nginx. Certbot auto-renews them via a cron job. The certificate is trusted by all major browsers and operating systems.
Skip the DNS and SSL Complexity
DeployMonkey handles custom domain setup, nginx configuration, and SSL auto-renewal for you. Enter your domain, add one DNS record, and you are done. Start your instance today or see what's included on each plan.