Logged into your DocSpace from another device, but then forgot to log out? You can manually close a specific active session.
The list of active connections is available only for your profile, and only connections of your profile can be logged out.
Closing a particular session
- Click the icon next to your name in the lower left corner and select the Profile option or just click your name.
- On the My profile page, find the Active Sessions section. You will see the list of all your active connections which contains the following data: operating system, browser, date and time, IP address. In the SaaS version, the country and city are also displayed.
- Find the needed connection and click on the
icon located on the right.
- Click Log out to confirm the action.
The selected connection will be stopped and excluded from the list.
Closing all active connections
- Click the icon next to your name in the lower left corner and select the Profile option or just click your name.
- On the My profile page, find the Active Sessions section.
- Click the Log out from all active sessions option.
- The Log out from all active connections window will appear:
- For more security, you can check the Change password after logging out box.
- Click the Log out button.
All connection excepting the current one will be stopped and excluded from the list. If you checked the Change password after logging out option, you will be logged out from all connections and prompted to create a new password. After creating a new password, you will need to enter your credentials to log in to your DocSpace.
Enabling location detection for the server version
If you are using the server version, location detection is not available by default. To enable this feature, please follow the steps below.
Chapter 1
To determine the location by IP address, you need to fill in the `dbip_lookup`
table with data in the database.
The table has a specific data format.
To display location in the Active connections section, it's necessary to fill in the following columns:
`addr_type`
- the type of the IP address.
`ip_start`
- the beginning of the IP addresses range.
`ip_end`
- the end of the IP addresses range.
`country`
- the country code in the ISO-3166-alpha2 format.
`city`
- the locality name.
The type of the IP address has two possible values: "ipv4" or "ipv6".
The IP addresses range is specified in an extended format containing empty positions:
- "127.0.0.1" must be extended to "127.000.000.001";
- "::1" must be extended to "0000:0000:0000:0000:0000:0000:0000:0001".
The country code is specified as a two-letter abbreviation (e.g., "AU", "US", "JP", etc.) The "ZZ" value is ignored (Unknown or unspecified country).
Chapter 2
The data for filling in the `dbip_lookup`
table can be taken anywhere.
Following the instructions from Chapter 1, you can add records to the table in any accessible and convenient way.
There are a lot of services which provide information on the geolocation of IP addresses. Most of these services allow to download information in the .csv format.
As an example, we will use the https://db-ip.com/ service.
Download the free base in the .csv format. Use the following command replacing {year}
and {month}
with the current year/month, e.g. 2022
and 08
:
wget https://download.db-ip.com/free/dbip-city-lite-{year}-{month}.csv.gz
Unpack the archive. Use the following command replacing {year}
and {month}
with the current year/month, e.g. 2022
and 08
:
gzip -dk dbip-city-lite-{year}-{month}.csv.gz
Chapter 3
Enabling location detection on Windows
Use the PHP utility to import the source data from the .csv file to the `dbip_lookup`
table in the database.
The source code of the utility can be found here.
Launch the utility specifying the path to the csv file and access to the database:
C:\PHP\php.exe -f "C:\dbip-phpsrc-4.0\import.php" -- -f "C:\dbip-phpsrc-4.0\dbip-city-lite-2024-10.csv" -d city-lite -b onlyoffice -t dbip_lookup -u root -p root
If you are using a hostname other than localhost or a custom port, change the connection string in the import.php file.
To run the utility, it's necessary to enable drivers in PHP for working with MySQL PDO and substring. Follow the instructions below on Windows:
- Download: https://windows.php.net/download/
- Install: https://www.sitepoint.com/how-to-install-php-on-windows/#installingphp
- Make changes for running: https://www.php.net/manual/en/install.windows.commandline.php
To enable additional drivers in PHP, remove the semicolon from the following lines in the php.ini
file:
extension=mbstring
extension=pdo_mysql
After running the utility, data should appear in the `dbip_lookup`
table and location detection in DocSpace should work.
Enabling location detection on Linux
- Install the required packages:
sudo yum install mysql-client wget php php-mbstring php-mysql
In the command above, yum
is used, which is intended for RPM-based systems. On DEB-based systems, use apt-get
instead.
-
Download the free base:
wget https://download.db-ip.com/free/dbip-city-lite-2024-10.csv.gz
-
Download the update utility:
wget https://download.db-ip.com/free/dbip-phpsrc-4.0.tgz
-
Unpack the archives:
tar -xvf dbip-phpsrc-4.0.tgz
gunzip dbip-city-lite-2024-10.csv.gz
-
For the Docker version, edit the
import.php
utility in the source folder:
vi import.php
Specify 127.0.0.1 as a host, 33060 as a port.
$db = new PDO("mysql:host=127.0.0.1;port=33060;dbname={$dbname};charset=utf8mb4", $username, $password);
-
Run the update utility:
/import.php -f ../dbip-city-lite-2024-10.csv -d city-lite -b docspace -t dbip_lookup -u <user> -p <password>