Deploying in a VM manually
NOTE: It is recommended to utilize PostgreSQL as the key-value and blob storage driver for simple on-premise NucliaDB installations. This doc will not describe how to install PosgreSQL; however, it will assume you have it installed somewhere to reference through configs.
Configuration is best done through environment variables. The bare minimum configuration variables for a PostgreSQL-only setup are:
DATA_PATH=/mnt/data
: Path to mounted persistent disk to store indexes onDRIVER=pg
: Configure NucliaDB with PostgreSQL for metadata storageDRIVER_PG_URL=postgresql://postgres:password@HOSTNAME:5432/postgres
: PostgreSQL connection stringFILE_BACKEND=pg
: Configure NucliaDB with PostgreSQL blob storageNUA_API_KEY=<API_KEY_VALUE>
: Nuclia Understanding API Key
Full list of configuration options
Supported VM OS Types:
- Debian/Ubuntu
- Fedora/RHEL
Install manually with Python
Install:
curl https://raw.githubusercontent.com/nuclia/nucliadb/main/scripts/install-vm.sh | sudo bash
This will install NucliaDB into the /opt/nucliadb
folder.
The nucliadb
command will now be installed globally.
To run:
nucliadb
Run NucliaDB as a systemd service
To run NucliaDB automatically as a service (in systems running systemd) you can
just use the nucliadb.service
unit installed by the installation script above.
It reads the configuration from /etc/default/nucliadb
, so adjust any configuration needed
in that file.
Then, enable and start nucliadb service:
systemctl enable nucliadb.service
systemctl start nucliadb.service
Finally, validate it's status and view it's logs with:
systemctl status nucliadb.service
journalctl -u nucliadb.service
Upgrade NucliaDB
In order to upgrade NucliaDB if installes with this method, you can run:
/usr/bin/upgrade-nucliadb
This script will take care of stopping the services, updating to the latest version and restarting the services.
To upgrade to a specific version, you can run:
/usr/bin/upgrade-nucliadb 2.42.0.post168
Visit PyPI for the list of available versions: https://pypi.org/project/nucliadb/
Run with Docker
You can also run with docker inside a VM. We recommend the installation instructions provided by docker: https://docs.docker.com/engine/install/ubuntu/
Then, use the regular docker command to run it:
docker run -it \
-p 8080:8080 \
-v nucliadb-standalone:/data \
-e NUA_API_KEY=MY_KEY \
-e DRIVER=PG \
-e FILE_BACKEND=PG \
-e DRIVER_PG_URL=postgresql://postgres:password@HOSTNAME:5432/postgres \
nuclia/nucliadb:latest