I had a gateway (installed via deb package) on my raspberry pi 4, with which I created my account.
Now, I am changing over to a docker container (on the same pi 4).
The welcome screen offers me to register a new account or skip. When trying my existing details with “create”, it rightfully replies that the account is already created. But if I skip, it creates a local account which I can’t seem able to connect to my webthings tunnel account.
I can then log out, but logging in again only connects me to my local account! Frustrating. I don’t understand how to break this chicken and egg situation.
Or starting from another fresh docker (and fresh client, cookies deleted), entering a dummy account after skipping the domain creation, logging out, then trying my tunnel account details, it says “username or password was incorrect”.
So there is something wrong with the welcome screen. There should be a way to login to an existing domain and account on a fresh install.
I managed to connect to my existing account by replacing the db.sqlite3 in the .webthings/config directory with my old one, and skipping the creation screen.
But that is way too much voodoo for a regular user who might want to change gateways (or say an SD card gets bricked in a raspberry pi and you do not have a backup of that db.sqlite3 file, what then?).
There has been talk on this forum how “backup” and “restore” works. The solution was to simply copy the entire mozilla IOT folder, which includes the sqlite db too. All addons and configuration would be backed-up. This folder (volume) is the one you created using the -v command in the docker command.
Sorry about the lack of details, but if you search for backup you should be able to read the related discussion.
Also not sure if there are any other issues since your changing from a local to docker install.
Also: I run on a rpi 2b+ and use a good USB thumb drive that’s auto-mounted using /etc/fstab on boot. This is where I store my persistent GW folder. Hopefully, this will avoid SD card write issues.
Now that I think about it, it’s EOY and time to make new image backups of important OS disks and folders such as this…
Thanks Eric, all valid and helpful arguments (as a side I have switched from an SD card to an SSD).
However my main point is that the sign-in process should be more straight-forward. That said the reason it is not so straight forward for me might have something to do with the same reason why my stunnel fails to connect.
Actually, I did upgrade to whatever Pi (4) firmware was cutting edge a few days ago and it worked, twice. I must be lucky with my drives (for once - one brand new cheap one, one old one) or I just made it before the update - but thank you for the warning, I’ll know where to look if I hit a wall in that respect.
The only WebThings user accounts are the local accounts you create with a username and password on the gateway itself. The email address you provide to associate with a subdomain registration is completely separate and is not a user account as such.
If you enter an email address and subdomain which match an existing subdomain registration during first time setup, the UI should give the option to re-claim your subdomain by clicking a link to send a unique token to your email address. If you were not given this option, is it possible that you used a different email address to one you used when you first registered the subdomain?
It sounds like you solved the problem in the end, but for future reference it shouldn’t be necessary to manually copy over your database in order to keep using the same subdomain on a fresh install.
Thank you Ben,
That did not seem to be an option for me though.
Then I got into a muddle because I copied the database but not the ssl certificates. I’ll remember to either do both or neither. But like i say do neither did not seem to work at all for me.