Changing settings set during deployment

Hi,

I deployed firezone using the docker deployment, however I made a typo during the deployment and the endpoint is now incorrect, causing failures during logout.

I tried following the ‘Configure’ docs to change the settings in .env file and create a new container, which updated the ENV vars inside the container of firezone, but the application still shows incorrect endpoint in ‘Add device’ and during signout.

Just to confirm, you changed WIREGUARD_ENDPOINT in your $HOME/.firezone/.env, ran docker-compose up -d to recreate the container, and it’s still not showing correctly?

You can also make this change at /settings/site which will take precedence over the ENV config.

1 Like

Correct, to add, I also disabled local auth from the web UI and now struggling to enable it from the .env file, as the admin user is now locked out. A fail safe approach is to disable such setting when only a single admin exists.

EDIT: I tried settingMAX_DEVICES_PER_USER to a different value and it seems to work, but the previous one ( LOCAL_AUTH_ENABLED) does not. :confused:

I guess I’ll have to redo the installation.

Yeah, the LOCAL_AUTH_ENABLED env var currently doesn’t take precedence over the UI option. I’ll be pushing a fix for that shortly. In the meantime,

cd $HOME/.firezone
docker compose run --rm postgres psql -h 127.0.0.1 -d firezone -c "UPDATE configurations SET local_auth_enabled = 't'"
~/.firezone$ sudo docker compose run --rm postgres psql -h 127.0.0.1 -d firezone -c "UPDATE configurations SET local_auth_enabled = 't'"
psql: error: connection to server at "127.0.0.1", port 5432 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections?

Does it use sockets to make connection to the DB?

Hm strange, it does not.

Apologies, try this:

docker compose exec postgres psql -U postgres -h 127.0.0.1 -d firezone -c "UPDATE configurations SET local_auth_enabled = 't'"
1 Like

It seems to have updated(output below), but on UI the option is still not visible, do I need to restart the firezone container so that the UI shows the button?

~/.firezone$ sudo docker compose exec postgres psql -U postgres -h 127.0.0.1 -d firezone -c "UPDATE configurations SET local_auth_enabled = 't'"
UPDATE 1

EDIT: Solved, I had to restart the containers, thank you!

~/.firezone$ sudo docker compose down