AlistGo/alist · error

library password not configured

Error message

library password not configured

What it means

Returned by the Seafile driver when it needs to read an encrypted library but the storage configuration has no library password set (d.RepoPwd == ""). Seafile encrypts encrypted libraries client-side, so the driver must submit a per-library password before the API will return readable content; without it, decryption of any encrypted library fails fast.

Source

Thrown at drivers/seafile/util.go:142

			name = fmt.Sprintf("%s (%d)", name, index)
		}
		if _, exist := libraryMap[name]; exist {
			putLibraryMap(library, index+1)
		} else {
			libraryInfo := LibraryInfo{}
			data, _ := utils.Json.Marshal(library)
			_ = utils.Json.Unmarshal(data, &libraryInfo)
			libraryMap[name] = &libraryInfo
		}
	}
	for _, library := range resp {
		putLibraryMap(library, 0)
	}
	d.libraryMap = libraryMap
	return resp, nil
}

var repoPwdNotConfigured = errors.New("library password not configured")
var repoPwdIncorrect = errors.New("library password is incorrect")

func (d *Seafile) decryptLibrary(repo *LibraryInfo) (err error) {
	if !repo.Encrypted {
		return nil
	}
	if d.RepoPwd == "" {
		return repoPwdNotConfigured
	}
	now := time.Now()
	decryptedTime := repo.decryptedTime
	if repo.decryptedSuccess {
		if now.Sub(decryptedTime).Minutes() <= 30 {
			return nil
		}
	} else {
		if now.Sub(decryptedTime).Seconds() <= 10 {
			return repoPwdIncorrect

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Open the storage settings and set the Seafile library password (RepoPwd) matching the encrypted library
  2. If multiple encrypted libraries with different passwords exist, note the driver supports only one password — encrypt them with the same password or remove the extra encrypted libraries
  3. Verify the password by decrypting the library in the Seafile web UI with the same credential
Defensive patterns

Strategy: validation

Validate before calling

// before mounting, check for encrypted libraries without a password
libs, _ := seafileDriver.ListLibraries()
for _, l := range libs {
    if l.Encrypted && strings.TrimSpace(driverAddition.RepoPwd) == "" {
        return fmt.Errorf("library %s is encrypted: set the library password in storage settings", l.Name)
    }
}

Type guard

func needsPassword(l LibraryInfo) bool { return l.Encrypted }

Try / catch

err := d.List(ctx, dir, args)
if err != nil && strings.Contains(err.Error(), "library password not configured") {
    return fmt.Errorf("seafile library %q is encrypted — configure its password in the storage addition", dir.GetPath())
}

Prevention

When it happens

Trigger: Mounting a Seafile storage whose account contains at least one library with Encrypted=true, while the driver addition field 'library password' (RepoPwd) is empty. First List/Get on that library calls decryptLibrary and hits the guard.

Common situations: Freshly added Seafile storage where only username/password were filled in; password field lost after re-saving the storage config; multi-library accounts where one library was later encrypted on the server.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/c0d0244cc9f99a2a. Report an issue: GitHub.