In RSA encryption, the public key is generated by the server and made available to anyone who wishes to communicate with it.
The public key is used to encrypt messages that are sent to the server, while the private key (which is kept secret by the server) is used to decrypt those messages. The public key is typically made available through a public directory or a key distribution center, and it is not known only by the server or the user's computer.