Compare commits

...

2 commits

Author SHA1 Message Date
Harald Hoyer 3afb54f4d7 feat(sgx): update OpenWebUI configuration for API settings
- Enable Ollama API by setting `ENABLE_OLLAMA_API` to true.
- Disable OpenAI API by setting `ENABLE_OPENAI_API` to false.
This improves control over API usage and ensures proper configuration.
2025-03-15 15:46:30 +01:00
Harald Hoyer 3e1745954f refactor: update host binding and consolidate ACME domains
- Change OpenWebUI host binding from 0.0.0.0 to 127.0.0.1 for security.
- Consolidate ACME certificates under internal.hoyer.world with extra domain names.
- Update Nginx virtual hosts to use the unified ACME host internal.hoyer.world.
2025-03-15 15:01:28 +01:00
3 changed files with 15 additions and 15 deletions

View file

@ -1,8 +1,5 @@
{ { config
pkgs, , ...
lib,
config,
...
}: }:
{ {
sops.secrets.internetbs = { sops.secrets.internetbs = {
@ -17,8 +14,12 @@
credentialsFile = config.sops.secrets.internetbs.path; credentialsFile = config.sops.secrets.internetbs.path;
}; };
certs = { certs = {
"openwebui.hoyer.world" = { }; "internal.hoyer.world" = {
"syncthing.hoyer.world" = { }; extraDomainNames = [
"openwebui.hoyer.world"
"syncthing.hoyer.world"
];
};
}; };
}; };
} }

View file

@ -1,8 +1,5 @@
{ { config
pkgs, , ...
lib,
config,
...
}: }:
{ {
users.users.nginx.extraGroups = [ "acme" ]; users.users.nginx.extraGroups = [ "acme" ];
@ -23,7 +20,7 @@
virtualHosts = { virtualHosts = {
"openwebui.hoyer.world" = { "openwebui.hoyer.world" = {
enableACME = false; enableACME = false;
useACMEHost = "openwebui.hoyer.world"; useACMEHost = "internal.hoyer.world";
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.open-webui.port}"; proxyPass = "http://127.0.0.1:${toString config.services.open-webui.port}";
@ -32,7 +29,7 @@
}; };
"syncthing.hoyer.world" = { "syncthing.hoyer.world" = {
enableACME = false; enableACME = false;
useACMEHost = "syncthing.hoyer.world"; useACMEHost = "internal.hoyer.world";
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:8384"; proxyPass = "http://127.0.0.1:8384";

View file

@ -3,12 +3,14 @@
services.open-webui = { services.open-webui = {
enable = true; enable = true;
port = 8080; port = 8080;
host = "0.0.0.0"; host = "127.0.0.1";
environment = { environment = {
ANONYMIZED_TELEMETRY = "False"; ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True"; DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True"; SCARF_NO_ANALYTICS = "True";
ENABLE_OLLAMA_API = "True";
OLLAMA_API_BASE_URL = "http://m4.local:11434"; OLLAMA_API_BASE_URL = "http://m4.local:11434";
ENABLE_OPENAI_API = "False";
# Disable authentication # Disable authentication
WEBUI_AUTH = "False"; WEBUI_AUTH = "False";
}; };