Set up partner addresses and their certificates
Give every partner a default customer panel address, switch on free certificates from Let's Encrypt, and set the web server up once so partner addresses work over HTTPS.
On this page
A partner's customers sign in on an address that carries the partner's brand. There are two kinds:
| Kind | Example | Who sets it up |
|---|---|---|
| Default address | kochi-digital.partners.example.com | You, once, for all partners |
| Partner's own domain | app.partner-company.com | The partner, in their portal |
Both need one change to the web server, which you make once. This page covers all three parts. Everything is on Admin → Partner addresses.
The server steps describe Nginx as CloudPanel sets it up. Screens and file layouts differ between versions, so check each step against your own server.
Before you start
- You need access to your domain's DNS.
- You need to be able to edit the site's Vhost in CloudPanel (Sites → your site → Vhost).
- Nginx must be version 1.15.9 or newer. Run
nginx -von the server to check.
Part 1: The partner domain and the CNAME target
Every partner gets one default address by itself: link-name-store.<domain>. Their storefront is its front page and their customers sign in on it.
<domain> is your platform's own domain unless you set another under Admin, Partner addresses, Partner domain.
For these names to reach the server, add one wildcard DNS record at your DNS company:
| Type | Name | Value |
|---|---|---|
| A | * (or *.yourdomain) | Your server's IP address |
The CNAME target is the name partners point their own domains at. By default it is cp. followed by your domain. It must resolve to this server too; the wildcard record above already covers it.
Part 2: Free certificates
In 2. Free certificates (Let's Encrypt):
- Tick Get and renew certificates from Let's Encrypt automatically.
- Tick the box to agree to the Let's Encrypt Subscriber Agreement.
- For a first trial, also tick Test mode. Test certificates are not trusted by browsers, but they prove the server setup works without using up the real service's limits.
- Click Save.
What happens then:
- Each partner's default address gets its own certificate within a few minutes, one partner at a time, from the background worker. Issue now in the table at the foot of the page does one straight away.
- A partner gets a certificate for their own domain by clicking Get a free certificate in their portal.
- Certificates last 90 days and are renewed about 30 days before they run out. A failed try is repeated after six hours.
When the test works, untick Test mode and save. Use Issue now to replace test certificates with real ones.
Limits to know: Let's Encrypt issues about 50 certificates a week for names under one domain, so more than 50 new partners in a week have to wait, or you install a wildcard certificate (Part 3). The background worker must be running; see Set up the background worker.
Part 3: A wildcard certificate instead (optional)
One certificate for *.cp.example.com covers every default address. You only need it if you don't use free certificates, or if you add partners faster than their weekly limit. Free certificates cannot be wildcards here.
- In 3. Wildcard certificate for default addresses, fill in Organisation and Country code and click Make the certificate request.
- Click Copy and order a wildcard certificate from a provider with that request.
- Paste what they issue into Certificate and CA bundle or intermediate certificates and click Install the certificate.
- In the vhost's
mapblock, add the wildcard line described innginx.cloudpanel.conf, so default addresses use this certificate.
The private key is made on the server, stored encrypted and never shown.
Part 4: Server setup, once
The server must answer for names other than your own, pick the certificate for each, and let Let's Encrypt check a domain over plain http. The text to add is in the file nginx.cloudpanel.conf that comes with the software, in the section "Partner addresses". Replace SITE_USER and YOUR_DOMAIN in it with your own. There are three pieces:
- A
mapblock to paste at the very top of the vhost, above the firstserver {line. - A new server block to paste above the block that starts with
listen 8080;. It answers for every name that is not one of your own sites, reads certificates fromstorage/sslby name, and does not redirect/.well-known/acme-challenge/to https. - One change in the
listen 8080;block: add~^.+$to the end of itsserver_nameline, so requests for partner addresses are passed to PHP.
Save the vhost. CloudPanel checks the configuration and reloads Nginx; if it reports an error, nothing is changed.
Then check that Nginx can read the certificate folder. On the server:
- Find the user Nginx runs as:
grep '^user' /etc/nginx/nginx.conf. - After the first certificate has been issued, try to read a key as that user, for example
sudo -u www-data head -1 /path/to/storage/ssl/<address>.key. - If that fails with "Permission denied", give that user read access to the folder, for example with
setfacl -R -m u:www-data:rX /path/to/storage/ssland the same with-dso new files inherit it.
How it works: certificates are saved in storage/ssl as <address>.crt and <address>.key. The new server block reads them by the name the visitor asked for, so a newly issued certificate works without a restart. Your own domain keeps its own server block and certificate.
Test it: open a partner's default address. You should see the sign-in page with the partner's name and a padlock.
A partner's own domain
You do nothing per partner. The partner:
- Enters their domain under Brand and profile → Customer panel address.
- Points it at your CNAME target with a CNAME record.
- Clicks Get a free certificate, or makes a certificate request and installs a certificate from their own provider.
See White label and your customer panel address and Get an SSL certificate for your own domain for what they see.
The table Partners and their addresses lists each partner's default address, own domain, its status and when its certificate runs out. You can still enter or clear a partner's domain yourself under Partners → the partner → Their domain.
What partners' customers cannot do on those addresses
- Continue with Facebook for WhatsApp numbers and the Meta ads connection are hidden, because Meta returns people to your own address. Customers connect a number by entering its details.
- Your public website and policy pages are not shown; a visitor who is not signed in goes to the sign-in page.
Common problems
A partner address shows your own site's certificate, or a warning
The new server block is missing, or the address has no certificate yet. Check Part 4 and the table at the foot of the page.
A default address stays on "No certificate yet"
Its row shows the reason from the last try. Usual causes: the wildcard DNS record is missing; the new server block redirects /.well-known/acme-challenge/ to https; or the background worker is not running. Fix the cause and click Issue now.
Other websites on the same server
The new block answers for every name that is not one of the server's configured sites. Names of your other CloudPanel sites keep going to those sites.
Nginx will not reload after the change
Usual causes: the map block was pasted inside a server block and must be above the first one; a line was pasted twice; or Nginx is older than 1.15.9 and cannot read certificate files named by a variable.
The Nginx error log says "permission denied" for a .key file
Nginx cannot read storage/ssl. Key files are saved readable by the site user and its group only. Give the user Nginx runs as read access to that folder and its files.
"Make a certificate request for *.… first."
You changed the partner domain after making the request. Make a new request.
"This certificate is for a different address, not *.…"
The certificate is not a wildcard for the partner domain. A certificate for partners.example.com alone does not cover kochi-digital.partners.example.com.
A partner's certificate has expired
The partner renews it in their portal. Until then links for their customers fall back to the default address.
Behind Cloudflare: one wildcard certificate
When the * record for your partner domain is proxied through Cloudflare, visitors can see Error 525, SSL handshake failed on a partner's default address. Cloudflare reached the server, but the server had no certificate for that name, and Let's Encrypt cannot issue one through the proxy.
Install one wildcard certificate that covers every default address:
- In Cloudflare, open SSL/TLS, Origin Server, Create Certificate. Keep "Generate private key and CSR with Cloudflare" and set the hostname to
*.followed by your partner domain. - Copy the origin certificate and the private key it shows. The key is shown once.
- In the admin panel, open Partner addresses, step 3, and paste the certificate and the private key. Select Install the certificate.
- In the site's vhost, add this line inside the
map $ssl_server_name $chatilo_certblock, with your own domain, then save:
~\.yourdomain\.com$ _wildcard;
A Cloudflare origin certificate is trusted only by Cloudflare, so the * record must stay proxied. You can also make the request in step 3 and choose "Use my private key and CSR" at Cloudflare; the private key then never leaves the server.
Partners' own branded domains are not covered by the wildcard. The name they point their CNAME at should be set to "DNS only" in Cloudflare, so each one can get its free certificate.