Any good alternatives to Jira, locally hosted without a huge licence cost?
Redmine, maybe? With or without Redmine X.
Honestly the best issue tracker I've used so far is Phabricator (now Phorge). It would be a bit weird to use it just for issues though, and tbh I'm not sure I would recommend it as a forge because it has approximately no CI support.
https://www.openproject.org/blog/open-source-jira-alternativ...
I haven‘t used it myself, though