---
updatedAt: 2026-04-16T20:30:12.000Z
agentTools:
  projectIndex: https://snipe-it.readme.io/llms.txt
---

# LDAP Sync

> ❗️ Large LDAP Directories
>
> In your `.env` file, you may need to modify the `LDAP_MEM_LIM` (expressed as '500M' for 500MB) and/or the `LDAP_TIME_LIM` (expressed in seconds) in order to avoid a large LDAP sync from timing out or exhausting all memory.
>
> The default time limit is 10 minutes. The default memory limit is 500MB.

You can set up a cron to automatically sync LDAP users using the following:

```
# Run an LDAP sync with optional location name or location ID, and optionally output a summary
$ php artisan snipeit:ldap-sync {--location=} {--location_id=} {--summary}
```

`location` and `location_id` are optional.

So for example, if you know the location\_id of the location you're trying to add the users to, you could use:

```
# Run an LDAP sync for location ID 1 with a summary
$ php artisan snipeit:ldap-sync --location_id=1 --summary
```

Or if you know the name of the location, you could use:

```
# Run an LDAP sync the location named Lisbon with a summary
$ php artisan snipeit:ldap-sync --location=Lisbon --summary
```

See the [full documentation on LDAP Syncing](https://snipe-it.readme.io/docs/ldap-sync-login) for more information.

> 📘 For Hosted Snipe-IT Customers
>
> If you need to set up an LDAP sync cron job on the hosted platform, just shoot us an email at <support@snipeitapp.com> and we'll get you sorted. :)

<br />