Empty .env file Vitxi 4.1.0-0

@maynor just updated a server to Vital version 4.1.0-7 and Vitxi version 4.1.0-0 and webrtc clients are not able to register again. Firewall and general config didn’t change at all as everything was working as expected before the upgrade. What I do see as very odd is that the .env file is empty completely

-rw-r--r-- 1 www-data www-data 0 Aug 14 18:47 .env

Not sure exactly why this happened during the upgrade. Most likely due to this the following commands dont work at all

server: /usr/share/vitxi/backend# php artisan websockets:ssl-config

In Environment.php line n/a:                           
  Uninitialized string offset -1

/usr/share/vitxi/backend/artisan websockets:ssl-config
/usr/bin/env: ‘php\r’: No such file or directory

Any idea how to get the issue fixed?

Got a copy of the .env file from a snapshot I restored into a new vm and set the proper permisions on the file to be owned by www-data, still couldn’t get it to work so I did the following.

cd /usr/share/vitxi/
chown -R www-data:www-data backend
chown -R www-data:www-data frontend
php artisan logs:clear
php artisan websockets:ssl-config
systemctl restart vitxi
systemctl restart vitxi-worker

Logged out of vitxi completely and reloaded the page. The test Vitxi extension is registering once again.

Very odd the upgrade did something to the .env file.

Any other way to have recreated the .env file without having to restore a snapshot and grab the file from there @maynor ?

You can copy the /usr/share/vitxi/backend/.env.example (or .env.base) file to .env, and then execute the following command:

cd /usr/share/vitxi/backend/
php artisan run-wizard

This command will enable the installation wizard, allowing you to reconfigure the settings, which will then be saved in the .env file.

1 Like