Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First run on headless server #13

Open
teotikalki opened this issue Feb 12, 2019 · 4 comments
Open

First run on headless server #13

teotikalki opened this issue Feb 12, 2019 · 4 comments

Comments

@teotikalki
Copy link

Issue: I have a headless Debian server. After fixing the dependencies problem I can now proceed with the install to the point of initially launching lwp but cannot go further.
The issue:
To quote the install instructions:
"First run we will get an installer page, most of defaults are OK and just click INSTALL.
Then stop lwp and start it again.
Default login is admin/admin but soon it will be configurable through the installer.
Your lwp panel is now at http://localhost:5000/."

I have editing the config files, with the part relevant to this being:

[global]
address = 0.0.0.0

but the 'first run' does not respect this.
I edited the contained lwp/config.py and changed its hardcoded location for the config file to match mine: no change.
The solution: The page has to be available from a non-localhost page without EVER having been available from localhost. Installing on headless servers means no web browser (and I personally think that that's where this project becomes particularly useful).

@teotikalki
Copy link
Author

Since the page is being served via Flask I tred the flask command line options when launching, eg:
./bin/lwp --host=0.0.0.0
or
./bin/lwp -h 0.0.0.0
with no success. Allowing these cli flags to be passed could resolve this.

@n3storm
Copy link

n3storm commented May 20, 2019

You are right in part @teotikalki
For production deployment, out in the wild, you should not expose flask server. Nginx or Apache fcgi should reverse proxy flask or better, gunicorn. Check flask docs.

I will try add some info on this.

@teotikalki
Copy link
Author

So... re-reading this I feel like you might have missed the point.
I have an nginx reverse proxy which I use to access vms and such... accessing the page 'from the wild' was never the issue. Since the ip of the reverse proxy isn't localhost connections from it are just as useless as connections to the lxc server itself.
To re-state: When installing on a headless server the page cannot be ACCESSED FROM LOCALHOST since there is NO BROWSER AT LOCALHOST. Therefore I can never click install and can never do anything else, ever.
Can you please allow LWP to be launched with a non-localhost binding so that it can be launched for the first time on a headless server?

@Glutamat42
Copy link

I just had the same problem, just for someone in the future who might experience the same issue.

I did the following quick n dirty fix which worked for me. Open bin/ptr in an editor (eg nano) and replace app.config['ADDRESS'] on line 24 with '0.0.0.0'. Safe and run it again. Now you can do the setup. Set the adress to something that allows you to access the web interface (be careful with 0.0.0.0) and klick install. Now you can undo the change in bin/ptr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants