Skip to content

Bug: 'internxt login' does not persist config/session in non-interactive Docker environment #389

@syprix

Description

@syprix

Describe the bug
The internxt login command successfully authenticates when run non-interactively (e.g., via a startup script in Docker using environment variables for credentials), but it fails to create or update the configuration file (config.json or similar) in the expected persistent location (/config mapped via -v and using XDG_CONFIG_HOME=/config). This results in the login being lost upon container restart. The manual, interactive internxt login via docker exec also reports success but fails to save the configuration persistently.

To Reproduce
Steps to reproduce the behavior:

  1. Build a Docker container based on debian:bullseye with nodejs and @internxt/cli@1.5.6 installed.
  2. Map a host volume to /config inside the container and set ENV XDG_CONFIG_HOME=/config.
  3. Run the container with INTERNXT_EMAIL and INTERNXT_PASSWORD environment variables set.
  4. Execute a startup script that runs internxt login --email "$INTERNXT_EMAIL" --password "$INTERNXT_PASSWORD".
  5. Observe the logs: Login reports success (Succesfully logged in to: ...).
  6. Check the content of the /config directory (or /config/internxt): It remains empty.
  7. Restart the container: The startup script detects no stored login token.

Expected behavior
After a successful non-interactive or interactive internxt login, the config.json (or equivalent session file) containing the authToken should be reliably created/updated within the directory specified by XDG_CONFIG_HOME.

Actual behavior
Login reports success, but no configuration file is created or updated in the persistent /config volume. The login state is lost on restart.

Environment:

  • OS: Unraid (Docker Host)
  • Docker Base Image: debian:bullseye
  • internxt-cli version: 1.5.6 (installed via npm install -g @internxt/cli@~1.5.6)
  • Node.js version: v18

Additional context
We have built a custom Unraid Docker template attempting to provide a stable WebDAV server. The full setup can be seen here: https://github.com/syprix/unraid-internxt-cli/tree/main
Extensive troubleshooting confirmed network connectivity (ping, SSL cert check) is working correctly. The core issue seems to be the login command's failure to persist its state.

We initially attempted to use the latest version (1.5.7) but encountered a different bug where the webdav enable command failed with Error: Nonexistent flags: --host, --port, which led us to use version 1.5.6. The login persistence issue exists in 1.5.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions