How to share or reuse secrete key in two or more java servers

Hi, I am generating key like below
public static final Key key = Keys.secretKeyFor(SignatureAlgorithm.HS256);

each time when I am running java application, a new key is generated . and doing authorization based on that. this is working fine, but we have one problem, we have totally 3 backend servers and one reactjs front end server for our application. If I generate Token in one server I could not reuse the same in other servers. I need you to support to understand better this one and how can i build a common token validation mechanism to validate all incoming API requests in all 3 servers.

Why not use RS256, it’s recommended over HS256?

Yep can you let us know our concerns @mallikarjuna023?