eMondrian Community serves everything through its gateway: the browser pages, /xmla for Excel and Power BI, the REST API and the MCP server. Switch the gateway to HTTPS, and all of them move together. It takes a certificate, two lines in .env and a restart.

Use HTTPS for any server that people reach from other machines. With HTTPS, passwords and tokens travel encrypted, the login page works from any browser, and AI agents can sign in with OAuth.

What you need

  • A DNS name for the server, for example bi.example.com.
  • A certificate for that name and its private key, in PEM format:
    • from a public certificate authority, such as Let’s Encrypt;
    • or from your organisation’s certificate authority, for a server on the internal network.
  • Clients that trust the certificate. Excel and Power BI accept only certificates that Windows trusts. A public certificate is trusted everywhere. For a certificate from your own CA, the CA’s root certificate must be in the trusted roots of the users’ machines; in a Windows domain this is usually done through Group Policy.

1. Put the certificate on the server

In the eMondrian folder, put two files into auth/secrets/tls/:

FileWhat it holds
tls.crtThe server certificate followed by the intermediate certificates: the full chain, in PEM
tls.keyThe private key, in PEM, without a password

The names in the certificate must cover the host of PUBLIC_URL. Protect the key:

chmod 600 auth/secrets/tls/tls.key

With Let’s Encrypt, fullchain.pem becomes tls.crt and privkey.pem becomes tls.key.

2. Set the address in .env

PUBLIC_URL=https://bi.example.com
EMONDRIAN_TLS_PORT=443

PUBLIC_URL is the address users open. eMondrian builds every address it gives out from it: the login page, the links to dashboards, the OAuth addresses of the MCP server.

To use another port, put it in both lines:

PUBLIC_URL=https://bi.example.com:8443
EMONDRIAN_TLS_PORT=8443

3. Apply

docker compose up -d

Run it in the eMondrian folder: .env there tells Docker Compose which files and profiles to use. If .env already had these lines and only the certificate files changed, run docker compose restart auth_gateway instead.

The gateway checks for the certificate when it starts. With the certificate in place:

  • the HTTPS port serves eMondrian with TLS 1.2 and TLS 1.3, and HTTP/2;
  • the HTTP port (EMONDRIAN_PORT) sends browsers to the same page on PUBLIC_URL;
  • HTTPS responses carry Strict-Transport-Security: max-age=31536000, so browsers remember to use HTTPS.

The redirect URIs of the gateway’s own client in Keycloak are set from PUBLIC_URL on the same up -d.

4. Check

The gateway log says whether TLS is on:

docker compose logs auth_gateway | grep "TLS:"
# TLS: on (certificate /etc/nginx/tls/tls.crt)

From another machine (if EMONDRIAN_PORT isn’t 80, add it to the http:// address):

curl -I http://bi.example.com/
# HTTP/1.1 301 Moved Permanently
# Location: https://bi.example.com/
 
curl -I https://bi.example.com/xmla
# Strict-Transport-Security: max-age=31536000
# (also on a 401 answer, when sign-in is on)
 
openssl s_client -connect bi.example.com:443 -servername bi.example.com -showcerts </dev/null
# the chain of certificates, and: Verify return code: 0 (ok)

With a certificate from your own CA, give the CA’s root certificate to these commands: curl --cacert ca.crt …, openssl s_client -CAfile ca.crt ….

Then open https://bi.example.com in a browser on a user’s machine: the page opens with no certificate warning.

5. Move the clients to https://

Excel, Power BI, AI agents and the REST API connect to the address they are given, so give each of them the https:// address.

ClientNew address
Excel, Power BI Desktophttps://bi.example.com/xmla
AI agents (MCP)https://bi.example.com/emondrian/mcp
REST APIhttps://bi.example.com/api/v1
Browser: OLAP Client, Schema Editor, dashboardshttps://bi.example.com
  • Excel and Power BI. Change the server address in existing connections to the https:// one. In Excel: Data → Queries & Connections, the connection’s Properties → Definition, Data Source in the connection string. In Power BI Desktop, connect live to https://bi.example.com/xmla (Get data → Analysis Services); in a Power BI project (.pbip), change the address in the connection string in definition.pbir.

  • AI agents. Change the address in the MCP client’s settings. For Claude Code (use the name you gave the server):

    claude mcp remove emondrian
    claude mcp add --transport http emondrian https://bi.example.com/emondrian/mcp

    Over HTTPS, agents on other machines can sign in with OAuth.

  • Links with a personal token to /xmla or to a dashboard: issue them again, so they start with https://.

6. Identity providers

If users sign in through Microsoft Entra ID, Google, Okta or another provider, register the new https:// addresses with the provider. The configurator prints the address to register in its log.

ProviderAddress to register
OIDC through Keycloak (Entra ID, Google, Okta)https://bi.example.com/auth/realms/emondrian/broker/<alias>/endpoint
SAML (ADFS)entity ID https://bi.example.com/auth/realms/emondrian
Direct OIDC modehttps://bi.example.com/redirect_uri

Accounts from Keycloak, Active Directory and LDAP need no change.

Renew the certificate

The gateway reads the certificate when it starts. After you replace the two files, restart it:

docker compose restart auth_gateway

To renew a Let’s Encrypt certificate automatically with certbot on the host, use a deploy hook that copies the new files and restarts the gateway, for example /etc/letsencrypt/renewal-hooks/deploy/emondrian.sh:

#!/bin/sh
cp /etc/letsencrypt/live/bi.example.com/fullchain.pem /opt/emondrian/auth/secrets/tls/tls.crt
cp /etc/letsencrypt/live/bi.example.com/privkey.pem  /opt/emondrian/auth/secrets/tls/tls.key
chmod 600 /opt/emondrian/auth/secrets/tls/tls.key
cd /opt/emondrian && docker compose restart auth_gateway

Replace /opt/emondrian with your eMondrian folder.

If something goes wrong

What you seeWhat to do
The gateway doesn’t start; its log says TLS is on but PUBLIC_URL is not https://The certificate is in place, but PUBLIC_URL starts with http://. Set it to https://… and run docker compose up -d.
The log says TLS: off (no certificate in /etc/nginx/tls) - plain HTTPThe gateway found no certificate. Check the file names tls.crt and tls.key in auth/secrets/tls/.
After the move, Excel says Either a connection cannot be made to the … server, or Analysis Services is not running, or Power BI says the connection timed out or the server name is incorrectFirst check that the connection uses the https:// address. Then open https://bi.example.com/xmla in a browser on the same machine: if the browser warns about the certificate, Windows doesn’t trust it. Check the chain with openssl s_client: tls.crt must hold the intermediate certificates. For your own CA, add its root certificate to the machine’s trusted roots.
An AI agent reports self signed certificate in certificate chainThe agent’s machine doesn’t trust the certificate. Add the CA’s root certificate to that machine’s trusted roots.
Excel says The HTTP server returned the following error: .; an AI agent reports HTTP 400: missing mcp-session-id headerThe client still uses the http:// address. Change it to https:// — see Move the clients.
curl on Windows stops with CRYPT_E_NO_REVOCATION_CHECKThe certificate comes from your own CA, and that CA publishes no revocation list (CRL) or OCSP address. Add one to the CA, or for a quick check run curl --ssl-no-revoke.
The browser warns about the nameThe certificate doesn’t cover the host in PUBLIC_URL. Get a certificate for that name.
Sign-in through a provider fails after the moveRegister the https:// address with the provider — see Identity providers.

See also: Security · Access from another machine · AI agents (MCP)