Tailscale SSL certs in Proxmox Backup server

macindy

New Member
Aug 7, 2024
2
0
1
Hi there!

I just put this in my /etc/cron.weekly

Code:
#!/bin/bash
DIR="/etc/ssl/private"
NAME="$(tailscale status --json | jq '.Self.DNSName | .[:-1]' -r)"


tailscale cert --cert-file="${DIR}/${NAME}.crt" --key-file="${DIR}/${NAME}.key" "${NAME}"


# for PVE
#pvenode cert set "${DIR}/${NAME}.crt" "${DIR}/${NAME}.key" --force --restart


# for PBS
cp ${DIR}/${NAME}.crt /etc/proxmox-backup/proxy.pem
cp ${DIR}/${NAME}.key /etc/proxmox-backup/proxy.key
chmod 640 /etc/proxmox-backup/proxy.key /etc/proxmox-backup/proxy.pem
chgrp backup /etc/proxmox-backup/proxy.key /etc/proxmox-backup/proxy.pem
systemctl reload proxmox-backup-proxy.service

Is there a more simple way?
Perhaps something like pvenode for PBS?

Thanks!
 

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!