I need a little clarification on how hidden services work. So from my understanding a request to a hidden service goes like: request -> Tor -> server (running on localhost). Then the response is: server -> Tor -> response. Now is the data traveling from Tor to the server on localhost in plaintext? If so, wouldn't this mean that any other user on the hidden services LAN be able to read this information and know that they are running a hidden service? Am I correct in thinking this or do I have it all wrong?
A hidden service does not necessarily have to run (listen) on the same host as the Tor relay that serves it. If the HS does run on the same host as the relay, then the traffic between Tor and the HS does not have to hit the LAN. If the HS then only accepts connections from localhost, the only 2 ways to connect to it are via Tor (.onion address) or directly from the host that runs both the relay and the HS.
Even if they're not on the same machine, it depends on the LAN (switch, firewall, ..) whether other users can detect the HS.
Obviously, if someone have access to the relay or the HS host (which can be the same) then they can find out about the HS.
And yes, traffic from the relay to the HS is plaintext. Or rather: as plain as the service itself. If the HS uses an encrypted protocol, traffic doesn't get decrypted until it hits the HS.