Hey i’m planning to selfhost for the first time multiples services like vaultwarden on a VPS and i need to know a lot of things to start.
I’m not a big fan of VPS, but it is a good start.
Can my VPS provider see the content in my vaultwarden ?
Depends on the content, but most senstive content like passwords, master-password, saved notes etc. He can’t see it.
But he can see your logs, e-mail addresses and so on.
Can my VPS provider see which domain i’m using to host theses services ? Let’s say i selfhost searxng on “x.com” domain can my vps provider see i’m using this domain ?
If you do not make some more advanced setup, yes.
How to secure my VPS server ?
This is a broad question ….
- Use secure SSH keys like ECDSA with a passphrase
- create a new admin account called “ad{yourname}” for example and give him sudo permission
- Disable the root account
- Use a ZTN like Netbird, Twingate or Tailscale to access your resources.
- Use a firewall like UFW to block all non-public and sensitive ports
- Use crowdsec
- Try to harden your distro (I would recommand Almalinux for it)
- Use docker to install software and never install it directly on the machine
- harden your docker containers
- and many more things
Like how do i protect myself from DDos attack,
You can’t.
DDoS attacks are a very primitive form of attack where the stronger one wins.
If the attacker has more bandwidth, he wins. If you have more bandwidth, you win.
There are three people who can protect you from a DDoS attack:
- Your hosting provider
- The ISP of your hosting provider
- A Anti-DDoS reverse Proxy hoster like Cloudflare or Bunny.net
Hack, malware?
As long as you do not install weird shit, always use docker containers and use offical repos, malware is pretty rare.
To prevent a hack, follow rules from hardening your server.
Do people encrypt the hard drive in their vps ?
This is possible and I do so, but a bit more advanced.
If you look for any easy tutorial Hetzner but a guide online how you can use FDE with a passphrase on a server you do not have hardware access.