Pi-hole LXC with gravity-sync?

I am running into one issue and that is it keeps asking for a password for the user gravity.
I looked around and quite some people have issues like this, but I have no idea what the exact config settings are that are required.
You should only need to provide that password once when doing the initial configuration of gravity-sync. After that gravity-sync should install public private keys and then those should be used instead of password authentification.

Did you set up sudo so gravity-sync is allowed to get root privileges?
 
Last edited:
You should only need to provide that password once when doing the initial configuration of gravity-sync. After that gravity-sync should install public private keys and then those should be used instead of password authentification.

You have set up sudo so gravity-sync is allowed to get root privileges?
I got it working!

I created a new ssh keypair with ed25519 and copied those with ssh-copy-id and then it worked, I would guess the default ssh-rsa isn't supported anymore?
 
Some old unsecure algorithms got banned from sshd on Debian 12 that were working fine on Debian 11 before.
But for the ssh connection to sync the piholes you shouldn't need to roll out your own keys. The gravity-sync setup should create and rollout my new key pair and that was working fine here with the Debian 12 LXC.

The problem I initially ran into was that the gravity-sync setup wasn't asking for a password in the first place, because the first thing I do when setting up a new LXC is to roll out my ed25519 keys and forbid sshd to use password authentification. Thats why I did that in the tutorial only after setting up gravity-sync. So the order you follow the tutorial is important here.

So for gravity-sync to be able to roll out its own keys you need those LXCs ssh server to either allow password authentification or set up your own public private keys first for that gravity user.
 
Logging in with username/password worked perfectly and I didn’t make any of your suggested changes.
I tried both Debian 11 and 12 as OS.

I installed through tteck helper scripts and added the gravity user right after, did the sudo change, logged in through username/password and installed gravity-sync.
It kept asking for a password, after some searching and troubleshooting I tried my own keys and that worked right away.

I used gravity-sync a few years ago on physical RPi’s and that worked well, so when switching from k3s to proxmox I wanted to use it again.

Thanks for the writeup, apart from this ssh key issue, it was nice to have a guide :)
 
  • Like
Reactions: Dunuin

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!