mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-02 23:08:26 -05:00
[GH-ISSUE #20601] issue:v0.7.2: --data-dir flag removed, breaks bare metal installs #34761
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @freddyflv on GitHub (Jan 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20601
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
v0.7.2 (bare metal)
Ollama Version (if applicable)
v0.13.5 (bare metal)
Operating System
Ubuntu 24.04.3 LTS
Browser (if applicable)
na
Confirmation
README.md.Expected Behavior
Option 1: The --data-dir command-line flag should continue working for backward compatibility
Option 2: If the flag is being removed, this breaking change should be clearly documented in release notes with migration instructions
In v0.6.x, the following systemd service configuration worked:
ini[Service]
ExecStart=/path/to/venv/bin/open-webui serve --data-dir /path/to/data
After updating to v0.7.2, this same configuration should either:
Continue working (backward compatibility), OR
Fail with clear documentation on what changed and how to fix it
Actual Behavior
After upgrading from v0.6.43 to v0.7.2 via pip install --upgrade open-webui, the systemd service fails to start with:
Jan 12 01:51:42 hostname open-webui[1848]: | No such option: --data-dir
Jan 12 01:51:42 hostname systemd[1]: open-webui.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 12 01:51:42 hostname systemd[1]: open-webui.service: Failed with result 'exit-code'.
Release notes checked:
v0.7.2 (2026-01-10): No mention of --data-dir flag removal
v0.7.1 (2026-01-09): No mention of command-line argument changes
v0.7.0: No mention of command-line argument changes
The --data-dir flag was silently removed with zero documentation.
Steps to Reproduce
Install Open WebUI v0.6.43 using Python virtualenv:
bash python3 -m venv venv
source venv/bin/activate
pip install open-webui==0.6.43
Create systemd service file at /etc/systemd/system/open-webui.service:
ini [Unit]
Description=Open WebUI Service
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/open-webui
ExecStart=/path/to/venv/bin/open-webui serve --data-dir /path/to/data
Restart=always
[Install]
WantedBy=multi-user.target
Enable and start service:
bash sudo systemctl daemon-reload
sudo systemctl enable open-webui
sudo systemctl start open-webui
Result: Service starts successfully in v0.6.43
Update to v0.7.2:
bash source venv/bin/activate
pip install --upgrade open-webui
sudo systemctl restart open-webui
Result: Service fails with "No such option: --data-dir"
Check service status:
bash sudo systemctl status open-webui
sudo journalctl -u open-webui -n 50
Result: INVALIDARGUMENT error, service in failed state
Logs & Screenshots
● open-webui.service - Open WebUI Service
Loaded: loaded (/etc/systemd/system/open-webui.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code)
Process: 1848 ExecStart=/path/to/venv/bin/open-webui serve --data-dir /path/to/data
Main PID: 1848 (code=exited, status=2/INVALIDARGUMENT)
Additional Information
● open-webui.service - Open WebUI Service
Loaded: loaded (/etc/systemd/system/open-webui.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code)
Process: 1848 ExecStart=/path/to/venv/bin/open-webui serve --data-dir /path/to/data
Main PID: 1848 (code=exited, status=2/INVALIDARGUMENT)
Error from journalctl:
Jan 12 01:51:42 hostname open-webui[1848]: | No such option: --data-dir
Jan 12 01:51:42 hostname open-webui[1848]: Try 'open-webui serve --help' for help.
Jan 12 01:51:42 hostname systemd[1]: open-webui.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 12 01:51:42 hostname systemd[1]: open-webui.service: Failed with result 'exit-code'.
Additional Information
Workaround Discovered
Through trial and error, discovered that v0.7.2 now requires using an environment variable instead of a command-line flag:
Old (v0.6.x - BREAKS in v0.7.x):
ini[Service]
ExecStart=/path/to/venv/bin/open-webui serve --data-dir /path/to/data
New (v0.7.x - Required):
ini[Service]
Environment="DATA_DIR=/path/to/data"
ExecStart=/path/to/venv/bin/open-webui serve
After applying this fix, service starts successfully and all data is accessible.
Impact Assessment
Who is affected:
All bare metal installations using systemd
All bare metal installations using startup scripts with --data-dir flag
Any existing documentation/tutorials showing the old flag
What breaks:
Service fails to start immediately after update
No graceful degradation or fallback
Existing working configurations suddenly fail
Why this is critical:
Breaking change with zero documentation
No migration path provided in release notes
Users must independently discover the workaround
Time lost: ~45 minutes of troubleshooting per installation
Suggested Fixes
Short term:
Add retroactive note to v0.7.2 release notes documenting this change
Update documentation with correct service file examples
Medium term:
3. Consider adding deprecation warning in v0.7.1 before removing flag in v0.7.2
4. Add clear error message: "The --data-dir flag has been removed. Use DATA_DIR environment variable instead."
Long term:
5. Consider accepting both flag and environment variable for backward compatibility
6. Implement proper deprecation cycle for breaking changes
Configuration That Works
Complete working systemd service file for v0.7.2:
ini[Unit]
Description=Open WebUI Service
After=network.target ollama.service
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/open-webui
Environment="PATH=/path/to/venv/bin:/usr/local/bin:/usr/bin:/bin"
Environment="DATA_DIR=/path/to/data"
ExecStart=/path/to/venv/bin/open-webui serve
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Notes
Docker installations likely unaffected (use volume mounts)
Only affects bare metal Python installations
Tested workaround confirmed working across system reboots
Issue reproducible on fresh installation of v0.7.2
Thank you for the amazing project! This issue report is meant to help improve documentation and prevent others from experiencing the same deployment failure.
@pr-validator-bot commented on GitHub (Jan 12, 2026):
⚠️ Invalid Issue Title
Hey @freddyflv, please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:") make it difficult for volunteer contributors to understand and triage issues.
Please update the title to reflect the content of your issue.
@Classic298 commented on GitHub (Jan 12, 2026):
I have seen all commits between 0.6.42 and 0.7.2
There was no commit that removed such an option.
And i just checked the entire docs and such an option was never documented to begin with.
I also took the liberty to check when the start scripts were last updated. 3-7 months ago. And even back then they did not have this parameter. And the main.py also didn't took any parameter "data-dir" or similar months ago. And there is no single docs page where this parameter is or was documented.
I think you used some external script.
There is none.
Nothing was changed between these versions that removed such a flag.
No, because it was not changed.
PS: your posted "working" systemd file does not work like this it has syntax errors
@rgaricano commented on GitHub (Jan 12, 2026):
Is fully operative,
2b26355002/backend/open_webui/env.py (L212)2b26355002/backend/open_webui/config.py (L19-L20)