Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Daemon Setup

Tentris comes with a systemd template service unit; this means it can be installed as a service on most linux distributions (e.g., Debian, Ubuntu, Fedora, etc.).

Installing Tentris also installs the systemd service.

Example

Given a service with the name: example.

  • The systemd service is called tentris@example.service
  • The configuration file for the service is located at /etc/tentris.d/example.toml
  • The license file for the service should either be placed at /etc/tentris-license.toml, or it can be specified in the service's configuration file (at /etc/tentris.d/example.toml)
  • The data directory of the service is specified in its configuration file (at /etc/tentris.d/example.toml)

Configuration File

First, the service's configuration file needs to be created. The service's configuration file will be located at /etc/tentris.d/example.toml, if it does not exist, create it by copying /etc/tentris.d/default.toml. Take care to change the datastore-path in the newly created configuration file. Conventionally, the service's data directory should be at /var/local/tentris/example, but you are free to choose a different path.

Database initialization

If you want to start with an empty database, use the init command as follows. Take care to specify the appropriate configuration file.

sudo tentris --config /etc/tentris.d/example.toml init

If instead of starting from scratch, you want to serve an existing dataset, use the load command as follows. Again, take care to specify the appropriate configuration file.

sudo tentris --config /etc/tentris.d/example.toml load < path/to/dataset.nt

Starting the Service

After the configuration and data directories have been set up, the service can be started with the following command.

sudo systemctl start tentris@example

More information about how to use systemd/systemctl can be found here.

Accessing the logs

To access the logs of a Tentris service, you may use journalctl.

sudo journalctl -u tentris@example