Mass user import

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x): AIO 32.0.4
  • Operating system and version (e.g., Ubuntu 24.04): Debian 12
  • Web server and version (e.g, Apache 2.4.25): ?
  • Reverse proxy and version _(e.g. nginx 1.27.2): n/a
  • PHP version (e.g, 8.3): 8.3.29
  • Is this the first time you’ve seen this error? (Yes / No): yes
  • When did this problem seem to first start? first try
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.): AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No): No

Summary of the issue you are facing:

I’m looking for a method to import a batch of users and tried to use the nc-userimporter script, as it worked fine for me with a previous instance on NC.

However, I stumbled upon many issues and I’m not sure I still can use the script with the most recent releases:

  • The script documentation stipulates that I need to install all required dependencies first, so I started a shell into the nextcloud-aio-nextcloud container and tried to install those dependencies.
  • The command `python -m pip install --user requests` is rejected as Python says there’s “No module named pip”.
  • I then tried to install pip but the command `python -m ensurepip --upgrade` returns an error “error: externally-managed-environment”.
  • I finally tried to run the script without any dependency (`python3 nc-userimporter.py`) and… it obviously fails because of the missing dependencies! :man_shrugging:

Hence the point above: I don’t really know if nc-userimporter is still valid with AIO 32.0.4. If not, is there any alternative? I don’t want to create 250+ users manually…

Thanks in advance for any help!

From the looks of it nc-userimporter uses the Nextcloud Provisioning API. So it doesn’t benefit at all from being on the server itself.

Just install it on a workstation or whatever that has connectivity to the Nextcloud instance.