Skip to content

Instantly share code, notes, and snippets.

Upgrading Fedora in WSL (Windows Subsystem for Linux)

This is a tried and tested method for upgrading Fedora to a newer version within WSL.

Replace 43 and 44 with your current version and the target version respectively.


Step 1: Update current system (inside Fedora)

Headless Email OAuth2 Proxy with STARTTLS

This guide documents the setup of email-oauth2-proxy as a background service on Linux, using a dedicated system user and automated certificate renewal via certbot for STARTTLS.

This guide assumes you are already familiar with email-oauth2-proxy and that you have it working in some form, for example in a test or interactive environment. Some details are intentionally left implicit and rely on prior experience.

It may take some trial and error to get email-oauth2-proxy working correctly with your mail provider and the email client or application you intend to use. It is strongly recommended that you get this working first before following the steps below to make the setup more production ready.

1. User and permissions

@innovara
innovara / smartcard-passthrough-for-SSH-in-Fedora-WSL.md
Last active February 9, 2026 20:28
Smartcard passthrough for SSH in Fedora WSL

Smartcard passthrough for SSH in Fedora WSL

Most guides I found regarding the use of security tokens in WSL guests resort to using named pipes, with npiperelay.exe on the Windows host side and socat on the Linux guest side, with ssh-agent thrown into the mix to pass secrets. That setup works, but it leaves the token open for authentication, whereas I wanted a more native experience in which, both in Windows and Linux, I am asked every time for a PIN, in the case of a smartcard, to unlock it.

This HOWTO explains how to pass the hardware from the host to the guest so it can use it exclusively, as it would on a non-VM host. For those less familiar with virtualisation, please note that passthrough means the hardware is not available to the host while it is being passed to the guest. That can be controlled, but more on that later.

Phase 1: Windows host setup

1. Install usbipd-win: Download here.

Domain Connect DDNS Python Setup

This implementation provides a "canonical" and hardened way to manage dynamic DNS updates via the Domain Connect protocol (https://www.domainconnect.org/ | https://github.com/Domain-Connect/spec) using DomainConnectDDNS-Python (https://github.com/Domain-Connect/DomainConnectDDNS-Python). It utilizes a dedicated system user, a Python virtual environment, and systemd sandboxing to ensure your DNS refresh tokens remain secure and isolated.

1. System Preparation

Create a dedicated system user and the application directory.

sudo useradd -r -s /usr/sbin/nologin ddns-updater
sudo mkdir -p /opt/domain-connect-dyndns

Introduction

Working configuration for OpenVPN 2.6.16 on Fedora 43 and AlmaLinux 10.1 with the following characteristics:

  • Clients authenticate using usernames and passwords instead of certificates.
  • Clients use Time-based One-Time Passwords (TOTP) as a second authentication factor.
  • Clients have been tested on Windows using the community OpenVPN GUI (version 11.59.0.0) and OpenVPN Connect (version 3.8.0, build 4528).
  • On Linux, the configuration works with the OpenVPN CLI, but does not work with NetworkManager, as it does not prompt for the OTP at the moment.
  • The server uses a Let's Encrypt (LE) certificate.
  • Usernames and passwords are validated by the pam_userdb.so PAM module.
@innovara
innovara / Rename Linux user.md
Last active January 14, 2026 12:15
Rename ubuntu user

This is a tried and tested method for renaming a user in Linux. It has been tested with ubuntu and almalinux users.

Do not attempt this unless you have an alternative way to access the server if something goes wrong, or at minimum a snapshot or image if you are using a VPS or similar. Proceed entirely at your own risk.

Switch to the root shell: