# System requirements

You install a self-hosted instance of Tonic Textual on either:

* A VM or server that runs Linux and on which you have superuser access.
* A local machine that runs Mac, Windows, or Linux.

## **Application server or cluster requirements**

At minimum, we recommend that the server or cluster that you deploy Textual to has access to the following resources:

* Nvidia GPU, 16GB GPU RAM. We recommend at least 6GB GPU RAM for each `textual-ml` worker.

If you only use a CPU and not a GPU, then we recommend an M5.2xLarge. However, without GPU, performance is significantly slower.

## **GPU considerations**

The number of words per second that Textual processes depends on many factors, including:

* The hardware that runs the `textual-ml` container
* The number of workers that are assigned to the `textual-ml` container
* The auxiliary model, if any, that is used in the `textual-ml` container.

To optimize the throughput of and the cost to use Textual, we recommend that the `textual-ml` container runs on modern hardware with GPU compute. If you use AWS, we recommend a [g5 instance](https://aws.amazon.com/ec2/instance-types/g5/) with 1 GPU.

## Application database <a href="#sys-req-app-db" id="sys-req-app-db"></a>

The Textual application database is a PostgreSQL database that stores the dataset and Textual configuration. If you did not [configure an S3 bucket](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/textual-config-pipeline-upload) to store files that you upload into a dataset, then the application database also contains those uploaded files.

### External database server <a href="#app-db-external-server" id="app-db-external-server"></a>

The Textual application database is an external database that is hosted on a separate server.

For the PostgreSQL server, we recommend a minimum of an RDS t3.small on AWS, with at least 2GB RAM, 2 vCPU, and 100 GB of storage.

To prevent the loss of Textual metadata, keep regular backups of the PostgreSQL instance.

### PostgreSQL version <a href="#app-db-postgresql-version" id="app-db-postgresql-version"></a>

For the Textual application database, the current minimum supported version is PostgreSQL 14+.

You should keep your PostgreSQL version relatively up-to-date with the current PostgreSQL LTS.

Tonic.ai might periodically conduct a campaign to request updates of self-hosted PostgreSQL instances before a scheduled update in the minimum supported version.

### Database user permissions <a href="#app-db-user-perms" id="app-db-user-perms"></a>

The user credentials that you provide to Textual for the application database must have permission to create tables, insert, and select.

## **Setting up Nvidia GPU for Textual**

To use GPU resources:

* Ensure that the [correct Nvidia drivers](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html) are installed for your instance.
* If you use Kubernetes to deploy Textual, follow the instructions in the [NVIDIA GPU operator documentation](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/index.html).

  \
  If you use Minikube, then use the instructions in [Using NVIDIA GPUs with Minikube](https://minikube.sigs.k8s.io/docs/tutorials/nvidia/).
* If you use Docker Compose to deploy Textual, follow [these steps to install the nvidia-container-runtime](https://docs.docker.com/config/containers/resource_constraints/#gpu').
