Enable HTTPS for AI and MCP clients
AI clients such as Claude (custom connectors) and ChatGPT (connectors and apps) only connect to remote MCP servers over HTTPS. Your trial runs on http://localhost:8080, so put HTTPS in front of it. Do step 1, then pick one option.
Each command is a single line, so it works as-is in a macOS/Linux terminal and in Windows PowerShell (not the old Command Prompt). Boxes with several lines hold several commands, or file contents.
Your MCP address will be https://<your-https-host>/mcp/<service-name>. Create the service in the DreamFactory admin app under AI → MCP servers; <service-name> is its Name.
-
Re-create the trial with three settings (every option)
Your data lives in its own Docker volume, and the dashboard command keeps the same
APP_KEY, so re-creating the container is safe. Remove the container:Remove the container (data stays in the volume)docker rm -f dreamfactory-trialThen run the docker run command from your dashboard again, adding these flags just before the image name (the last word):
Flags to add before the image name-e HTTPS_HEADER=on -e ENABLE_MCP_DAEMON=1 -e ENABLE_SYSTEM_MCP_DAEMON=1Using the Compose file instead? Add these lines under
environment:, then rundocker compose up -d:docker-compose.yml, under environment:HTTPS_HEADER: "on" ENABLE_MCP_DAEMON: "1" ENABLE_SYSTEM_MCP_DAEMON: "1"When the container is up (give it a minute), run this once. Repeat it whenever you re-create the container:
Let the MCP engine reach DreamFactory inside the containerdocker exec dreamfactory-trial sh -c 'echo MCP_INTERNAL_BASE_URL=http://127.0.0.1 >> /opt/dreamfactory/.env && php /opt/dreamfactory/artisan config:clear'
What these do:
HTTPS_HEADER=onmakes DreamFactory publishhttps://sign-in and token links to AI clients. TheENABLE_*flags start the MCP engine.MCP_INTERNAL_BASE_URLlets that engine reach DreamFactory inside the container. WithHTTPS_HEADER=on, connect AI clients through the HTTPS address, notlocalhost.Opening the admin app after this step: use your HTTPS address (from option A or B), or
http://localhost:8080/. Plaindreamfactory/ dist/ http://localhost:8080now redirects tohttps://localhostand will not load. You need the admin app to create the MCP service and to change the admin password. -
Quickest, no domain needed: Cloudflare quick tunnel
Good for trying things out. No account and no open ports needed.
Start the tunneldocker run --rm --network container:dreamfactory-trial cloudflare/cloudflared:2026.9.3 tunnel --no-autoupdate --url http://localhost:80
Copy the
https://<random-words>.trycloudflare.comaddress it prints and open it in your browser. Ctrl+C stops the tunnel. You get a new address each time you start it, and quick tunnels are for testing only (no uptime guarantee). For a permanent address, use option B or a named Cloudflare Tunnel.Restarted or re-created
dreamfactory-trial? Restart the tunnel too (Ctrl+C, then the same command): it stops serving when the trial container goes away, even though it still looks "Up". You get a new address, so update it in your AI client. -
Your own domain with automatic certificates: Caddy
You need a DNS name (for example
mcp.example.com) pointing at this machine's public IP, with ports 80 and 443 reachable from the internet. Caddy gets and renews a free Let's Encrypt certificate automatically.Create a file named
Caddyfilein the folder you run Docker from (replace the domain):Caddyfilemcp.example.com { reverse_proxy dreamfactory-trial:80 }Compose users: add this service under
services:, addcaddy-data:under the top-levelvolumes:(next to the existing volume entry), then rundocker compose up -d:docker-compose.yml, under services:caddy: image: caddy:2.11.4 restart: unless-stopped ports: ["80:80", "443:443"] volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/datadocker run users:
Shared network + Caddydocker network create dfnet docker network connect dfnet dreamfactory-trial docker run -d --name caddy --restart unless-stopped --network dfnet -p 80:80 -p 443:443 -v "$PWD/Caddyfile:/etc/caddy/Caddyfile:ro" -v caddy-data:/data caddy:2.11.4
Open
https://mcp.example.com. After re-creatingdreamfactory-trial, connect it todfnetagain (docker network connect dfnet dreamfactory-trial). -
Other ways (step 1 still applies)
- ngrok:
ngrok http 8080gives anhttps://….ngrok-free.appaddress (a free static domain is available). - Tailscale Funnel:
tailscale funnel 8080publishes the trial on yourhttps://<machine>.<tailnet>.ts.netname. - Existing nginx, Traefik or load balancer: proxy HTTPS to port 8080 and pass the
HostandX-Forwarded-Protoheaders. With nginx, also setproxy_buffering offfor/mcp/.
- ngrok:
Check that it worked
curl -s https://YOUR-HOST/.well-known/oauth-authorization-server/mcp/YOUR-SERVICE
On Windows PowerShell, type curl.exe instead of curl (in Windows PowerShell 5.1, curl is a different command).
Every URL in the answer (issuer, authorization_endpoint, token_endpoint) must start with https://. Then add https://YOUR-HOST/mcp/YOUR-SERVICE as a remote or custom MCP connector in your AI client; it opens the DreamFactory sign-in page.
| Symptom | Fix |
|---|---|
The URLs above start with http:// | HTTPS_HEADER=on is missing. Re-create the container (a plain restart is not enough). |
503 MCP daemon is not reachable | ENABLE_MCP_DAEMON=1 is missing (System API MCP: ENABLE_SYSTEM_MCP_DAEMON=1). |
Tools connect but every call says fetch failed | Run the MCP_INTERNAL_BASE_URL command from step 1 again. |
Security checklist
- Anything you expose is public on the internet. Change the admin password (your profile in the admin app) before you start a tunnel or proxy, and keep the new one somewhere safe: password reset emails are not available in the trial instance.
- Give AI clients least privilege: a role that can reach only the services and tables they need, Require Role Access on for the MCP service, and API keys tied to limited roles, never an admin account.
- Turn off Allow writes on the MCP service if the AI only needs to read.
- Stop quick tunnels (Ctrl+C) when you're done. If you remove the proxy, re-create the container without
HTTPS_HEADER=on.