Run OBS on a headless unraid server with gpu acceleration (NVENC)
-
Create a Ubuntu 20.04 VM in Unraid
-
15 GB Disk
-
Graphics Card 1: VNC
-
Graphics Card 2: Your GPU
-
Sound Card: Your GPU
-
Install Ubuntu on the VM
- Boot the VM
- Press STRG + Alt + F3 to switch into terminal mode
sudo apt install openssh-server
- Connect to your VM via SSH with MobaXTerm on your host
- Download VirtualGL and TurboVNC
sudo dpkg -i <name of your downloaded files>
sudo apt -fix-broken install
sudo dpkg -i <name of your downloaded files>
(again)
sudo apt install mesa-utils
glxgears
- If you're connected to the server with MobaXTerm a new window should open on your PC displaying the glxgears application
-
Download NVIDIA Driver for your GPU from https://www.nvidia.de/Download/index.aspx?lang=de
-
Disable Nouveau-Driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
Paste the following into the fileblacklist nouveau options nouveau modeset=0
sudo update-initramfs -u
sudo reboot
- Connect to SSH again, after your VM rebooted
sudo apt install build-essential
- Execute the .run file you downloaded from the NVIDIA-Website earlier
- Continue Installation
- Yes
- Ok
- Yes
- Ok
- Get your PCI BusID from
nvidia-xconfig --query-gpu-info
sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device=None --virtual=1920x1080 --busid <THE PCI BusID>
sudo nano /etc/X11/xorg.conf
- Add
Option "HardDPMS" "false"
underSection "Device"
- Add
/opt/VirtualGL/bin/vglserver_config
- 1
- Y
- n
- n
- Y
- X
/opt/TurboVNC/bin/vncserver
/opt/TurboVNC/bin/vncviewer
- A new "TurboVNC" window should appear on your PC
- Enter "localhost"
- Click connect
- Click Yes and enter your SSH password
- Click connect on localhost:1
- A new window should open where you are connected to your Ubuntu VM Desktop
- A new "TurboVNC" window should appear on your PC
Use the following commands on the TurboVNC Ubuntu Desktop
export DISPLAY=:1
sudo add-apt-repository ppa:obsproject/obs-studio && sudo apt update && sudo apt install ffmpeg obs-studio
vglrun obs
to start obs using GPU.- You can now use OBS and change settings as you like.
- You can also install OBS-NDI