This page is part of the [[Getting Started]] Section. It gives some insight into the configuration of BaseX.
==Configuration Files==
BaseX maintains some configuration files, which are stored in the project’s [[#Home Directory|Home Directory]]:
* <code>.basex</code> contains all options that are relevant for running the server or standalone versions of BaseX.
* <code>.basexgui</code> defines all options relevant to the BaseX GUI.
* <code>.basexhistory</code> contains commands that have been typed in most recently.
* An empty <code>.basexhome</code> file can be added to a directory to mark it as [[#Home Directory|home directory]].
Note that:
* Depending on your OS and configuration, files and folders with a '.' prefix may be hidden.
* In the [[Web Application]] context, options can be defined in the <code>web.xml</code> file.
==Home Directory==
As BaseX is a portable application distributed in different flavors, and as it may be started from different locations, it searches for the location of the dynamically determines its home directory by itself.<br />: There are three opportunities for * First, the home '''Java system property''' {{Code|org.basex.path}} is checked. If it contains a value, it is chosen as directory:path.*Users home directory: In standard case If not, the users home '''current user directory is chosen to store ''' (defined by the BaseX configuration and database files in itsystem property {{Code|user. So dir}}) is selected if you didn't change anything, all the BaseX files can be {{Code|.basex}} or {{Code|.basexhome}} file is found in this locationdirectory.*Working directory: This If not, the '''application directory ''' (the folder in which BaseX is located) is chosen if configuration one of these two files of BaseX are is found in itthat directory. So move * In all other cases, a {{Code|basex}} subdirectory in the configuration files to the working directory if you want to have it as '''user home directory''' will be returned.*Application directory: This The user home directory is chosen retrieved via the {{Code|HOME}} environment variable, or (if configuration files of unassigned) the Java system property {{Code|user.home}}. If BaseX are found is used in an embedded environment (such as a servlet in the application a [[Web Application]]), it may not immediately be clear which directorywas picked. This is especially for people using You can run the windows installer of BaseXXQuery expression <code>Q{java:org.basex.util.Prop}HOMEDIR()</code> to find out.
==Database Directory==
A database in BaseX [[Databases]] consists of several binary files, which . These are all bundled located in a folder with directory named by the database name.<br />All of these files are stored in a <code>BaseXData</code> directory in the home directorydatabase. <br />The path can be changed in the following ways:*[[GUI Tutorialdatabase root directory is named {{Code|GUI]]: Choose ''Options'' → ''Preferences'' and choose a new database pathdata}}.*[[Server Tutorial|Server]]/[[Standalone Tutorial|Standalone]]: <code>SET DBPATH [path]</code>
NoteThe database path can be changed as follows: After having changed the * GUI: Choose ''Options'' → ''Preferences'' and choose a new database path, all existing databases have to be manually moved to .* General: edit the {{Option|DBPATH}} option in the new location{{Code|.basex}} configuration file
'''Note:''' Existing databases will not automatically be moved to the new destination. ==Configuration Log Files== Log files are stored in text format in a <code>.logs</code> subdirectory of the database folder (see [[Logging]] for more information). =Changelog= ;Version 9.0 * Updated: Detection and configuration of home directory and subdirectories.
BaseX uses three configuration files, which are stored in the [[Configuration Files#Home directory|Home Directory]](note that, depending on your OS and configuration, files and folders with a ';Version 8.' prefix may be hidden):0
* <code>Updated: {{Code|.basex</code> contains all options that basexperm}} is obsolete. Users are relevant for running the server or standalone versions of BaseXnow stored in {{Code|users.* <code>.basexgui</code> defines all options relevant to xml}} in the BaseX GUI.* <code>.basexperm</code> contains user name, passwords, and permissionsdatabase directory (see [[User Management]] for more information).
==User and Log Files==The global users are stored in the <code>.basexperm</code> file in the home directory as the configuration files. Local users and permissions are stored in the meta data of the database, so they don't need an extra file. <br />All log files are stored in text format in the home directory <code>BaseXData/.logs</code>;Version 7.7
* Updated: The {{Code|.basexhome}} file marks a folder as [[Category: Internal#Home Directory|home directory]].