Lets say you have to sign transactions / messages real-time. It seems I must store the private key in the server. What if the address stores millions of dollars of value? Is simple LEMP server enough with storing private key in .env file?
Data in .env files is not encrypted. I suggest using some other means which provides encrypted format.
But unless you have some obvious bugs in your code which handle the private key it shouldn't leak that way. Then the question is how secure is your server and that's a topic which belongs to some other forum, but there are many aspects which affect that security.