Running Kibana behind a reverse proxy under a subpath such as /kibana keeps the web UI and APIs on a predictable client-facing URL without dedicating a separate host name or external port. A correct base path prevents broken navigation, missing static assets, and API calls that accidentally land on the proxy root instead of the Kibana route.
Kibana builds links and route handlers from server.basePath, while server.rewriteBasePath decides whether Kibana strips that prefix from incoming requests or expects the reverse proxy to remove it first. When absolute links are needed for notifications, redirects, or integrations, server.publicBaseUrl is configured separately and must include the same prefix.
The base path must start with / and cannot end with a trailing slash. Configuration changes require a Kibana restart, and a mismatch between the proxy rewrite behavior, server.rewriteBasePath, and any configured server.publicBaseUrl can leave the UI reachable only on some paths or cause startup validation failures.
server.basePath must start with / and must not end with /.
Set server.rewriteBasePath to true when requests arrive at Kibana with the prefix still present, or keep it at false when the reverse proxy strips the prefix before forwarding. Set the option explicitly so startup behavior matches the proxy configuration.
$ sudoedit /etc/kibana/kibana.yml
Container images commonly use /usr/share/kibana/config/kibana.yml instead of /etc/kibana/kibana.yml.
server.basePath: "/kibana" server.rewriteBasePath: true
Set server.publicBaseUrl separately when Kibana must generate absolute external links, and include the same /kibana prefix when it is configured. Related: How to set the Kibana public base URL
$ sudo systemctl restart kibana
$ curl --silent http://kibana.example.net/kibana/api/status | jq '{name, version: .version.number, overall: .status.overall.level}'
{
"name": "kibana-node",
"version": "9.3.1",
"overall": "available"
}
An HTTP 200 response from /kibana/api/status confirms the base path is being routed correctly. Add authentication, TLS, or a trusted CA option when the client-facing URL requires them. Related: How to check Kibana status
$ curl --silent --output /dev/null --write-out "%{http_code}\n" http://kibana.example.net/kibana/api/status
200
$ curl --silent --output /dev/null --write-out "%{http_code}\n" http://kibana.example.net/api/status
404
A 200 on the prefixed path and 404 on the unprefixed path confirms the base path is active on the client-facing route.