There are two available options to run GeneXus Next Desktop locally:
Both options run in containers and store each Knowledge Base (KB) in an MDF file.
Containers provide two ways to access the MDF file:
1. Accessing a physical directory on the host (Bind Mount).
2. Accessing a volume defined in the container (Volume).
By default, when a KB is created, GeneXus Next Desktop creates the MDF file within the host where GeneXus Next Desktop is installed and accesses it by mounting the contents of that MDF (Bind Mount).
Using configuration files, it is possible to specify that GeneXus Next Desktop store the KBs in a Volume and mount them from there.
With a Bind Mount, you can access the KB directory on the host where the Genexus Next Desktop container is installed. In contrast, a Volume stores the KB (and the database of the generated application) in a container Volume, which requires tools to access that information.
The advantages and disadvantages of using Bind Mount or Volume are described below.
-
Advantages:
- Direct access to the KB directory on the host.
- Ability to view the generated code and access logs.
- Enables configuration changes (for example, copying a config.gx file to the KB directory or editing an existing one).
- Simplifies operations such as deleting temporary files or backing up the working copy.
-
Disadvantages:
- May reduce performance because it depends on the host file system.
-
Advantages:
- Better performance in I/O operations.
- Keeps all data self-contained within the container, making it easy to delete everything when removing containers.
- Leaves no traces on the host, simplifying overall management.
-
Disadvantages:
- Accessing logs and configuration can be less straightforward, as it requires entering the container.
The following table shows, for each GeneXus Next Desktop option, where the KBs are stored by default, and where and how the configuration files are located to change this behavior.
| |
Windows |
Mac |
Mac Intel |
| Default Directory KB (*) |
%UserProfile%\GeneXus\data\kbs |
~/GeneXus/data/kbs |
~/GeneXus/data/kbs |
| Default Directory DB |
%UserProfile%\GeneXus\data\mssql |
~/GeneXus/data/mssql |
~/GeneXus/data/mssql |
| KB Path property (**) |
/app/kbs/KB_NAME |
/app/kbs/KB_NAME |
/app/kbs/KB_NAME |
| Change PATH --> config.json |
%UserProfile%\.genexus\GeneXus Next |
~/.genexus/GeneXus Next |
~/.genexus/GeneXus Next |
| BIND MOUNT (default) |
Without config or
GX_VOLUMES_BASE_PATH="c:\\Dev\\GXnextVols" |
Without config or
GX_VOLUMES_BASE_PATH=~/GeneXus/data/kbs |
GX_VOLUMES_BASE_PATH= |
| VOLUME |
GX_VOLUMES_BASE_PATH= |
GX_VOLUMES_BASE_PATH="" |
GX_VOLUMES_BASE_PATH= |
(*) ~/GeneXus/data/kbs means GeneXus folder installed + data/kbs. By default /users/USER/GeneXus.
(**) /app means Folder where GeneXus Next Desktop is installed.
To configure where GeneXus Next Desktop stores the KB, create a file named config.json in the GeneXus Next Desktop installation directory, usefull <User>\.genexus\GeneXus Next, with the following content:
{
"bl": {
"env": {
"GX_VOLUMES_BASE_PATH": "c:\\Dev\\GXnextVols"
}
}
}
Note: In Windows environments, you must use double backslashes (\\) for escaping.
| |
All OS |
| Default Directory KB |
{install}\data\kbs |
| Default Directory DB |
{install}\data\mssql |
| KB PATH Property Value |
/app/kbs/KB_NAME |
| Change Path -> published.user.env |
GX_VOLUMES_BASE_PATH= |
| BIND MOUNT |
GX_VOLUMES_BASE_PATH=C:\GENEXUS\Next\KBs |
| VOLUME |
GX_VOLUMES_BASE_PATH= |
To configure where GeneXus Next Desktop stores the KB, create a file named published.user.env in the GeneXus Next Desktop installation directory. Use the existing file named published.env as a base, and then edit it with the specific values you need.
The KB path is managed through the global variable GX_VOLUMES_BASE_PATH. In the published.env file, it is configured as follows:
GX_VOLUMES_BASE_PATH =.
For example, you can create the published.user.env file by indicating either a physical directory or a Volume as follows:
GX_VOLUMES_BASE_PATH =C:\GENEXUS\Next\KBs
This creates a KB under the folder C:\GENEXUS\Next\KBs\data\kbs\KBWebBind1
-
By default, KBs are created on the host.
-
When using GeneXus Desktop through a browser (localhost): Under <Repository_Path>\datakbs
-
When using GeneXus Desktop Native Application: Under %UserProfile%\GeneXus\data\kbs
In both cases, you can indicate a specific directory in the configuration files (config.json or published.user.env).
-
To create the KB in a Volume, configure either the config.json or published.user.env file with GX_VOLUMES_BASE_PATH="". This will create a Volume named kbs_data.
Use the docker cp command to move KBs between the host and containers:
docker cp <Source> <Destination>
Where <Source> and <Destination> are physical paths or a ContainerName:/localPath
For example, the Volume created in the genexus-gxms-1 container is copied to the disk with the command:
docker cp genexus-gxms-1:/app/kbs/KBWebBind1 KBsFromVolume/KBWebBind1
Another example could be copying a KB from the host to a Volume.
To do this, you must first create a volume with the command:
docker volume create <Volume_Name>
Then, copy the existing KB with the command:
docker cp KBsFromVolume/KBWebBind1 <Volume_Name>:/app/kbs/KBWebBind1
-
If you have a KB created with GeneXus Desktop used through a browser (localhost) and you want to open it with GeneXus Next Desktop Native Application: Copy the KB from the host to a Volume so that it appears in the Start Page list.
-
Opening KBs from previous versions (V18) is not recommended.
Frequently Asked Questions (FAQ)
-
Can I configure which mechanism to use? Currently, this can only be done through config.json or published.user.env.
-
Can a KB created on another GeneXus Next Desktop execution option be opened? Yes. Copy the KB to the KB directory of the other GeneXus Next Desktop so that it appears in the Start Page list.
-
Should I use a Docker Volume or the same container? You cannot use the same container, as the KB must persist and containers are recreated with each new version.
-
Can I use SQL on the host for a KB in Volume? Yes.
-
Which KBs appear on GeneXus Next Desktop? When GeneXus Next Desktop is run through a browser (localhost), only KBs created using it appear, and the same applies when using GeneXus Desktop Native Applications. You can configure GX_VOLUMES_BASE_PATH in each desktop to use the same directory.