diff --git a/source/administration.rst b/source/administration.rst
index 41552fb5658a4a397f646438b3fc15d3fb7ce943..854951da70534439968b9ec25270c50647560dd4 100644
--- a/source/administration.rst
+++ b/source/administration.rst
@@ -142,12 +142,15 @@ To add a new library:
       |opacinfo|
 
    -  IP: this field does not have be filled in unless you plan on limiting
-      access to the staff interface to a specific IP address
+      access to the staff interface to a specific IP address or range of IP
+      addresses.
 
-      .. Warning::
+      .. Note::
 
-         An IP address is required if you have enabled
-         :ref:`AutoLocation <AutoLocation-label>`
+         Library IP addresses and ranges are used by the
+         :ref:`StaffLoginLibraryBasedOnIP <staffloginlibrarybasedonip-label>`
+         and the :ref:`StaffLoginRestrictLibraryByIP <staffloginrestrictlibrarybyip-label>`
+         system preferences.
 
    -  MARC organization code: if this library has a specific
       `MARC organization code <http://www.loc.gov/marc/organizations/orgshome.html>`_,
diff --git a/source/administrationpreferences.rst b/source/administrationpreferences.rst
index b53079a378a69517e593fd958ebfa8b641a70d66..d436500d2962a700c28eb284ee60c0d66f836099 100644
--- a/source/administrationpreferences.rst
+++ b/source/administrationpreferences.rst
@@ -549,6 +549,11 @@ These preferences are related to logging into your Koha system
 AutoLocation
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+.. Attention::
+
+   As of Koha version 24.05, this system preference has been renamed
+   :ref:`StaffLoginRestrictLibraryByIP <staffloginrestrictlibrarybyip-label>`.
+
 Default: Don't require
 
 Asks: \_\_\_ staff to log in from a computer in the IP address range
@@ -728,6 +733,109 @@ Description:
 -  This system preference allows administrators to choose what format session
    data is stored in during web sessions.
 
+.. _staffloginlibrarybasedonip-label:
+
+StaffLoginLibraryBasedOnIP
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. Admonition:: Version
+
+   This system preference was added to Koha in version 24.05.
+
+Asks: Set logged in library for staff by matching their current IP to the
+:ref:`library configuration <libraries-label>`: \_\_\_.
+
+Values:
+
+-  No
+
+-  Yes
+
+Default: Yes
+
+Description:
+
+-  This system preference is used to detect which library a staff member
+   :ref:`logs into <login-staff-label>` based on their IP address.
+
+-  It is a security feature to prevent staff from logging into another library
+   or from logging in from outside (such as from home or from a bookstore).
+
+-  The library's IP address or IP address range must be set in the
+   :ref:`library administration <libraries-label>` for this system preference to
+   have any effect.
+
+.. Important::
+
+   This system preference will be overridden by the
+   :ref:`StaffLoginRestrictLibraryByIP <staffloginrestrictlibrarybyip-label>`
+   system preference.
+
+.. Note::
+
+   If IP addresses or range overlap, the first found match will be used. In the
+   event of multiple libraries with matching IP addresses or ranges, the
+   library code (branchcode) will be the tie breaker (alphabetically).
+
+.. _staffloginrestrictlibrarybyip-label:
+
+StaffLoginRestrictLibraryByIP
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. Admonition:: Version
+
+   This system preference has replaced the
+   :ref:`AutoLocation <autolocation-label>` system preference as of Koha
+   version 24.05.
+
+Asks: Limit the libraries staff can select at login to those where their
+computer's IP address is within the library's specified range or to libraries
+without an IP restriction: \_\_\_
+
+Values:
+
+-  No
+
+-  Yes
+
+Default: No
+
+Description:
+
+-  This system preference is used to limit which library or libraries staff can
+   :ref:`log into <login-staff-label>` based on their IP address.
+
+-  It is a security feature to prevent staff from logging into another library
+   or from logging in from outside (such as from home or from a bookstore).
+
+-  The library's IP address or IP address range must be set in the
+   :ref:`library administration <libraries-label>` for this system preference to
+   have any effect.
+
+   -  If a library does not have an IP address or IP address range filled in,
+      it will not be restricted and will always be available to select.
+
+.. Note::
+
+   Staff can only choose their library at login if they have the
+   :ref:`loggedinlibrary permission <permission-loggedinlibrary-label>`.
+
+   If they do not have that permission, they will only be able to log into
+   their home library. If this system preference is enabled, they will only be
+   able to log in if their computer's IP matches their home library's IP address
+   or IP address range, or if their home library doesn't have an IP address set.
+
+.. Important::
+
+   This system preference will override the
+   :ref:`StaffLoginLibraryBasedOnIP <staffloginlibrarybasedonip-label>` system
+   preference.
+
+.. Note::
+
+   In the event of multiple libraries with matching IPs, the library code
+   (branchcode) will be the tie breaker (alphabetically).
+
 .. _timeout-label:
 
 timeout
diff --git a/source/installation.rst b/source/installation.rst
index 2cfaa9fef63dd5836608413abb410b07c694d985..080fa2be4c43d1196d6ac767a5109d9f1c48fb3e 100644
--- a/source/installation.rst
+++ b/source/installation.rst
@@ -483,6 +483,12 @@ You have now finished using the onboarding tool and can log into the staff inter
       the :ref:`superlibrarian permission <permission-superlibrarian-label>`)
       will be able to log into a library different from their home library.
 
+   .. Note::
+
+      The :ref:`StaffLoginLibraryBasedOnIP <staffloginlibrarybasedonip-label>`
+      and :ref:`StaffLoginRestrictLibraryByIP <staffloginrestrictlibrarybyip-label>`
+      system preferences can limit which library you can log into.
+
 4. Click the *login* button to access the staff interface
 
 For example:
diff --git a/source/whatsnew.rst b/source/whatsnew.rst
index 923e01787afa2c1ad07c110ff65cdeaaef7d277a..4bef57ee941b869d7ae8b93d220d0feb82107264 100644
--- a/source/whatsnew.rst
+++ b/source/whatsnew.rst
@@ -274,6 +274,19 @@ path to that file needed to be specified in the koha-conf.xml file. With the
 system preference, the options can be updated without the need for a system
 administrator to change the file.
 
+**StaffLoginLibraryBasedOnIP**
+
+The new :ref:`StaffLoginLibraryBasedOnIP <staffloginlibrarybasedonip-label>`
+system preference can be used to determine which library staff log into when
+accessing the staff interface, based on their computer's IP address.
+
+**StaffLoginRestrictLibraryByIP**
+
+The :ref:`StaffLoginRestrictLibraryByIP <StaffLoginRestrictLibraryByIP>`
+system preference replaces the AutoLocation system preference. It is used to
+determine which libraries a staff member can choose to log into when accessing
+the staff interface.
+
 **WaitingNotifyAtCheckout**
 
 The new :ref:`WaitingNotifyAtCheckout <waitingnotifyatcheckout-label>`