The Open WebUI side bar is too narrow. I keep editing the css via “Inspect”, but it gets resrt when the page reloads. I found a way to persist across browser restarts and page refreshes.
My Setup:
- Open WebUI installed via Docker.
- Firefox v130 on macOS.
Steps to make the sidebar wider are as follows:
1. Locate Your Firefox Profile Folder
- Open Firefox and enter
about:support
in the address bar. - Look for the “Profile Folder” entry.
- Click the “Open Folder” button next to it.
- Right click the
xxxxxxx.default
folder and chooseNew Terminal at Folder
. OR - On the path bar at the bottom of the Finder window, right-click the
xxxxxxxx.default
folder, and “Copy as Pathname”.
Note: The profile folder path typically looks like this:
/Users/yourusername/Library/Application Support/Firefox/Profiles/xxxxxxxx.default
wherexxxxxxxx
is a random string of characters.
2. Create the Chrome Folder
- If you didn’t choose
New Terminal at Folder
, open Terminal and navigate to your profile folder using the path you found in step 1. For example:cd '/Users/yourusername/Library/Application Support/Firefox/Profiles/xxxxxxxx.default'
- Create a new folder called “chrome”:
mkdir chrome
Note: Don’t worry about the word “chrome”. It’s not related to the Google Chrome browser. In Firefox, “chrome” refers to the browser’s user interface elements.
3. Create the UserContent.css File
- In Terminal, create the userContent.css file with this command:
touch chrome/userContent.css
4. Edit the UserContent.css File
- Open the
userContent.css
file with your preferred text editor (e.g., TextEdit, VSCode). - Add this custom CSS and save the file.
@-moz-document url-prefix("http://localhost:3000") { .w-\[260px\] { width: 320px !important; } }
If your Open WebUI has a different URL, use that instead.
320px width is what I use; modify it to work for you.
Note: This CSS does the following:
@-moz-document url-prefix("http://localhost:3000")
: This line ensures the CSS only applies to pages that start with the URL “http://localhost:3000 “..w-\[260px\]
: This targets elements with the class w-[260px]. The backslash is used to escape the square bracket in the class name.width: 320px !important;
: This sets the width of the targeted elements to 320px. The !important flag ensures this rule takes precedence over any other width rules for this class.You can use this file to modify CSS to target different URLs or elements, and change the CSS properties as needed for your specific use case.
5. Enable Custom CSS in Firefox
- In Firefox, type
about:config
in the address bar. - Accept the warning if shown.
- Search for
toolkit.legacyUserProfileCustomizations.stylesheets
. - Set its value to
true
by double-clicking on it.
6. Restart Firefox
- Quit Firefox completely.
- Reopen Firefox and go to Open WebUI.
✅ Your custom CSS should now be applied to Open WebUI across page refreshes and browser restarts.