Set subpath in Metabase

My Metabase instance is served on
https://example.com/metabase, however Metabase believes it is being served at https://example.com, causing its requests to fail.

How can I configure Metabase to use the path prefix I set my load balancer to use?

1 Like

Try setting Admin > Settings > General > Site URL to https://example.com/metabase
(or set the MB_SITE_URL env var)

There’s a good example of configuring nginx and Metabase to do this using Docker on this issue. Note the initial nginx.conf needed a trailing slash.

This doesn’t seem like the issue I’m experiencing. When I visit https://example.com/metabase it loads the page, however Metabase believes that it should load its CSS, JS, and other assets from https://example.com/asset.js instead of https://example.com/metabase/asset.js.

Setting the MB_SITE_URL environment variable to https://example.com/metabase had no effect, and I am still unable to create the first admin user from the setup page.