My notes for Arch on Proxmox
Consolidating a few notes for easy reference for myself, and thought why not make them public. 🙂
First ensure you're using the latest Arch image from Templates in Proxmox.
Then in the console:
pacman-key --init
pacman-key --populate archlinux
Next we can either then run pacman -Syu --disable-sandbox but because we're in an lxc running as root and CBF running the extra flag each time, lets just disable the downloading sandbox by editing /etc/pacman.conf and uncommenting the DisableSandbox lines.
Then we need ssh so we can shell in rather than using the proxmox web console.
pacman -S openssh
systemctl enable sshd
systemctl start sshd
Fish Shell
To install fish then set as default shell.
pacman -S fish
chsh -s "$(command -v fish)"
Upon relogging, it will now be your default shell on login.
Adding a User
Subsitute <username> for whatever username you want to use, in case that isn't clear. Yes I do all this manually, because I am a noob. Bite me.
pacman -S sudo
useradd <username>
passwd <username>
usermod -aG wheel <username>
mkdir /home/<username>
chown <username>:<username> /home/<username>
Then running visudo we enable the wheel group by uncommenting the appropriate wheel line to give us administrator rights with a password. There is another line for it without a password, but lets just use the password one hmmm?
If you initially set up the CT with an ssh key and want to copy it over to the user:
mkdir /home/<username>/.ssh
cp .ssh/authorized_keys /home/<username>/.ssh/
chown -R <username>:<username> /home/<username>
No more password required to log in as the user, it iwll use the ssh key now. You can then look for a guide and disable root ssh login etc if you want. It's probably a good idea, along with disabling password login full stop.
Yay
Note that running makepkg requires a user not root, so create a user and install sudo first.
Then logged in as the user:
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
To verify you can run yay --version I guess. Can delete the git folder, yay will update itself from now on.
rm -r yay
Sources:
- ketanvijayvargiya.com
- landlock is not supported by the kernel!
- ITSFOSS: Install and Use Yay on Arch Linux
This was all brought on by the library that Slidge-Whatsapp uses rolling through Go versions or some such, and Debian being stable makes it hard. Or something. Anyway, if you start seeing posts about such things, you'll know I regret this decision down the road 😅