What is the best way to have caddy run at boot with env file, without running as root?
the default systemd service will run caddy as the caddy user i think
otherwise you can choose any user to run a systemd system service
Create a user, and then a systemd unit for it, under ~/.config/systemd/user/ with contents like these:
[Unit] Description=Caddy web server After=network.target [Service] ExecStart=/usr/local/bin/caddy run --config /path/to/Caddyfile --envfile /path/to/Envfile ExecReload=/usr/local/bin/caddy reload --config /path/to/Caddyfile --envfile /path/to/Envfile Restart=on-failure User=caddy Group=caddy [Install] WantedBy=default.target
Adjust the paths in the arguments. It will require systemctl daemon-reload for such unit to be available for enabling and starting it…
I’m on Linux mint 22 and use surfshark as my VPN. It has a Killswitch to ensure that I can’t be connected to the Internet when the VPN isn’t active.
But, when I turned on the Killswitch, suddenly all of my Wi-Fi options disappeared completely from my network manager. I can’t connect to the Internet at all - the option is completely gone.
I disabled the Killswitch and rebooted but that didn’t do anything.
I used time shift to revert to a snapshot from yesterday but still no Wi-Fi options.
I tried disabling and stopping the process that turning on the Killswitch enables, but no luck there either.
Uninstalling surfshark doesn’t do anything either and just requires another time shift.
At this point I’m at my wit’s end. I have no idea what to do. Any help would be greatly appreciated
Check for any customizations in /etc/NetworkManager
Alternatively, reinstall surfshark, enable killswitch, connect and disable killswitch before disconnection… When you disconnect it should be fine…
The killswitch is most surely a combination of changes on networkmanager dispatcher script, iptables rules and dns setting (/etc/resolv.conf)
Thanks for the help!
Turns out it was a hardware issue - I eventually found that I couldn’t connect to Wi-Fi in my mint live usb or Windows 10 on that computer either after a bit more testing. A full power off and unplug seems to have reset whatever was wrong with the Wi-Fi adapter and all is working again, thank goodness.
Thanks again for taking the time to help! It’s what I’ve come to love about this community in the two months I’ve been in it!