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 free Self-Hosted alternative is Codidact, which is also Open Source. If that doesn't suit you, our users have ranked more than 25 alternatives to Stack Overflow and 11 are free and available as a self-hosted solution so hopefully you can find a suitable replacement. Other interesting free 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