Page 1 of 2

[Solved] Missing .env file

Posted: Sun Jul 07, 2024 3:56 am
by brant

Hello! I was going through the installation/setup process today and ran into an issue when configuring qBittorrent. When I tried configuring Network interface to tun0, I only saw lo and eth0 as options. I tried looking at my .env file but noticed it didn't exist, so I created one like:

Code: Select all

# Base configuration
PUID=1000
PGID=1000
MEDIA_DIRECTORY=/my_location/media
INSTALL_DIRECTORY=/tmp/yams
MEDIA_SERVICE=jellyfin

# VPN configuration
VPN_ENABLED=true
VPN_SERVICE=surfshark
VPN_USER=user@email.com
VPN_PASSWORD=sample_password,

Then I running

Code: Select all

docker logs -n 100 gluetun

and it looks like it still thinks I'm using openvpn:

Code: Select all

ERROR [openvpn] AUTH: Received control message: AUTH_FAILED
Your credentials might be wrong 🤨

I'm not really sure what's going wrong or how to proceed from here, any advice would be appreciated!


Re: Missing .env file

Posted: Sun Jul 07, 2024 11:30 am
by rogs

Hey @brant!

Are you sure your .env file doesn't exist? Files that start with a . in Linux are hidden files. You can list them with ls - la. You don't need to create an env file, make sure you§are editing your .env file.

Cheers!

Roger.


Re: Missing .env file

Posted: Sun Jul 07, 2024 2:00 pm
by brant

Hey @rogs, thanks for the response!

I did run ls -a but I realized I was looking in the wrong place, I was checking /tmp/yams instead of /opt/yams :lol: I found the .env file now and everything does look correct, but I'm still seeing the same gluetun errors. I double checked the VPN credentials and they are correct. Do you have any ideas what could be wrong? Thanks!


Re: Missing .env file

Posted: Sun Jul 07, 2024 2:17 pm
by rogs

What VPN are you using? Did you check the documentation for your VPN?


Re: Missing .env file

Posted: Sun Jul 07, 2024 3:02 pm
by brant

I'm using surfshark. I ran

Code: Select all

# OpenVPN
docker run -it --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=surfshark \
-e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun

and am still getting

Code: Select all

[openvpn] AUTH: Received control message: AUTH_FAILED
Your credentials might be wrong 🤨

I confirmed that the login credentials are correct, so I'm not sure why I'm getting this.


Re: Missing .env file

Posted: Sun Jul 07, 2024 3:05 pm
by rogs

Why are you running it as a docker command? You need to fix it in the docker-compose file. The issue you are describing right now it's not related to YAMS. Make sure you are using the YAMS docker-compose file and you are getting the openvpn username and password in the correct location.

Also note that sometimes your openvpn username and password is not the same as your regular username and password.


Re: Missing .env file

Posted: Sun Jul 07, 2024 3:11 pm
by rogs

Another thing to note is that if your openvpn username or password has special characters, you'll need to escape them correctly.


Re: Missing .env file

Posted: Sun Jul 07, 2024 4:33 pm
by brant

Sorry, I guess I am a bit confused. I thought that it said to run it that way in the documentation.

I don't believe there are any characters that need to be escaped, the special ones are @ and !.

I guess I don't quite understand what openvpn is and what it's doing. If my openvpn credentials are different from my surfshark credentials then how can I find them? Is there additional setup I need to do?

Thanks!


Re: Missing .env file

Posted: Sun Jul 07, 2024 4:43 pm
by rogs

If my openvpn credentials are different from my surfshark credentials then how can I find them?

Thats something you need to figure out with Surfshark. There should be a place to create or download a openvpn configuration. Sadly I can't help you since I don't have or use Surfshark, I recommend you do a quick Google search on how to connect Surfshark with OpenVPN


Re: Missing .env file

Posted: Sun Jul 07, 2024 5:59 pm
by brant

I was able to figure it out, thanks so much for the help! :D The biggest issue was that I was using my vpn credentials instead of my openvpn credentials.