[0] https://www.torproject.org/docs/tor-doc-relay.html.en
[1] https://www.torproject.org/docs/tor-relay-debian.html.en
For exit nodes, the issue of legal liability for routing other's traffic is less clear. You'd basically run the same risks as providing an open wireless network: https://openwireless.org/myths-legal
It is rare that an exit node is raided but there has been no known occurrence in which a normal relay was raided.. nor would it make any sense for there to be. Many people run non-exit relays as they are uncomfortable with the risk of exiting for the Tor network, perhaps you should be one of them.