Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Installation steps /script snippets for Open Web-UI on Debian

This is just a quick info dump for my own future reference, an anyone else who might benefit. Many parts are uncertain and should be investigated for clean up. But it works, and I have other priorities. Apologies at the mess and hard to read order, but there are plenty of other nice walkthroughs that I followed for this. I recommend one of them instead as your base, and this just as a reference.


Now, how to do code blocks in this interface...? Alas, not in the base offering of Blogger... Yuck.


  • System: Debian trixie/sid mixed with many stable packages, as of 2025-06-14.
  • Desireable: A remote access method, such as tailscale or easily opened and secured ports.
  • Option selected: A more native python based, rather than the docker container option.

Install pipx and dependencies via package manager of choice.

Configure some settings files in the directory, especially environment variables.

Here is a dump of my files / scripts used. Adjustments are needed.

First section includes multiple files, which should be configured per your system needs.


::::::::::::::
open-webui.env
::::::::::::::

# ==========================
# Open WebUI Environment (.env)
# ==========================
# refer https://docs.openwebui.com/getting-started/env-configuration/#overview

# - Non-PersistentConfig variables can be changed at any time and will take effect on restart.

# Bind to 0.0.0.0 for LAN access (default port 8080)
WEBUI_HOST=0.0.0.0
WEBUI_PORT=8081
# FIXME: used?
HOST=0.0.0.0
PORT=8081

# disable telemetry
# Telemetry/analytics controls (not PersistentConfig)
SCARF_NO_ANALYTICS=true
DO_NOT_TRACK=true
ANONYMIZED_TELEMETRY=false


# ==========================
# Unknown if PersistentConfig

# Enable audio in / out features
## Speech-to-Text (STT) configuration for DeepInfra
AUDIO_STT_ENGINE=openai
AUDIO_STT_MODEL=whisper-large-v3-turbo
# FIXME: or is it?
# AUDIO_STT_ENGINE=openai
# AUDIO_STT_MODEL=openai/whisper-large-v3-turbo
## Text-to-Speech (TTS) configuration for DeepInfra
AUDIO_TTS_ENGINE=hexgrad
AUDIO_TTS_MODEL=Kokoro-82M
# FIXME: or is it?
# AUDIO_TTS_ENGINE=openai
# AUDIO_TTS_MODEL=hexgrad/Kokoro-82M
# Many voice choices: https://deepinfra.com/hexgrad/Kokoro-82M/api?example=http
AUDIO_TTS_VOICE=af_bella


ENABLE_ONEDRIVE_INTEGRATION=True
# UNKNOWN: ONEDRIVE_CLIENT_ID


# Description: Specifies the base directory for data storage, including uploads, cache, vector database, etc.
# FIXME: Use XDG instead.
DATA_DIR=/home/USERID/Projects/Open-webui/OpenWebUI_Data

# ==========================
::::::::::::::
open-webui.env.first_run_lan
::::::::::::::
# ==========================
# Open WebUI Environment (.env.first_run_lan)
# only first run
# ==========================
# Allow open access
# Disable user authentication (WARNING: insecure, use only in trusted LAN)
# Disable user accounts and authentication
# User/account/authentication controls
ENABLE_SIGNUP=False
WEBUI_AUTH=False


::::::::::::::
open-webui.envish.first_run
::::::::::::::

# To be sourced.

# ==========================
# Open WebUI Environment (open-webui.envish.first_run)
# only first run
# refer https://docs.openwebui.com/getting-started/env-configuration/#overview
# ==========================
mkdir -p "${HOME}"/Documents/OpenWebUI

# DeepInfra API configuration
OPENAI_API_BASE_URL=https://api.deepinfra.com/v1      # PersistentConfig: Yes
# OPENAI_API_KEY=your_deepinfra_api_key_here            # PersistentConfig: Yes
export DEEPINFRA_TOKEN=$(pass show Passwords/api.deepinfra.com)
OPENAI_API_KEY=$DEEPINFRA_TOKEN

# Default language/locale
# DEFAULT already, but for good measure.
DEFAULT_LOCALE=en-US                                     # PersistentConfig: Yes

# Enable image generation (set to True since DeepInfra supports it)
ENABLE_IMAGE_GENERATION=True                          # PersistentConfig: Yes

# include OLLAMA_BASE_URL since using Ollama locally.
OLLAMA_BASE_URL=http://NAME_OF_LOCAL_HOST_IN_REMOTELY_ACCESSIBLE_FORM:11434  # PersistentConfig: Yes

# ==========================
# Notes:
# - PersistentConfig variables are only read from this file on FIRST LAUNCH.
#   To change them later, use the Open WebUI interface or clear the internal config.
Now ready to try an installation. At a regular bash prompt:

mkdir -p ${HOME}/Tmp/Pip_Cache # outside of tmpfs (which is too small)
TMPDIR="${HOME}"/Tmp/Pip_Cache pipx install open-webui   # Alternatively "--no-cache-dir"
sudo ufw allow 8081

Next, first run including configuration

:::::::::::::: open-webui.init.sh ::::::::::::::

# preload password-repo

# safer, but not support pass calling : Export variables: export $(grep -v '^#' ~/.open-webui/.env | xargs)
source ./open-webui.envish.first_run
export $(grep -v '^#' ./open-webui.env.first_run_lan | xargs)
export $(grep -v '^#' ./open-webui.env | xargs)
echo is DATA_DIR correct?  : $DATA_DIR
open-webui serve --host $WEBUI_HOST --port $WEBUI_PORT
:::::::::::::: open-webui.run.sh ::::::::::::::

# safer, but not support pass calling : Export variables: export $(grep -v '^#' ~/.open-webui/.env | xargs)
export $(grep -v '^#' ./open-webui.env | xargs)
open-webui serve --host $WEBUI_HOST --port $WEBUI_PORT
:::::::::::::: open-webui.upgrade.sh ::::::::::::::

TMPDIR="${HOME}"/Tmp/Pip_Cache pipx upgrade open-webui   # Alternatively "--no-cache-dir"

That is what I did.

Method to import contacts from CardMunch to Google Contacts

The script below is my method of importing contacts from CardMunch to Google Contacts.  It could be useful for any address book which imports VCF files.
It automates part of the work, but much still is manual.

CardMunch is an iOS app and service purchased by LinkedIn that digitizes pictures of business cards into an address book, with export (one by one) to iOS contacts, and to e-mail.
Since I am using Google Contacts, I want to automate the transfer as much as possible.  I feel it is still easier than typing cards in by hand, although I am not confident of that.

Portable Frozen Bubble on Microsoft Windows

Portable Installation walk-through for Frozen Bubble 2.2.1beta1 on Microsoft Windows

It is a bit complex. 
Perhaps best overall would be to use a live CD of Linux or install a Linux distribution.  Then frozen bubble, and many other games and programs, would be just a few clicks away.
Check first if a Windows version is available at www.frozen-bubble.org/.
Also, if you know someone who has the portable version already, copying it seems to work.  It is GPL, so it is legally free to copy.  The compressed size is 94.3MB, so I have not mirrored it on-line.  (Probably it can be made a lot smaller by trimming out downloaded sources, and unneeded perl modules.)

Both regular installation & a portable installation are possible.
I used the portable version, allowing putting it on a removable drive and running from any Windows computer.  This needs slightly more set-up however. 

Regular instructions
mirrored from Frozen Bubble on FaceBook.
----------------------------------------
Windows Install:
1. Download and install Strawberry Perl @ http://strawberryperl.com/
2. After install press Windows key + R.
3. type: cpan Games::FrozenBubble (Step 3 takes about 30mins to download and install.)
4. Press Windows key + R
5. type: frozen-bubble
Do step 4 and 5 each time to launch the game or create a .bat file to launch it.
----------------------------------------
Updating is done by just re-running: cpan Games::FrozenBubble

Portable Frozen Bubble for Windows:
The portable installation walk-through below is an expansion and modification of the regular installation.

System Requirements: About 399 MB.
Other requirements unknown.  Refer to Strawberry Perl, and perhaps SDL.

Installation:
1. Download Strawberry Perl portable.
It can be found at http://strawberryperl.com/. 
I used "strawberry-perl-5.12.3.0-portable.zip".  It is 54.4 MB.
2. As described in "README.portable.txt", extract strawberry portable ZIP into e.g. c:\myperl\
  Note: choose a directory name without spaces and non us-ascii characters.
3. Double click / run "portableshell.bat"
4. Enter in cmd window : cpan Games::FrozenBubble
If it seems like it had errors, or if later steps do not seem to work, running it again might fix problems. 
5. Wait until complete.  Can take 30 minutes to a couple hours to download and configure, depending on network speed and computer speed.
6. Enter: frozen-bubble
7. To exit game, press Esc.
8. To exit cmd window, enter: exit

Running basically installed game:
A. Find directory of Strawberry Perl portable.
B. Double click / run "portableshell.bat"
C. Enter: frozen-bubble
D. To exit game, press Esc.
E. To exit cmd window, enter: exit

Intermediate level of installation:
F. Copy "portableshell.bat" to "frozen-bubble-start.bat".
G. Edit in WordPad (under All Programs, Accessories) or other favorite text editor that handles Unix format files.  (Notepad will not work.)
H. Change last line from:
---
cmd
---
to
---
echo Starting frozen-bubble...
frozen-bubble
---
I. Save as text.
J. Click and drag "frozen-bubble-start.bat" to start menu, all programs, and place it where on the menu you would like it.  A shortcut copy will be created.
K. Now select "frozen-bubble-start.bat" or "Shortcut to frozen-bubble-start" in the menu to start Frozen Bubble.
L. To change the name in the menu, right click on the "Shortcut to frozen-bubble-start" menu item, and select "Rename".

Advanced level of installation:
M. To change the icon, right click on the "Shortcut to frozen-bubble-start" menu item, and select "Properties", then "Change icon".
Files convertable into a windows icon with Gimp can be found at someplace like:
...\strawberry-perl-5.12.3.0-portable\cpan\build\Games-FrozenBubble-2.212-yVOabf\share\icons

Enjoy!


Other Notes:
It seems that this is not exactly the official frozen bubble, as some tweaks were made to it.  So it should be considered an unoffical port, until something is available from the main frozen bubble web site.

I could create a batch script file to do basic and part of intermediate installation, which would depend on wget.exe.  However, it would require updating the stawberry perl link occasionally, and I hope the below walk-through is simple enough.  Once the 2.2.1 version becomes considered stable (or before), I hope a fancier Windows-style installer will become available.  I do not have experience with creating such installers.

Possible options investigated:
    Via Stawberry perl
     WinXP available, but older windows seem to not be supported; Linux boot USB/CD better in that case.
        Works!  Not widely obvious how though.  Hence I wrote it up.
    Live CD easiest?
     bootable for speed
     Emulateable via qemu for quick testing, easier use.
        Gives other programs, like gcompris, as well.
         GCompris not freely available on Windows.
        DouDou Linux seems a good choice for CD bootable.
    FB-win32 @ Sourceforge
        need perl 5.6.*,
         but no longer freely available from FB-win's linked to site.
    Brothersoft at http://www.brothersoft.com/games/frozen-bubble-download.html
     BAD source; tries to install ad-ware.
     AND: labelled as 2.2.0 for windows,
     but 2.2.0 supposedly not for windows.
     but in a bz2 archive, so hard to use, if possbile at all.
     Strongly suspect it is the Unix environment files.

This walk-through is placed in public domain, as described at the  Creative Commons Public Domain page.

Published Revision 2011-05-29-1750EDT