Disable web UI

Hi,

Is there a way to disable the web UI so Home Assistant can be accessed using the Websocket API only?

remove frontend: from configuration.yaml.

You will need to move away from default_config in order to really do this.

I cloned core, removed both from the configuration:

# Loads default set of integrations. Do not remove.
#default_config:

# Load frontend themes from the themes folder
#frontend:
#  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

logger:
  default: info
  logs:
    homeassistant.components.cloud: debug

but the UI is still working. Am I missing something?

It may not be possible to disable it anymore. That’s how it used to be done.

You did restart after making those changes right?

FYI if you remove default config, you’ll be removing a lot of required core functionality that other integrations may rely on.

I figured from default_config’s description in its page that it did a lot more. I’m looking into it now to better understand it.

I stopped Home Assistant, commented out the settings then ran it again using:

hass -c config/

Is the configuration cached somewhere? Because, I still got these lines in the log:

2024-05-17 16:53:47.925 INFO (MainThread) [homeassistant.setup] Setting up default_config
2024-05-17 16:53:47.925 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.00 seconds