Stack Overflow is not available as a self-hosted solution but there are plenty of alternatives for power users and business that want to host a solution on-premise. The best open source Self-Hosted alternative is Codidact. If that doesn't suit you, our users have ranked more than 25 alternatives to Stack Overflow and 11 are open source and available as a self-hosted solution so hopefully you can find a suitable replacement. Other interesting open source Self-Hosted alternatives to Stack Overflow are Scoold, Question2Answer, Apache Answer and AnonymousOverflow.
Other than Quora, it's like the only one on this list that actually plays the same role Stack Overflow plays. It's a reputation-based question and answer site (or collection of sites/communities) organized around a central topic