Running your own server is severely underdocumented
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 450
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
(I don't mean it as a rant or an attack, please don't read it as such -- the tone just a limitation of my English, and lack of time to smoothen the cultural discrepancy edges. I do appreciate your effort on this project.)
Using the official server is impractical -- when I tried, I was 650-something in line, and it was barely moving, decreasing by one every 5-10 minutes or so.
And after three hours of trying to run my own server I must declare an utter defeat.
- Apparently the LuCI plugin talks to the server directly from browser (that took 15 minutes of frantic tcpdumping to figure out).
That runs into "mixed content" https issue, and can be trivially worked around in Firefox by clicking on the lock in the URL bar and disabling protection.
CORS is more painful -- I had to run the server behind nginx reverse-proxy withadd_header 'Access-Control-Allow-Origin' '*' always;directive. - Then it will just run into a 404 wall of what ultimately, through a redirect or two, amounts to absent
overview.json. I suspect that it is generated somehow through runningpoetry run python3 misc/update_all_targets.py. But it didn't work here. It just failed with thousands of messages like
...
INFO: 10.89.0.27:39372 - "GET /api/v1/update/23.05.2/bmips/bcm6362 HTTP/1.1" 403 Forbidden
INFO: 10.89.0.27:39372 - "GET /api/v1/update/23.05.2/bmips/bcm63268 HTTP/1.1" 403 Forbidden
INFO: 10.89.0.27:39372 - "GET /api/v1/update/23.05.2/bmips/bcm6368 HTTP/1.1" 403 Forbidden
INFO: 10.89.0.27:39372 - "GET /api/v1/update/23.05.2/bmips/bcm6358 HTTP/1.1" 403 Forbidden
...
Having no easy way to debug it (I am absolutely not familiar with neither python web stuff, nor podman or containers at all; found no easy way to iterate -- all changes to sources needed a full podman kill && podman rm && podman-compose build, a lengthy and annoying operation), I've tried playing around public dir mount. It seems that it's hardcoded essentially to /app/public in the sources, but podman-compose.yml mounts it at a different location depending on where the source was cloned into. This is where I ran out of time and could not continue further.
There's another thread #975 where @efahl was somehow able to do it. But the full steps are yet to be documented.
If I get more time to try it (somewhat unlikely, at this point I'm feeling like not falling into sunk-cost fallacy and just re-flashing the devices manually), I'll document my steps in this thread.
I'd appreciate if anyone also tried and has any insight.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review misc/update_all_targets.py and podman-compose.yml, starting with how overview.json is generated, how /app/public is mounted, and how the server is reached through nginx. Use the obstacles and logs in this issue and the attempted setup in #975 to establish a reproducible self-hosting path. Done means the full setup, including browser access, CORS, generated data, and container iteration, is documented and works for a fresh user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, python
- Domain
- backend, devops, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100