About the kernel, it should be 4.14 already. See: https://dietpi.com/forum/t/xu4-cloudshell-2/2100/1
To verify: uname -a
To upgrade: G_AGDUG (or via dietpi-config > Advanced Options > Firmware update)
About the fan, did you attach it to the native fan/PWM port of the XU4?
By chance I wrote a script that is WIP as it supports currently XU4 only (at least as far as known): https://github.com/MichaIng/DietPi/blob/dev/.meta/dietpi-fan_control
With this you can toggle temperature dependant fan speed and adjust at which temperatures the fan should run at what speeds.
To try it out:
wget https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-fan_control -O /DietPi/dietpi/dietpi-fan_control
chmod +x /DietPi/dietpi/dietpi-fan_control
/DietPi/dietpi/dietpi-fan_control
You can toggle fixed/temperature controlled fan speed.
In case of temperature controlled fan speed you can define 3 temperature points and 4 fan speeds that should run below/above those temperature points. I hope the system+script is self-explained above.
It is WIP and I could only test it dry run. But you cannot really break anything. If the fan does not behave as expected when using the script, simply reboot. The settings are currently not applied on boot. Use cpu to watch CPU temperatures and see how/if the fan behaves as it should.
I think as a start it is best to use static fan speed and see if the fan runs at all. Then play with the temperature dependency.