Files
wekan/docs/Features/Login-Page/Forgot-Password.md
T
Lauri Ojansivu 0b5c855820 Snap backup and restore instructions work on AlmaLinux, Rocky Linux and Fedora.
snapd keeps the snaps in /var/lib/snapd/snap on Fedora, RHEL, AlmaLinux,
Rocky Linux, CentOS Stream and Arch Linux, which have no /snap, so the
instructions that exported /snap/wekan/current/bin and its lib directory
did not find mongodump and mongorestore there. They now pick the directory
with one S= line and the CPU's library directory with $(uname -m), and the
scripts that can be run from a host shell find the snap in either place.

Thanks to Group-Deed and xet7 !
2026-10-30 23:13:50 +02:00

5.7 KiB

Snap

a) Wekan Snap

S=/snap; [ -d /snap/wekan ] || S=/var/lib/snapd/snap
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH-}:$S/wekan/current/lib/$(uname -m)-linux-gnu"
export PATH="$PATH:$S/wekan/current/bin"
mongo --port 27019

If you have disabled new user registration at Admin Panel, you can enable it, and create new user your https://wekan.example.com/sign-up :

db.settings.update({},{$set: {"disableRegistration":false}})

Find what users there are:

db.users.find()

Set some user as admin:

db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})

Check are there any failed logins with wrong password, that brute force login prevention has denied login:

db.AccountsLockout.Connections.find()

If there are, delete all those login preventions:

db.AccountsLockout.Connections.deleteMany({})

Then exit:

exit

Then login to Wekan and change any users passwords at Admin Panel / People / People.

b) Wekan Gantt GPL Snap

S=/snap; [ -d /snap/wekan-gantt-gpl ] || S=/var/lib/snapd/snap
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH-}:$S/wekan-gantt-gpl/current/lib/$(uname -m)-linux-gnu"
export PATH="$PATH:$S/wekan-gantt-gpl/current/bin"
mongo --port 27019

If you have disabled new user registration at Admin Panel, you can enable it, and create new user your https://wekan.example.com/sign-up :

db.settings.update({},{$set: {"disableRegistration":false}})

Find what users there are:

db.users.find()

Set some user as admin:

db.users.updateOne({username:'admin-username-here'},{$set:{isAdmin:true}})

Check are there any failed logins with wrong password, that brute force login prevention has denied login:

db.AccountsLockout.Connections.find()

If there are, delete all those login preventions:

db.AccountsLockout.Connections.deleteMany({})

Then exit:

exit

Then login to Wekan and change any users passwords at Admin Panel / People / People.

c) Use DBGate or Nosqlbooster to edit wekan database users table to have admin true:

Set user as BoardAdmin on all boards user is member of

Source

db.boards.updateMany(
{ members: { $elemMatch: { userId: “USER-ID-HERE”, isAdmin: false } } },
{
$set: { “members.$.isAdmin”: true },
}
);

Docker

  1. Change to inside of wekan database Docker container:
docker exec -it wekan-db bash
  1. Start MongoDB Shell
/bin/mongosh
  1. List databases
show dbs
  1. Change to wekan database
use wekan
  1. Show collections/tables
show collections
  1. Count users
db.users.count()
  1. If you have disabled new user registration at Admin Panel, you can enable it, and create new user your https://wekan.example.com/sign-up :
db.settings.update({},{$set: {"disableRegistration":false}})
  1. Find what users there are:
db.users.find()
  1. Set some user as admin:
db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})
  1. Check are there any failed logins with wrong password, that brute force login prevention has denied login:
db.AccountsLockout.Connections.find()
  1. If there are, delete all those login preventions:
db.AccountsLockout.Connections.deleteMany({})
  1. Then exit:
exit
  1. Then login to Wekan and change any users passwords at Admin Panel / People / People.

More info:


OLD INFO BELOW:

  1. Download Robo 3T on your Linux or Mac computer. Or, using ssh shell to server, login to MongoDB database using mongo cli

  2. Make SSH tunnel to your server, from your local port 9000 (or any other) to server MongoDB port 27019:

ssh -L 9000:localhost:27019 user@example.com
  1. Open Robo 3T, create new connection: Name, address: localhost : 9000

a) If you don't have self-registration disabled, register new account at /sign-up, and make yourself admin in MongoDB database:

  1. Use database that has wekan data, for example:
use wekan
  1. Add Admin rights to some Wekan username:
db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})

b) If someone else remembers their password, and his/her login works, copy their bcrypt hashed password to your password using Robo 3T.

c) Install Wekan elsewhere, create new user, copy bcrypt hashed password to your password.

d) Backup, New install, Create User, Copy Password, Restore:

  1. Backup Snap
  2. stop wekan sudo snap stop wekan.wekan 3a. Empty database by dropping wekan database in Mongo 3T 3b. Empty database in mongo cli:
mongo --port 27019

Look what databases there are:

show dbs

Probably database is called wekan, so use it:

use wekan

Delete database:

db.dropDatabase()
  1. Start wekan:
sudo snap stop wekan.wekan
  1. Register at /sign-up
  2. Copy bcrypt hashed password to text editor
  3. Restore your backup
  4. Change to database your new bcrypt password.

Don't have Admin Rights to board

  1. In Robo 3T, find where your ID that your username has:
db.getCollection('users').find({username: "YOUR-USERNAME-HERE"})
  1. Find board where you are not admin, using user ID you found above:
db.getCollection('boards').find({members: {$elemMatch: { userId: "YOUR-USER-ID-HERE", isAdmin: false} } })

And set yourself as admin.