80 and 443. If your provider manages the proxy and certificates, apply the same URL settings through its controls.
Before you start
- Complete the Docker or source installation.
- Point DNS records for
charts.example.comandcharts-api.example.comto the server. Replace these names throughout this guide. - Allow incoming HTTP and HTTPS traffic on ports
80and443. Keep application, database, and Redis ports private.
CB_API_HOST=127.0.0.1 and CB_API_PORT=4019. Inside Docker, keep CB_API_HOST=0.0.0.0 and bind the published ports to the host’s loopback address.
Configure your web server
- Apache
- Nginx
- Caddy
Use Apache 2.4.47 or later for WebSocket upgrades through Save this configuration as The Socket.IO rule must precede the general API rule. See Apache’s WebSocket upgrade support.Enable the site and check the configuration before reloading:Enable HTTP-to-HTTPS redirects. Check that the resulting HTTPS virtual hosts retain the client, API, and Socket.IO proxy rules.
mod_proxy_http.Install and configure Apache
On Ubuntu, install Apache and enable the proxy modules:/etc/apache2/sites-available/chartbrew.conf:Enable HTTPS
Follow the Certbot instructions for Apache and your operating system. Once Certbot is installed, request certificates for both hostnames:Apply URL changes
Rebuild the client and restart the API if you changed the public URLs. For Docker, recreate the application container as described in the Docker guide.Check the public URLs
Open the client through HTTPS and sign in. Refresh a chart and check that the browser calls the HTTPS API URL. Test a public report and an embedded chart.
If your proxy adds a header that blocks embedding, change that rule only for the report or chart routes you intend to embed. Do not remove frame protection from the entire application. Also check the Chartbrew sharing policy and token used by the embed.