I've been using Amazon Web Services to run my Java application. However, due to high costs I'm looking into getting a dedicated server from Hetzner, a company based in Germany, which costs about 10-20x less than AWS.
However, after reading this question and seeing the following statement by @Daniel Rudy:
The problem with physical security is this:
If the attacker has physical access to the machine, then there is no security.
I'm concerned that anyone with physical access to my server could steal my data/application.
If I understand correctly, encryption will only help while the device is powered off but will do nothing to protect PC while running (since program will not run unless it is decrypted). I cannot encrypt the Java Jar since it will be running from Eclipse IDE (for debugging purposes) and needs to be visible in editor. Thus, anyone with physical access to the remote server (employees, technicians etc) could steal my data by sticking a USB device into the computer and downloading all my data / application (correct?). Moreover, there would be no way for me to detect that something like this ever happened.
In other words, unless I have complete trust in the people who run the company to secure physical access to my server there's absolutely nothing for me to do to protect my data. If the server is located in a foreign country (as Hetzner is) I would also need to trust the government of that country not to breach my data (as they can easily overpower any physcial barriers enacted by Hetzner). And if someone did steal my data I would never find out.
Are my assumption correct or is there something I could do on my end to protect myself?