Ubuntu Chronicles
NGINX Shenanigans
I will be exposing my self hosted repo soon that will contain some ansible scripts and stuff I used to build out my environment without any guesswork. Also will be the repo I am using to build my flux+K8s cluster that is to be my debut into full fledged gitops. I will share ALL of my nginx configs etc from there as well when we get to that point. Sorry guys its a trickle getting back up and going.
Most recent updates: 02/01/2025 09:04:32 UTC
Generate SSL Certs the caveman way with simple Terminal Commands.
Installing certbot if needed:
sudo apt-get install python3-certbot-dns-cloudflare
Store the cloudflare api token key:
mkdir /some/path/to/the
sudo chmod 0700 /some/path/to/the
sudo chmod 0400 /some/path/to/the/api_access_secret.ini
sudo nano /some/path/to/the/api_access_secret.ini
The contents of the api_access_secret.ini
should be:
dns_cloudflare_api_token = <yourtopsecretcloudflareapitoken>
Pulling wildcard certs for a domain:
sudo certbot -v certonly --dns-cloudflare --dns-cloudflare-credentials /some/path/to/the/api_access_secret.ini -d 'prplanit.com' -d '*.prplanit.com'
Return Public IP with curl, one-liner:
curl ifconfig.me
SAMBA/CIFS
Malformed Interfaces Issue
This issue was originally introduced to Ubuntu via a kernel update as such it is related to a kernel issue.
Solutions I found for this issue involve kernel patching/updating or changing the cifs settings. I recommend the latter, as changing the kernel is a more invasive solution that may result in new issues (see below).
Install a hwe kernel (not currently recommended):
Warning: using this solution broke nvidia-smi in a host with most of its workload being GPU accelerated docker/docker-compose. Updating the kernel may cause other issues but it did resolve this issue without changing the cifs settings and I am certain that the issue can be resolved with a kernel patch but I don't remember what method I used previously.
apt-get install linux-generic-hwe-22.04
Replace the (22.04) with your distro. I do not anticipate you should be here if you are running 24.04. My testing is with Ubuntu 22.04.
CIFS Settings (Recommended):
Without installing a different kernel or patch, the issue is resolved by adding the ,vers=2.1 option in the fstab mount or docker-compose cifs mount. We are not going to investigate the differences between cifs 3 vs 2.1 for the scope of this issue. Do research further if this will be a concern.
Examples:
volumes:
plex_config:
driver: local
driver_opts:
type: cifs
o: "iocharset=utf8,username=<username>,password=<somepass>,vers=2.1,rw,uid=<changethistotheproperuid>,file_mode=0777,dir_mode=0777"
device: "//192.168.1.1/<sharename>"
//192.168.1.1/<sharename> /mnt/path cifs username=<username>,password=<password>,uid=1000,gid=www-data,file_mode=0777,dir_mode=0777,noperm,vers=2.1 0 0
If you discover a more viable solution please feel free to reach out by any method available and I will update this information.
This page is redirected to from a shortlink. That short link was originally created before a disaster event in which all non-critical application data that did not reside on our NAS was lost without backups. At this time we did lose our original public facing documentation. I am working on restoring the state of the documentation but I wanted to leave a note to clarify why the state of this link might seem less than what would be expected. Please keep backups and test them to make sure they work ~ Computers 101 <3