add quasselcore-on-debian-11

This commit is contained in:
Trent Palmer 2022-02-13 01:33:59 -08:00
parent 3d7377813c
commit 7de635c689
2 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,81 @@
---
title: "QuasselCore on Debian 11"
date: 2022-02-13
draft: false
tags: ["linux", "kvm", "libvirt", "virsh", "irc", "quassel", "zfs", "debian"]
authors: ["trent"]
post: 33
---
date: 2022-02-13
## Introduction
After discovering how amazing wireguard vpn is on Android, I decided to move
my quasselcore server off of Ramnode, where I was securing it with LetsEncrypt
Certs, and instead run it on a double-natted kvm host on my home server
where I could give it more ram and cpu, and back up the entire vm image to my backup-backup server
using syncoid and zfs snapshots.
But there are a few little niggles, so I am writing it down.
## Install Packages
```shell
apt install postgresql postgresql-contrib quasselcore libqt5sql5-psql apparmor-utils
```
### stop quasselcore
```shell
systemctl stop quasselcore
```
### allow quasselcore in apparmor
so quasselcore user can read it's own configuration directory
```shell
aa-complain /usr/bin/quasselcore
systemctl restart apparmor
```
### postgresql socket connection
If you want to use Postgresql socket connection because
why wouldn't you, allow md5 authentication in `pg_hba.conf`
```conf
# /etc/postgresql/13/main/pg_hba.conf
local quassel quassel md5
```
```shell
systemctl restart postgresql
```
## Copy the Postgresql Database
### dump database on old/previous server
```shell
pg_dump -d quassel -f quasseldb.sql
```
### create database on new server
```psql
postgres# CREATE USER quassel;
postgres# \password quassel
postgres# CREATE DATABASE quassel WITH OWNER quassel;
```
### import database on new server
```shell
psql -d quassel -f quasseldb.sql
```
## Configure QuasselCore
```shell
sudo quasselcore --configdir=/var/lib/quassel --select-backend=Postgresql
```
When prompted for postgresql host, you can use `/var/run/postgresql` if
you want to use unix-socket.
Before starting quasselcore, make sure that all the files in `/var/lib/quassel`
are owned by quasselcore:quassel, and _they might not be_.
For other `quasselcore` options you can type `quasselcore -h`, but I chose to
use ufw to restrict the client port to the wireguard interface.
```shell
ufw allow in on wg1 to any port 4242
```
## Connect
To connect to your new `quasselcore`, open quassel client or quasseldroid
and simply change the host name.

View File

@ -24,6 +24,7 @@ markdown_extensions:
nav:
- Home:
- Home: index.md
- "QuasselCore on Debian 11": posts/quasselcore-on-debian-11.md
- "Forklift Upgrade Arch Linux To A Dell Precision 3561": posts/forklift-upgrade-arch-linux-precision-3561.md
- "Ansible KVM Router Lab Part 6": posts/ansible-kvm-router-lab-part-6.md
- "Ansible KVM Router Lab Part 5": posts/ansible-kvm-router-lab-part-5.md
@ -70,6 +71,7 @@ nav:
- FreeCodeCampChallenges: https://trentspalmer.github.io/fcc-challenges/
- DeviceLayout: https://trentpalmer.work/6a57bbe24d8244289610bf57533d6c6f/
- Posts:
- "QuasselCore on Debian 11": posts/quasselcore-on-debian-11.md
- "Forklift Upgrade Arch Linux To A Dell Precision 3561": posts/forklift-upgrade-arch-linux-precision-3561.md
- "Ansible KVM Router Lab Part 6": posts/ansible-kvm-router-lab-part-6.md
- "Ansible KVM Router Lab Part 5": posts/ansible-kvm-router-lab-part-5.md