TwentyT
Twenty2mo ago
9 replies
Marco Morozzi

Support for Subpath Hosting (Reverse Proxy under a subdirectory)

I am attempting to integrate Twenty CRM into a custom multi-tenant infrastructure where creating unique subdomains for every instance is not feasible due to cost and management complexity.

I need to host Twenty CRM behind a reverse proxy using a subpath structure.
- Current: The app expects to be at https://crm.mydomain.xx/
- Required: The app needs to load at https://mydomain.xx/customerA/env/crm

Current Behavior When configuring the reverse proxy to serve Twenty on a subpath, the application fails to load correctly.
1. The frontend application appears to use hardcoded navigation and asset loading using absolute paths from the root (e.g., /index.html or /_next/...).
2. It ignores the Server URL configuration regarding the path prefix.
3. Attempting to inject prefixes into index.html fails because the Next.js runtime dynamically loads content using absolute paths.

I would expect the application to respond to a base path that also include a subdirectory like /path/to/root.


Willingness to contribute: I am available to work on a Pull Request to implement this flexibility, but I need guidance on whether this fits the current roadmap or if there are specific configuration files I should target first.
Was this page helpful?