CourseLit
  • Introduction
  • Getting started
    • Using Ansible [Deprecated]
  • Authoring
    • Rich Text Editing
    • Media
  • Administration
    • Managing Users
    • Layout And Themes
    • Backup and Restore
    • Recovery
Powered by GitBook
On this page
  • Recovering the Database User
  • Something's Not Clear?

Was this helpful?

  1. Administration

Recovery

Learn how to recover the existing installation of CourseLit

PreviousBackup and Restore

Last updated 4 years ago

Was this helpful?

It may happen that you lose access to the passwords etc. that you provided to the installer. This will stop you from installing the updates.

Under the hood, CourseLit uses MongoDB as the database to store user created content (except external files like images, videos, PDFs etc.).

When you install CourseLit for the very first time, it sets up an admin user in order to enable authentication on the MongoDB server. This is for securing the database server.

The application uses this admin user to securely connect to the database. If on the subsequent maintenance, you provide a different user name or password, the application will fail to connect to the existing database.

Recovering the Database User

Step 1. Log into your server.

Step 2. Start a new MongoDB instance with authorisation disabled, which accesses the MongoDB files from the last installation.

# /path/to/last/installation/media/folder should be the value which you specified while
# setting up CourseLit for the first time. The default value is ~/courselit-data.
docker run -p 27017:27017 -v /path/to/last/installation/media/folder/mongo/data/db:/data/db mongo

Step 3. Start a new session.

Step 4. Get the list of the admin users.

db = db.getSiblingDB('admin')
db.getUsers()

Step 5. Reset the password of the admin user.

db.changeUserPassword("admin_user_from_step_5", "NEWPASSWORD")

Step 6. Re-run the installer with these new settings.

Don't forget to save these details now :)

Something's Not Clear?

Come chat with us in our .

Mongo shell
official Discord channel