AlistGo/alist · error

SaveStrmLocalPath is required

Error message

SaveStrmLocalPath is required

What it means

The Strm driver validates that when 'SaveStrmToLocal' is enabled, a destination directory ('SaveStrmLocalPath') must also be configured, because the feature writes generated .strm files into that local folder. Enabling the toggle without a target path is a half-finished configuration and Init aborts.

Source

Thrown at drivers/strm/driver.go:45

	downloadExtSet   map[string]struct{}
	normalizedMode   string
	normalizedPrefix string
}

func (d *Strm) Config() driver.Config {
	return config
}

func (d *Strm) GetAddition() driver.Additional {
	return &d.Addition
}

func (d *Strm) Init(ctx context.Context) error {
	if strings.TrimSpace(d.Paths) == "" {
		return errors.New("paths is required")
	}
	if d.SaveStrmToLocal && strings.TrimSpace(d.SaveStrmLocalPath) == "" {
		return errors.New("SaveStrmLocalPath is required")
	}

	d.aliases = parseAliases(d.Paths)
	if len(d.aliases) == 0 {
		return errors.New("no valid path mapping found")
	}

	d.autoFlatten = len(d.aliases) == 1
	d.singleRootKey = ""
	if d.autoFlatten {
		for k := range d.aliases {
			d.singleRootKey = k
		}
	}

	d.mediaExtSet = parseExtSet(defaultIfEmpty(d.FilterFileTypes, defaultMediaExt))
	d.downloadExtSet = parseExtSet(defaultIfEmpty(d.DownloadFileTypes, defaultDownloadExt))
	d.normalizedPrefix = normalizePrefix(defaultIfEmpty(d.PathPrefix, "/d"))

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Set SaveStrmLocalPath to an absolute directory the alist process can write to (e.g. /config/strm)
  2. Or disable SaveStrmLocalStorage if local .strm export is not needed
  3. Verify the directory exists and has write permission after saving
Defensive patterns

Strategy: validation

Validate before calling

if addition.SaveStrmToLocal && strings.TrimSpace(addition.SaveStrmLocalPath) == "" {
    return errors.New("SaveStrmLocalPath is required when SaveStrmToLocal is enabled")
}

Prevention

When it happens

Trigger: Addition with SaveStrmLocalStorage=true (or however the flag serializes) and SaveStrmLocalPath empty/whitespace.

Common situations: User toggles 'save strm to local' in the UI but misses the new path input that appears; Path field cleared during a config edit and re-saved; Relative path consisting only of spaces pasted in

Related errors


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