Switch to: V12V11V10V9V8V7V6V5

Valentina Server Docker Documentation

Valentina Server docker images are available in the Paradigma Software repository on the Docker Hub.

The image is available for the following architectures, appropriate tags are conatined in the parentheses:

  • 64-bit Linux (lin_64)
  • 32-bit ARM Linux (lin_arm_32)
  • 64-bit Windows (win_64)

The latest tag is a combination of these architectures. Docker engine chooses the most appropriate architecture automatically unless it is specified by the user.

You can use this image on macOS, Windows and Linux systems.

How to use this image

Start the Valentina Server instance

By default, the Valentina Server listens for connections on the following ports:

  • 15432 - Valentina
  • 15434 - Valentina SSL
  • 15532 - SQLite
  • 15534 - SQLite SSL

In order to connect outside the container, it is necessary to publish them passing appropriate -p arguments to docker run command.

Starting the Valentina Server instance:

$ docker run --name some-vserver -d \
    -p 15432 \
    -p 15434 \
    -p 15532 \
    -p 15534 \ 
paradigmasoft/valentina-server

… where some-vserver is the name you want to assign to your container

We didn’t specify an explicit mapping so the Docker engine assigns random ports for published ports.

In order to get the list of assigned ports, it is necessary to execute the following command:

$ docker port some-vserver

It returns a result in the following format:

15432/tcp -> 0.0.0.0:32771
15434/tcp -> 0.0.0.0:32770
15532/tcp -> 0.0.0.0:32769
15534/tcp -> 0.0.0.0:32768

You can use this information to establish a connection.

Note, the ports may be reassigned upon restart, so you may want to specify the port mapping manually:

$ docker run --name some-vserver -d \
    -p 25432:15432 \
    -p 25434:15434 \
    -p 25532:15532 \
    -p 25534:15534 \ 
paradigmasoft/valentina-server

Alternatively, you can use the Kitematic application to create and manage your containers visually. Unlike the command line utility, Kitematic publishes these ports automatically.

Connect to Valentina Server from the Valentina Studio

Valentina Studio Connect Dialog

Use Connect to… button on the start page, select Valentina Server and input the following parameters:

  • host = 127.0.0.1 or localhost
  • port = <port mapped to 15432>
  • user = sa
  • password = sa

Make sure to uncheck the Use Notifications option as it requires a few extra steps that will be described later.

To connect to Valentina SQLite Server, select SQLite Server as the target and input the following parameters:

  • host = 127.0.0.1 or localhost
  • port = <port mapped to 15532>
  • user = sa
  • password = sa

Adding a license

Without a license, the Valentina Server allows only one simultaneous connection. You need to get a FREE license with 5 Valentina DB, 10 SQLite, and 10 REST connections or purchase a license with more connections at Paradigma Store.

You can read more about the licenses here.

The license filename can have the following formats:

  • For Linux system - license_lin_dddddd
  • For Windows system - license_win_dddddd
  • Universal embedded - license_emb_dddddd

By default, the licenses are stored in the following folders of container:

  • On Linux - /opt/VServer/licenses
  • On Windows - /VServer/licenses

Note: the defaults can be changed using the LicenseCatalog option of the INI file.

Once you’ve received your license file you can pass it to the Valentina Server. There are a few ways to do it:

  • Mount the licenses folder of the host system
  • Upload the license using the Valentina Studio
  • Copy the license to the container using Docker cp command

After the start, a license will be applied.

Mount the licenses folder

Download the license to some empty folder on your host system (e.g. /VSERVER_DATA/licenses).

Now you can mount this folder to the licenses folder of container:

$ docker run --name some-vserver -d \
    --mount type=bind,source=/VSERVER_DATA/licenses,target=/opt/VServer/licenses \
paradigmasoft/valentina-server

Alternatively, you can mount an individual license:

$ docker run --name some-vserver -d \
    --mount type=bind,source=/VSERVER_DATA/licenses/license_lin_dddddd,target=/opt/VServer/licenses/license_lin_dddddd \
paradigmasoft/valentina-server

For Windows container, the licenses should be mounted to /VServer/licenses folder.

This way is recommended for production environments, also it is easier to update containers which store licenses on the host.

Upload the license using the Valentina Studio

Connect to the Valentina Server.

There are three ways to upload a license:

  1. Drag the license file to the connection
  2. In the context menu of connection click Upload License… and select the license file.

Valentina Server Connection Menu

  1. Start the Server Admin from the Tools submenu of the application/main menu and switch to the Licenses tab. Use Upload… button and select the license file or drag the license to the list.]

Copy the license to container

A license can be easily added using the docker cp command. Just go to the directory with license on the host system and execute:

  • For Linux container:
$ docker cp license_lin_dddddd some_vserver:/opt/VServer/licenses
  • For Windows container:
$ docker cp license_win_dddddd some_vserver:/VServer/licenses

Make sure to restart the container after adding a license.

Using Valentina Server configuration file

Valentina Server configuration is defined in the INI file.

By default, it is stored in the container at the following path: /opt/VServer/vserver.ini.

You may need to adjust the configuration to your needs, for example, to enable REST interface.

This file can be modified in different ways: * Manually in the text editor. * Using Valentina Studio - in the properties of the connection or in the Server Admin. * Using Valentina ADK - with SQL query or API call. * Executing SQL query to modify the property via the Valentina Server REST interface.

Like the licenses, you can mount your INI file from the host system. Just place your adjusted configuration in /VSERVER_DATA folder and use the following command:

$ docker run -d --name some-vserver \
    -p 25432:15432 \
    -p 25532:15532 \
    --mount type=bind,source=/VSERVER_DATA/vserver.ini,target=/opt/VServer/vserver.ini \
paradigmasoft/valentina-server

Upgrade and configuration are very simple with this technique.

Where to store Valentina Server data

By default, the Valentina Server data (databases, projects, licenses, configuration) is kept inside the container. This is fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers. Also, the upgrade procedure is complicated, as it involves copying data between containers of different versions.

The better way is to create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container. This places the database files and projects in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly. The upgrade procedure is very simple in this case.

Databases and projects are stored in the following folders: * /opt/VServer/databases * /opt/VServer/sqlite_databases * /opt/VServer/projects

Create appropriate directories on the host system: * /VSERVER_DATA/databases * /VSERVER_DATA/sqlite_databases * /VSERVER_DATA/projects

Start your Valentina Server container like this:

$ docker run -d --name some-vserver \
    -p 25432:15432 \
    -p 25532:15532 \ 
    --mount type=bind,source=/VSERVER_DATA/databases,target=/opt/VServer/databases \
    --mount type=bind,source=/VSERVER_DATA/projects,target=/opt/VServer/projects \
    --mount type=bind,source=/VSERVER_DATA/sqlite_databases,target=/opt/VServer/sqlite_databases \
paradigmasoft/valentina-server

And if you keep licenses outside the container:

$ docker run -d --name some-vserver \
    -p 25432:15432 \
    -p 25532:15532 \ 
    --mount type=bind,source=/VSERVER_DATA/licenses,target=/opt/VServer/licenses \
    --mount type=bind,source=/VSERVER_DATA/databases,target=/opt/VServer/databases \
    --mount type=bind,source=/VSERVER_DATA/projects,target=/opt/VServer/projects \
    --mount type=bind,source=/VSERVER_DATA/sqlite_databases,target=/opt/VServer/sqlite_databases \
paradigmasoft/valentina-server

If you decided to store the INI file on the host system this command will look like:

$ docker run -d --name some-vserver \
    -p 25432:15432 \
    -p 25532:15532 \
    --mount type=bind,source=/VSERVER_DATA/vserver.ini,target=/opt/VServer/vserver.ini \
    --mount type=bind,source=/VSERVER_DATA/licenses,target=/opt/VServer/licenses \
    --mount type=bind,source=/VSERVER_DATA/databases,target=/opt/VServer/databases \
    --mount type=bind,source=/VSERVER_DATA/projects,target=/opt/VServer/projects \
    --mount type=bind,source=/VSERVER_DATA/sqlite_databases,target=/opt/VServer/sqlite_databases \
paradigmasoft/valentina-server

With such setup, an upgrade procedure consists of two steps – remove an old container and create a new one.

Connect to Valentina Server from the Valentina ADK

You can access Valentina Server using native libraries/plugins in lots of APIs/IDEs available for Linux, macOS and Windows:

  • C/C++
  • Objective-C (macOS)
  • Objective-C (iOS)
  • COM (Windows)
  • Java
  • LiveCode (Revolution)
  • .NET (Windows)
  • PHP
  • Ruby
  • Xojo (REALbasic)

Each of the ADKs implements VConnection class which accepts connection parameters:

Constructor(    
    inHost as String, 
    inUserName as String, 
    inUserPassword as String, 
    inPort as Integer = 15432,
    inTimeOut as Integer = 5,
    inOptions as String = "" ) 

… where

  • inHost - The IP-address or DNS name of the host.
  • inUserName - The user name (sa by default).
  • inUserPassword - The user password (sa by default).
  • inPort - The port forwarded to the Valentina Server container.
  • inTimeOut - TimeOut in seconds to wait for a Server response.
  • inOptions - A string of additional options.

This connection is used both for Valentina and SQLite databases.

More info about ADKs you can find here.