LIST

Homeserver fails to boot after power outage

(Initramfs): /dev/sda2 contains a file system with errors, check forced. Inodes that were a part of a corrupted orphan linked lost found. /dev/sda2 : UNEXPECTED INCONSISTENCY; RUN fsck manually.(I.e ., without -a or -p options). fsck exited with status code 4. The root filesystem on /dev/sda1 requires a manual fsck solution fsck -yf /dev/sda2 Src: https://askubuntu.com/questions/885062/root-file-system-requires-manual-fsck#885066

March 3, 2025

gitea on homeserver

app service deployment db secret db config disable registration DISABLE_REGISTRATION db service deployment secret 1password config backup cron nginx http ssh -> failed could https://stackoverflow.com/questions/71789156/how-to-redirect-ssh-requests-in-nginx sudo mkdir -p /opt/gitea/tmp /data/gitea/gitea /opt/gitea/db-data /data/backups/gitea sudo chown tjen:tjen -R /opt/gitea /data/gitea /data/backups/gitea sudo find /opt/gitea -type d -exec sudo chmod 755 {} + sudo find /data/gitea -type d -exec sudo chmod 755 {} + sudo find /data/backups/gitea -type d -exec sudo chmod 755 {} + tree /{data,opt,data/backups}/gitea gitea ssh failure port forward straight to gitea 2224:22 worked port forward to nginx 2224:224 did not work (where nginx was stream{} configured to pass to gitea:22) for some reason, nmap on homeserver also did not show port 2224 open (earlier it did show 2222 open, when I was trying with that port…)

January 1, 2025

analyze & fix coredns issue network

logs from nginx show [emerg] host not found in upstream plex in /etc/nginx/conf.d/ssl.conf others also show unable to find ip for service names reboot all failed kube-system stuff kgp -n kube-system kdelp ... troubleshoot dns stuff src: https://forums.rancher.com/t/k3s-dns-resolution-failure/39091 kubectl run -it --rm --restart=Never busybox --image=busybox:1.28 -- nslookup kubernetes.default for p in $(kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o name); do kubectl logs --namespace=kube-system $p; done fix coredns by rebooting it so coredns is having issues let’s reboot it...

October 16, 2024

Homeserver logging options

I like Grafana/Loki/promtail etc. it just fits because i already use Grafana anyway for metrics/graphs and such. Datalust Seq is also nice, as well as Parseable/logstash/Grafana as a combo. Graylog can do a lot but its too bloated and too hungry for my taste (damn elasticsearch). Src: https://www.reddit.com/r/selfhosted/comments/17velmx/best_platform_for_selfhosted_logs/ Install grafana Install loki Install promtail on each node Configure Grafana Data Sources & Dashboard https://akyriako.medium.com/kubernetes-logging-with-grafana-loki-promtail-in-under-10-minutes-d2847d526f9e Promtail sidecar https://medium.com/@t-velmachos/deploy-promtail-as-a-sidecar-to-you-main-app-6182fa27db65 Promtail setups...

September 7, 2024

homeserver 1password kubernetes operator

install 1password connect server https://developer.1password.com/docs/connect/get-started/?deploy=kubernetes&method=1password-com#manual-step-2-deploy-1password-connect-server Step 1: Create a Secrets Automation workflow https://my.1password.eu/developer-tools/directory create a connect server save 1password-credentials.json save connect token (skip) Step 2: Deploy 1Password Connect Server skip in favour of installing together with operator helm repo add 1password https://1password.github.io/connect-helm-charts/ helm install connect 1password/connect --set-file connect.credentials=1password-credentials.json Kubernetes Operator https://developer.1password.com/docs/k8s/k8s-operator/?deployment-type=helm helm repo add 1password https://1password.github.io/connect-helm-charts/ helm install connect 1password/connect --set-file connect.credentials=1password-credentials.json --set operator.create=true --set operator.token.value=OP_CONNECT_TOKEN usage 1password: vaults/pet....

September 6, 2024

copy google photos to nextcloud

copy to nextcloud rclone copy --progress ~/Downloads/google-photos-takeout/Takeout/Google\ Photos home:/data/nextcloud/sdfueneb/files/InstantUpload/google-photos-takeout --exclude ".DS_Store" --exclude "*.json"

September 5, 2024

create homeserver folders for nextcloud-db

sudo mkdir -p /opt/nextcloud-db/db-data /data/backups/nextcloud-db && sudo chown tjen:tjen -R /opt/nextcloud-db/db-data /data/backups/nextcloud-db && sudo find /opt/nextcloud-db -type d -exec sudo chmod 755 {} + && sudo find /data/backups/nextcloud-db -type d -exec sudo chmod 755 {} +

September 5, 2024

nextcloud add postgres db

minimal docker compose https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/postgres/apache/docker-compose.yml # docker-compose.yml version: '3' services: db: image: postgres:alpine restart: always volumes: - db:/var/lib/postgresql/data:Z env_file: - db.env redis: image: redis:alpine restart: always app: image: nextcloud:apache restart: always ports: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z environment: - POSTGRES_HOST=db - REDIS_HOST=redis env_file: - db.env depends_on: - db - redis cron: image: nextcloud:apache restart: always volumes: - nextcloud:/var/www/html:z entrypoint: /cron.sh depends_on: - db - redis volumes: db: nextcloud: # db.env POSTGRES_PASSWORD= POSTGRES_DB=nextcloud POSTGRES_USER=nextcloud sqlite -> postgres official guide https://muetsch....

September 5, 2024

plex migrate database from sqlite to postgres

create manual backup shutdown kgp | grep plex kubectl exec --stdin --tty plex-7c7678c96d-btc28 -- /bin/bash ps aufx output: root@plex-7c7678c96d-btc28:/# ps aufx USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 6305 0.0 0.0 7740 4224 pts/0 Ss 10:42 0:00 /bin/bash root 6345 0.0 0.0 10888 4224 pts/0 R+ 10:59 0:00 \_ ps aufx root 1 0.0 0.0 440 0 ? Ss Aug31 0:00 /package/admin/s6/command/s6-svscan -d4 root 16 0....

September 5, 2024

plex repair database 'database disk image is malformed'

kgp kubectl exec --stdin --tty plex-7c7678c96d-btc28 -- /bin/bash cd '/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases' ls /usr/lib/plexmediaserver/ '/usr/lib/plexmediaserver/Plex SQLite' com.plexapp.plugins.library.db (src: https://support.plex.tv/articles/repair-a-corrupted-database/) yeah, keep getting error database disk image is malformed src: https://www.reddit.com/r/PleX/comments/15uhckv/database_disk_image_is_malformed_how_to_repair/ -> https://github.com/ChuckPa/PlexDBRepair/blob/master/DBRepair.sh no vi / vim on docker image so doing it the cat way cat > DBRepair.sh <paste code> <ctrl-d> chmod +x DBRepair.sh ./DBRepair.sh I chose automatic afterwards, the integrity check was ok '/usr/lib/plexmediaserver/Plex SQLite' com.plexapp.plugins.library.db SQLite version 3....

September 5, 2024