No WEB UI or How to reset zynthian to default [SOLVED!]

Hi.

Today I Installed new copy of zynthian image. And aftes 10 minutes I am without WEB configuration interface.

Last thing I changed was something like Repository, section UI -> MP3player.

I really don’t know what this is - I just experimented, But now, web UI isn’t working.

There are zero informations in documentation, even in forum, what exactly this “Repository” means. (Of course, repository is repository, I mean in Zynthian point of view. For Example: “MP3_Player” :slight_smile: ).

And secondary question: Is there any script to reset Zynthian to default??

Thanks.

I tried to found repository config in zynthian_envars.sh file, but there is nothing about repos.

I was forced to clean install. Is there another way, for next-time?

You accidentally switched to a git development branch for the Zynthian UI and will only change the version of the Zynthian User Interface.
This should not have affected the webconfig.

You probably experimented further and also changed the webconfig to another development branch, which may have led to a non-working webconfig.

The easiest way to change these branches back to the default “master” is from the webconfig,
but if that fails, you can switch back using the console.

From a computer:

ssh -lroot zynthian.local
(enter password)

cd /zynthian/zynthian-webconf/
systemctl stop zynthian-webconf
git checkout master
systemctl start zynthian-webconf
exit

and you should be back in business.

But I am sure (99.5% :wink: ) ) I changed only UI. I kept the WEB UI as a lifeline in its unchanged form. But, you know, I am only a human.

Thank you.

You’re right!

That zynthian-ui branch interferes with the webconfig service.
Very weird, as they are seperate directories. But well, development branch…
I experienced the same issue after I stopped the webconfig service.
While I was able to restart it (all from master) zynthian sent a “connection refused” on the webconfig.
Moving back the zynthian ui branch from mp3player back to master solved this issue.

So in your case this should have worked:
ssh -lroot zynthian.local
(enter password)

cd /zynthian/zynthian-ui/
systemctl stop zynthian
git checkout master
systemctl start zynthian
exit

And please tell me where the settings are stored? In what file?

What settings do you refer to?
The active checked-out branches on the Zynthian from the respective git repositories on github?

These active branches are changed/queried by git by a command like above.

I mean the “Repository” settings, which I accidentally changed in this case. There must be a config file.

These lines/script will snap back all branches back to the default master branch from the console:

cd /zynthian/zynthian-webconf/
systemctl stop zynthian-webconf
git checkout master
systemctl start zynthian-webconf
cd /zynthian/zynthian-ui/
systemctl stop zynthian
git checkout master
systemctl start zynthian
cd /zynthian/zynthian-sys/
git checkout master
cd /zynthian/zynthian-data/
git checkout master
cd /zynthian/zyncoder/
git checkout master

save it in a file on the zynthian if you like, and as long as you’ll be able to ssh to the zynthian you can revert all repositories back to their default master branch.

Then, experiment in safety :slight_smile:

1 Like

There is no config file, it’s an active git branch.
Technically the active git branch is stored in the respective git repositories, in a file but you really should’nt go there.

Change to the respective git repo in /zynthian/
To select a development branch: git checkout branchname
To revert to default master branch: git checkout master

I understand. It is directly downloaded after Save button applied in web UI.

PS: Your previous post should be stored as /zynthian/restore-to-default.sh script :slight_smile:

It was the reason why I named this topic this way. Searching the forum had no answer for me.

Many thanks!

1 Like

@jofemodo maybe a script to this effect can be stored on the zynthian to facilitate easier recovery and encourage more experimentation with the development branches.

2 Likes

Exactly! Good night :wink:

Webconf uses some libraries from UI, so if you change, for instance, to an older UI version with an older library not compatible with current webconf, you will get a broken webconf.
In fact, it’s my fault, because i should delete this older versions that are not useful never more.

Anyway, this should work and would fix your problem :wink:

Regards,

Yes, please, open an issue on the tracker for creating a script that reset all repositories to master.

Thanks!

2 Likes

And again: is there any way to reset zynthian to default state? I mean reset all configs like on first boot.

1 Like

I’d also like to know how to reset the configuration of my Zynthian - I set up a password for access to the WEB UI but now I’ve forgotten it - I can ssh in, but I don’t know what the Web UI password is any more, so is it possible to just reset the config to default factory settings, or is there some better way to reset the WEB UI password?

Do you have different passwords for SSH and the webconf? (BTW, webconf is our name for the web UI.) In my experience the SSH password is also the webconf password.

Alright, so that was indeed the confusion, because we’d changed our root password, like anyone sensible adding a Unix machine to their network, and not realised its importance to webconf …

So the answer to ‘how to reset the configuration to default’ is: flash the SD card again.

Also, dunno if the root password being key to the web interface is such a great idea. Frankly, it smells.

We have had this conversation a few times. Those of us with *nix backgrounds find this uncomfortable but Zynthian is a musical instrument which wants to be as accessible as possible. Using root account is a pragmatic solution to many issues, not least enabling progress of core functionality without developers being hindered by security constraints or need for *nix security knowledge. I personally would have it different but I’m not going to hinder the good work of making this beast better by insisting it complies with my infosec preferences. :grin:

1 Like