depends on the jurisdiction
in the us, entirely legal. you may get law enforcement knocking on your door with questions, from time to time.
best to do it as part of a non profit or other organization, and being open about running a node, so that law enforcement/etc knows what they're dealing with
> best to do it as part of a non profit or other organization
I've always thought that universities would be a great safe haven for exit nodes, probably managed by a student club but using campus's infra (with their fully informed permission and support, of course).
I think this would make them less likely to be shut down by the police because a university would lend them more credibility as a civic-driven research project rather than some random person running "shady" stuff, as most people unfortunately assume.
Here in Mexico there's very few Tor nodes running at all, but some of the longest running (non exit, TIL) nodes are run by UNAM [1], which is the biggest university.
That being said, I studied in a different university and I didn't have the confidence or knowledge to propose anything similar, so I've no idea of how effective would such a project be or how hard would it be to run.
[1] https://metrics.torproject.org/rs.html#search/country:mx
> you may get law enforcement knocking on your door with questions
If you host an exit node on your home internet connection, the daily thing you will struggle with is not law enforcement, but rather the fact that your public IP will be blocked by most big websites to the point that simply browsing the web will become a pain.