Im trying to get gluetun to start with sparkbox for the media center but it says i cant find /dev/net/tun, im very new to homelabbing and ive done some docker stuff before but never used portainer so im very confused
13 replies
Chris wrote:
You're not doing anything wrong, and you don't need Portainer for this. Gluetun needs the Linux TUN device from the host. First run ls -l /dev/net/tun. If it says the path is missing and this is a normal Ubuntu, Debian, or UGREEN host, run sudo modprobe tun, check ls -l /dev/net/tun again, then run sudo sparkbox restart media. If this is a Proxmox LXC, stop there and tell me—TUN has to be enabled and passed through from the Proxmox host, so the steps are different. Reply with your hardware/OS and the ls output if it is still missing.
DravenB wrote:
Hi sorry for the very late reply but I made this post when I was running issues on a proxmox lxc now I’m on just a basic ubuntu server but I’m getting the same issue with Gluetun even though I have /den/net/tun in the files
Chris wrote:
No worries on the delay — and moving off the Proxmox LXC onto a plain Ubuntu server was the right call. Since /dev/net/tun exists but gluetun still won't start, the fastest way to see the real cause is: sudo sparkbox doctor — then scroll to the [VPN Tunnel] section. It checks whether the tun kernel module is actually loaded and whether the gluetun container came up. Quick thing to confirm too: run ls -l /dev/net/tun — that line should start with a c (a character device) and show 10, 200. If the module isn't loaded, run sudo modprobe tun, then persist it with echo tun | sudo tee -a /etc/modules, and finally sudo sparkbox restart media. Paste the [VPN Tunnel] output back here and I'll take it from there.
DravenB wrote:
it saying that i need a wireguard private key but the thing is im using expressvpn with openvpn and i cant access a wireguard key with expressvpn, so i dont know what do to?
Chris wrote:
Good news — you're not stuck, it's just a settings mismatch. Gluetun asks for a WireGuard key because the VPN protocol is still on its default (wireguard), and ExpressVPN doesn't issue those — so you'll use OpenVPN instead. In your ExpressVPN account, grab your manual OpenVPN config (.ovpn) plus the manual username/password it shows. Save the file as /opt/sparkbox/modules/media/config/gluetun/custom.ovpn, then in /opt/sparkbox/.env set VPNPROVIDER=custom, VPNTYPE=openvpn, OPENVPNCUSTOMCONFIG=/gluetun/custom.ovpn, and put that username/password in the VPNUSER / VPNPASSWORD fields. Then run sudo sparkbox restart media. One gluetun quirk: the 'remote' line in the .ovpn should be an IP, not a hostname. Still no luck? Reply here and I'll dig in.
DravenB wrote:
im getting this error for gluetun now "ERROR VPN settings: OpenVPN settings: custom configuration file: extracting information from custom configuration file: extracting connection from file: on line 6: extracting from remote line: host is not an IP address: ireland-ca-version-2.expressnetw.com"
Chris wrote:
That error is just gluetun being picky: the "remote" line in your .ovpn has to be an IP address, not a hostname. Quick fix — first resolve it by running: getent hosts ireland-ca-version-2.expressnetw.com — that prints the IP in the first column. Then open the file with sudo nano /opt/sparkbox/modules/media/config/gluetun/custom.ovpn, find the remote line (line 6) and swap the hostname for that IP, leaving the port number after it as-is. Save, then run sudo sparkbox restart media. One heads-up: ExpressVPN rotates its IPs, so if it connects now but drops later, just re-run that lookup and update the line. If you then hit a TLS timeout, paste the new log here and I'll dig in.
Chris wrote:
That looks right — your remote line now points at an IP and port (185.192.16.223:1195), which is exactly what gluetun was rejecting before with the "not an IP address" error. One thing to line up: since your file is named myexpressvpnirelandudp.ovpn and not custom.ovpn, open /opt/sparkbox/.env and set OPENVPNCUSTOMCONFIG=/gluetun/myexpressvpnirelandudp.ovpn so it points at that exact file. Then save in nano (Ctrl+O, Enter, Ctrl+X) and run sudo sparkbox restart media. If a fresh error shows up, paste it here and I'll keep digging with you.
DravenB wrote:
"ERROR VPN settings: OpenVPN settings: custom configuration file: extracting information from custom configuration file: extracting connection from file: on line 6: extracting from remote line: host is not an IP address: 185.192.16.223:1195"
Chris wrote:
Ah, I steered you slightly wrong on that last one — apologies. The catch is that an OpenVPN remote line separates the IP and the port with a space, not a colon, so gluetun read the whole 185.192.16.223:1195 as the hostname and rejected it. Reopen the file: sudo nano /opt/sparkbox/modules/media/config/gluetun/myexpressvpnirelandudp.ovpn, go to line 6, and change 185.192.16.223:1195 to 185.192.16.223 1195 (swap the colon for a space). Save with Ctrl+O, Enter, Ctrl+X, then sudo sparkbox restart media. If gluetun throws anything new after that, paste it and I'll bring Tom in so we get you over the line.
DravenB wrote:
I now works thanks for all the help but when I try and open Jellyfin or seerr the credentials don’t show up, I made another post about the issue
Chris wrote:
That's the one — glad the tunnel finally came up after all that back and forth. Nice work sticking with it through every one of those error messages. On the missing credentials: I've already answered that over on your other post, so there's nothing more you need to do here. Tom shipped a fix for it today and the steps are waiting for you there — better to keep that side of it in one thread so nothing gets split.