@bernatixer have a look at:

Deploy NodeBB in a subfolder of a site https://community.nodebb.org/post/43630

Hope it helps.