# Libre-Chip server setup scripts ## Testing Locally * Using `libvirt` (you can use the `virt-manager` gui frontend), create a VM with 6GB RAM and 4 CPUs and at least 30GB of disk space running Debian 12 with a btrfs root filesystem. The VM should be named `libre-chip.test`. Do *NOT* create a non-root user yet, that comes later. * Install some packages in the VM: ``` apt install openssh-server sudo ``` * Copy your ssh public key from your user on the host (e.g. `~/.ssh/id_rsa.pub`) and put it in the VM's `/root/.ssh/authorized_keys` and make sure both that file and the parent `.ssh` directory have been chmod-ed to `600`. * Get the IPv4 address of the VM: ``` ip addr ``` * Add the following lines to your *host's* `/etc/hosts`: ``` pebble libre-chip.test librechip.test mail.libre-chip.test mail.librechip.test git.libre-chip.test git.librechip.test forum.libre-chip.test forum.librechip.test ``` * (Optional) Create a non-root user with UID 1001, being careful to not use UID 1000 or GID 1000: ``` adduser --uid 1001 your-user-name adduser your-user-name sudo ``` * logout from the VM but leave it running. Create a snapshot of the VM while its running but no users are logged in, and name the snapshot `start`. Now you're ready to test! Just run `./test-in-vm.sh` on the host, it will automatically reset the VM and login over ssh and run the setup script. ## Installing on the public server ***Not Tested Yet!*** Make sure the VM has no users with UID 1000, and that the VM has a btrfs root filesystem. Run the setup script on the VM: ``` sudo ./setup.sh --production ```