To put a self-hosted voice agent on your own domain, add an A record pointing the name at your server, keep port 80 open, issue a Let's Encrypt certificate and automate its renewal. For teams that run the platform themselves, Dograh, the open-source AI voice agent platform, does this with one script and already gives a free HTTPS address.
Key Takeaways
- Dograh's remote setup already gives a public IP a free, trusted sslip.io address.
- Let's Encrypt checks your domain over port 80, so keep that port open.
- After the move, save each phone number again so carriers get the new address.
Here we move a Dograh voice agent on your server onto your own domain, step by step. We explain why browsers need HTTPS and when the free address is enough, then cover the DNS record, the certificate and renewal, and close with the checks and the common errors.
What you need before you start
These steps follow the published Dograh and Let's Encrypt docs. Run them on a trial server before production. Each command below is copied from Dograh's docs, with voice.yourcompany.com standing in for your own name.
- Dograh already running on a server with a public IP, installed with the remote setup in Dograh's Docker guide. Our guides to deploy voice AI on AWS and on Azure cover the server itself.
- A domain you own, and access to its DNS settings at your registrar or DNS provider.
- SSH access to the server with
sudo. - The folder you ran
setup_remote.shfrom, which now holds thedograhdirectory.
Why a voice agent needs HTTPS
A browser gives the microphone only to a secure page. MDN's getUserMedia page defines a secure context as a page loaded over HTTPS, from a file, or from localhost, and on any other page the microphone API is missing entirely. So a test call from the dashboard works on your laptop at localhost and fails on a remote server over plain HTTP.

Phone calls add a second reason. Hosted carriers such as Twilio, Telnyx and Plivo send their webhooks and call audio to a public address, and they expect a certificate they trust. A server reached only by its bare IP, or with a certificate the carrier does not trust, leaves calls ringing with no agent on the line.
A self-signed certificate does not fix either problem. Browsers warn on it, some block the audio connection outright, and every new user has to click through a warning before a call works. The fix is a hostname with a certificate from a trusted authority, which is what both routes below give you.
When the free sslip.io address is enough
You may not need your own domain at all. On a server with a public IP, Dograh's remote setup already issues a free Let's Encrypt certificate on an sslip.io name built from the IP, so 203.0.113.10 becomes https://203-0-113-10.sslip.io. The certificate renews on its own, and browsers show no warning.
That covers browser test calls, carrier webhooks and API clients. The name is long and tied to the IP, so if the IP changes, the name and certificate change with it. On a private IP, or a server without Docker or root access, the setup script falls back to a self-signed certificate, and browsers show a warning.
Move to your own domain when people outside your team will see the address, when the IP might change, or when your security team wants every service under the company's own name. The rest of this guide covers that move.
Check: if the dashboard already opens on an https://...sslip.io address with a padlock, the free route is working, and you can stop here if it suits you.
Step 1: Point a DNS record at the server
Create the DNS record first, because the certificate cannot be issued until the name points at your server. At your registrar or DNS provider, add an A record with these values.
| Setting | Value |
|---|---|
| Type | A |
| Name or Host | voice (or @ for the root domain) |
| Value or Points to | Your server's public IP, such as 203.0.113.50 |
| TTL | 300 (or the default) |
DNS changes can take a few minutes to 48 hours to spread, though most take effect within 5 to 30 minutes. Check from the server with the command below.
nslookup voice.yourcompany.com
What this does: It asks DNS where
voice.yourcompany.compoints. When the answer shows your server's IP, the name is ready for a certificate.
One more record can block you. If your domain already has CAA records, which name the authorities allowed to issue for it, and none of them names letsencrypt.org, Let's Encrypt cannot issue. Let's Encrypt's CAA page shows the record to add, and a domain with no CAA records at all needs nothing.
Check: nslookup returns your server's IP for the new name.
Open Source Alternative to Vapi / Retell
Self-hosted voice agent platform — no per-minute fees
dograh-hq/dograh
Star on GitHub
Step 2: Keep port 80 open, plus the call ports
Let's Encrypt proves you control the name by fetching a file from it, and its challenge types page is plain that the HTTP-01 challenge "can only be done on port 80". So port 80 stays open to the internet even though users will only ever see HTTPS.
The call ports stay open too. Dograh needs TCP 80, 443, 3478 and 5349, and UDP 3478, 5349 and 49152 to 49200. Ports 80 and 443 serve the dashboard and the certificate check, and the rest carry browser call audio through the TURN server. If you set these up for the first install, nothing changes now.
Check: your firewall or cloud security group still allows every port in that list from the internet.
Step 3: Run the custom domain script
Dograh ships a script that does the rest of the move in one run. It must run from the same folder you ran setup_remote.sh from, the one that holds dograh/. The command below, from Dograh's custom domain guide, downloads setup_custom_domain.sh and runs it with sudo.
curl -o setup_custom_domain.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_custom_domain.sh && chmod +x setup_custom_domain.sh && sudo ./setup_custom_domain.sh
What this does: It asks for your domain name and an email for Let's Encrypt notices, then moves the install onto that name and sets up renewal.
The script works through six stages and prints each one. It checks that the domain's A record matches the server's IP and asks "Continue anyway?" if not, so answer no and fix DNS first. Then it installs Certbot, points PUBLIC_HOST and PUBLIC_BASE_URL in .env at the new name and restarts the stack, so settings such as the TURN host follow the new address.
It then issues the certificate while nginx keeps running, so there is no downtime, loads it into nginx and installs the renewal hook with a dry run. If issuance fails, it lists the likely causes and leaves the stack running with the previous certificate.
Do not move the dograh folder afterwards. The renewal hook points at it, and a moved folder means the next renewal never reaches nginx.
Check: the script finishes all six stages, and https://voice.yourcompany.com opens the dashboard with a padlock.
Step 4: Or set the domain by hand
The manual route does the same work in steps you can see. It suits a server where you want to review each change. First install Certbot and point .env at your domain, with the lines below from the same guide.
sudo apt update
sudo apt install certbot -y
cd dograh
sed -i "s/^PUBLIC_HOST=.*/PUBLIC_HOST=voice.yourcompany.com/" .env
sed -i "s|^PUBLIC_BASE_URL=.*|PUBLIC_BASE_URL=https://voice.yourcompany.com|" .env
What this does: It installs Certbot on Ubuntu or Debian, then rewrites
PUBLIC_HOSTandPUBLIC_BASE_URLin.envso nginx answers to the new name. On Amazon Linux or RHEL, install Certbot withsudo yum install certbot -y.
Then start the stack, issue the certificate through nginx, copy it where nginx reads it and restart nginx.
./remote_up.sh
sudo certbot certonly --webroot -w "$(pwd)/certs" -d voice.yourcompany.com
sudo cp /etc/letsencrypt/live/voice.yourcompany.com/fullchain.pem certs/local.crt
sudo cp /etc/letsencrypt/live/voice.yourcompany.com/privkey.pem certs/local.key
sudo chmod 644 certs/local.crt certs/local.key
sudo docker compose --profile remote restart nginx
What this does:
remote_up.shbrings the stack up with the new settings. Certbot's--webrootmode writes a challenge file intocerts/, which the running nginx serves on port 80, so issuance needs no downtime. The copy lines put the certificate and key where nginx reads them.
Check: the browser shows a valid certificate for voice.yourcompany.com.
Step 5: Keep renewal automatic
A certificate that expires takes every call down with it, so renewal has to run on its own. Certbot's own timer renews certificates, and a deploy hook copies the new files into dograh/certs and restarts nginx. The script route installs that hook for you. On the manual route, create /etc/letsencrypt/renewal-hooks/deploy/dograh-reload.sh with the content from the guide.
#!/bin/bash
# Copy renewed certificates to dograh certs directory
cp /etc/letsencrypt/live/voice.yourcompany.com/fullchain.pem /home/ubuntu/dograh/certs/local.crt
cp /etc/letsencrypt/live/voice.yourcompany.com/privkey.pem /home/ubuntu/dograh/certs/local.key
chmod 644 /home/ubuntu/dograh/certs/local.crt /home/ubuntu/dograh/certs/local.key
# Restart nginx to load new certificates
cd /home/ubuntu/dograh
docker compose --profile remote restart nginx
What this does: After each renewal it copies the fresh certificate and key into
certs/and restarts nginx so it serves them. Replace/home/ubuntu/dograhwith your own path, then make the file executable withsudo chmod +xand test the whole chain withsudo certbot renew --dry-run.
This matters more every year. Certificates last 90 days today, and Let's Encrypt is shortening certificate life to a 64-day default from February 2027 and 45 days from February 2028. A renewal you run by hand will be missed sooner or later.
Check: sudo certbot renew --dry-run ends with a success message.
Join the Dograh Community
Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.
Step 6: Update phone numbers and API clients
The server now answers on the new name, but some outside systems still hold the old address. Phone numbers come first. After the move, open each phone number in Dograh and save it again. That sends the new address to Twilio, Telnyx, Plivo, Vonage, Vobiz and Cloudonix. For Asterisk, Exotel and WhatsApp, change the address in that system yourself. Then confirm the URL in the carrier console.
Code that calls Dograh needs the new address too. Scripts built with our voice agent SDK guide set it as the base URL, such as https://voice.yourcompany.com, and any system that starts calls through the API trigger needs the same change. Webhook targets you configured are not affected, since they point from Dograh to your systems.
Check: an inbound call to each number reaches the agent, and one API call from your code succeeds on the new address.
Common errors and how to fix them
Most failures trace back to DNS, port 80, Let's Encrypt's limits or the TURN settings. The table pairs each symptom with its fix, using the messages Dograh's scripts print.
| Symptom | Likely cause | Fix |
|---|---|---|
| Certificate issuance failed, port 80 named | Port 80 closed in the firewall or security group | Open TCP 80 to the internet and keep nginx running, then run the script again |
| DNS check asks "Continue anyway?" | The A record is missing or has not spread yet | Answer no, fix the record and wait until nslookup shows the server's IP |
| Issuance refused for the domain | A CAA record that does not name Let's Encrypt | Add a CAA record for letsencrypt.org, or remove the blocking one |
| Rate limit reached | Too many failed or repeated attempts | Wait, fix the cause first, then retry once |
| Issuance fails on an older install | Old configuration files | Run ./update_remote.sh first, then the custom domain script |
| Browser certificate error after setup | Files not copied, or nginx still on the old certificate | Check ls -la dograh/certs/, run ./remote_up.sh --preflight-only in dograh/, then restart nginx |
| Dashboard loads but calls do not connect | TURN ports closed, or PUBLIC_HOST and PUBLIC_BASE_URL not matching the domain | Reopen TCP and UDP 3478 and 5349 and UDP 49152 to 49200, fix .env, then run ./remote_up.sh |
Rate limits deserve care. Let's Encrypt's rate limits allow 5 failed validations per name per hour and 5 duplicate certificates for the same names per week, with no overrides for duplicates. Running the script again and again against a broken DNS record burns through them, so fix DNS before the next try.
Before you ship it
Run the full set of checks once more. The browser shows a padlock on the new name, sudo certbot renew --dry-run passes, a browser test call has two-way audio, and a real phone call reaches the agent on every number.
Then lock the install down. Set ENABLE_SIGNUP=false in .env once your team has accounts, so strangers cannot sign up on a public name, and telemetry can be switched off with ENABLE_TELEMETRY=false. Plan upgrades too, and our guide on how to update a self-hosted voice agent keeps the domain settings through them.
The domain is now one more thing your team looks after. When you self-host Dograh there is no per-minute platform fee, but the server, model keys and phone minutes still cost money, and the certificate, DNS, database and upgrades stay with your team. Help comes from the open-source community, with custom SLAs on Enterprise, and Dograh Cloud runs it all for a 1¢-a-minute platform fee if you would rather not manage the address.
Glossary
- Secure context
- A page loaded over HTTPS, from a file or from localhost. Browsers expose the microphone only there, so remote voice agents need HTTPS.
- HTTP-01 challenge
- Let's Encrypt's check that you control a name, done by fetching a file from it over port 80. It cannot issue wildcard certificates.
- CAA record
- A DNS record listing which certificate authorities may issue for a domain. If records exist and none names letsencrypt.org, issuance fails.
- Renewal hook
- A script Certbot runs after each renewal. Dograh's copies the new certificate into dograh/certs and restarts nginx.

