Ben Green's picture

Hi all,

Is there a way to reset Turnkey back to the initail installation state?

I had issues with webmin not showing the modules for appache, followed a guide, and now I get 502 Bad Gatewate when I try to access webmin?

Is ther any way to reinstall Turnkey LAMP without having to visit onsite again?


Jeremy Davis's picture

If so then you could just create a new server (i.e. fresh install) and trash your current one (make sure that your backup includes everything you need and has been tested to work before you trash your existing server). Even if you have some other sort of backup, that could still be a perfectly good option...

TBH even if you don't have a previous good backup, my advice would be to do a backup now. Even though your system maybe a little broken, at least all your data is there. There is always a risk when you are trying to fix things that you may make them worse (especially if you're not totally sure what you are doing...)

You could try uninstalling Webmin and resinstalling it. The downside of that is that is it will also uninstall all the modules so you'll need to reinstall them all.

You could try to troubleshoot the issue? There are a few options there.

Webmin includes it's own mini-webserver and no doubt if it's throwing errors then the mini-webserver log probably includes some better hints at what is actually causing the issue. All logs are normally in /var/log but IIRC Webmin actually stores its logs in /var/webmin/log (but perhaps I'm wrong...).

One other thought is that all the Webmin config is in /etc/webmin and TurnKey includes etckeeper. That means that the whole /etc/ directory is under git version control. So if you go to /etc and run "git log" it should give you a list of all the times that it has saved the settings in /etc. Hopefull you have an idea of when you broke it so you own't need to go too far back... These can be reverted using git commands. TBH I'm not quite sure of the best approach if you go that way but I would think that "git checkout <commit> <directory-or-file>" will probably be what you'll want. There is tons of info on using git online that you'll find with google so I suggest doing some homework before you start...

Add new comment