Use the AlloyDB Omni CLI to confirm that your Linux machine is ready to install
AlloyDB Omni:
sudoalloydbsystem-check
If needed, modify your system until the output of the system-check
command returns a successful check.
Optional: To create a new disk partition for
AlloyDB Omni to use for data storage, we recommend that you
use an ext4 file system for optimal performance.
To create an ext4 file system, use the following command:
Replace DATA_DIR with the directory on your local file system
where you want AlloyDB Omni to store its data, metadata,
and configuration files. AlloyDB Omni tries to create
this directory if it doesn't already exist. If you don't specify this
value, then AlloyDB Omni defaults to
/var/alloydb/main/.
To have AlloyDB Omni listen for connections on a TCP port
other than the default 5432, include the --pg-port
flag:
DATA_DIR: the directory on your local file system
where you want AlloyDB Omni to store its data, metadata,
and configuration files. AlloyDB Omni tries to create
this directory if it doesn't already exist. If you don't specify this
value, then AlloyDB Omni defaults to
/var/alloydb/main/.
SOURCE_IP: the IP address of the primary
AlloyDB Omni instance to replicate from.
SOURCE_PORT: the TCP port of the primary
AlloyDB Omni instance to replicate from. If you don't
provide this value, then AlloyDB Omni applies a default
value of 5432.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis document guides you through downloading, installing, and connecting to AlloyDB Omni, with a quick start option available for Debian or Ubuntu.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB Omni supports Debian, Ubuntu, and RHEL operating systems, requiring a minimum of 2 CPUs, 2 GB of RAM, and 20 GB of storage.\u003c/p\u003e\n"],["\u003cp\u003eYou can optimize data storage by creating a new disk partition with an \u003ccode\u003eext4\u003c/code\u003e file system, and configuring the AlloyDB Omni server as either a primary instance or a read replica.\u003c/p\u003e\n"],["\u003cp\u003eThe installation process includes verifying the Linux machine's readiness with the \u003ccode\u003esystem-check\u003c/code\u003e command and installing the server software, with options to specify the data directory and TCP port.\u003c/p\u003e\n"],["\u003cp\u003eConnecting to AlloyDB Omni is done using \u003ccode\u003epsql\u003c/code\u003e after installing the software, allowing for interaction with the database server.\u003c/p\u003e\n"]]],[],null,["# Customize your AlloyDB Omni installation\n\nSelect a documentation version: 15.5.2keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/install)\n- [16.8.0](/alloydb/omni/16.8.0/docs/install)\n- [16.3.0](/alloydb/omni/16.3.0/docs/install)\n- [15.12.0](/alloydb/omni/15.12.0/docs/install)\n- [15.7.1](/alloydb/omni/15.7.1/docs/install)\n- [15.7.0](/alloydb/omni/15.7.0/docs/install)\n- [15.5.5](/alloydb/omni/15.5.5/docs/install)\n- [15.5.4](/alloydb/omni/15.5.4/docs/install)\n- [15.5.2](/alloydb/omni/15.5.2/docs/install)\n\n\u003cbr /\u003e\n\n| **Note:** Your use of AlloyDB Omni is subject to the agreement between you and Google that governs Google Cloud offerings. If you do not have a Google Cloud account, or have not otherwise entered into an agreement with Google that governs Google Cloud offerings, please do not proceed or download this software until you have done so. To create a Google Cloud account, see [the Google Cloud homepage](/docs/get-started).\n\n\u003cbr /\u003e\n\nThis page shows you how to download, install, and connect to\n[AlloyDB Omni](/alloydb/omni/15.5.2/docs). To get started quickly\nwith AlloyDB Omni using the default configuration, see\n[Install AlloyDB Omni on Debian or Ubuntu](/alloydb/omni/15.5.2/docs/quickstart).\n\nIn this document, you also learn how to do the following:\n\n- Create a new disk partition to optimize data storage.\n- Configure your server.\n- Ensure compatibility with Debian, Ubuntu, and RHEL.\n\nBefore you begin\n----------------\n\n#### System requirements\n\n### Debian\n\n- A virtual or physical machine running a Debian-based OS, such as Debian or Ubuntu.\n- A minimum of 2 CPUs, with x86/AMD64 architecture.\n- A minimum of 2 GB of RAM. For optimal performance, we recommend allocating 8 GB of RAM for each CPU.\n- At least 20 GB of available storage.\n- Unrestricted root access within the OS.\n- Docker version 20.10 or higher.\n- Linux kernel version 4.18 or higher. We recommend kernel version 5.3 or higher for best performance.\n- Linux cgroup v2 enabled. By default, cgroup v2 is enabled on most modern Linux systems. To\n check whether cgroup v2 is enabled, run\n `stat -fc %T /sys/fs/cgroup/` in a shell.\n If cgroup v2 is enabled, the command output shows `cgroup2fs`.\n\n- If you want to integrate with Vertex AI, then you need\n the [Google Cloud CLI](/sdk/docs/install) available in your\n environment.\n\n- To install AlloyDB Omni on a cloud platform, we recommend using the following instance types:\n - On Google Cloud, we recommend `n2-highmem` instances.\n - On Amazon Web Services, we recommend `R6i` instances.\n - On Microsoft Azure, we recommend `Ebsv5` instances.\n- We recommend that you use a dedicated SSD storage device for storing your data. If you use a physical device for this purpose, we recommend attaching it directly to the host machine.\n\n### RHEL\n\n- A virtual or physical machine running a Red Hat Enterprise Linux (RHEL) version 8 or later. To let the automatic memory management features of AlloyDB Omni work, use RHEL version 9 or later.\n- A minimum of 2 CPUs, with x86/AMD64 architecture.\n- A minimum of 2 GB of RAM. For optimal performance, we recommend allocating 8 GB of RAM for each CPU.\n- At least 20 GB of available storage.\n- Unrestricted root access within the OS.\n- Docker version 20.10 or higher.\n- Linux kernel version 4.18 or higher. We recommend kernel version 5.3 or higher for best performance.\n- Linux cgroup v2 enabled. By default, cgroup v2 is enabled on most modern Linux systems. To\n check whether cgroup v2 is enabled, run\n `stat -fc %T /sys/fs/cgroup/` in a shell.\n If cgroup v2 is enabled, the command output shows `cgroup2fs`.\n\n- If you want to integrate with Vertex AI, then you need\n the [Google Cloud CLI](/sdk/docs/install) available in your\n environment.\n\n- To install AlloyDB Omni on a cloud platform, we recommend using the following instance types:\n - On Google Cloud, we recommend `n2-highmem` instances.\n - On Amazon Web Services, we recommend `R6i` instances.\n - On Microsoft Azure, we recommend `Ebsv5` instances.\n- We recommend that you use a dedicated SSD storage device for storing your data. If you use a physical device for this purpose, we recommend attaching it directly to the host machine.\n\nDownload and install AlloyDB Omni\n---------------------------------\n\n| **Note:** To install the latest version of AlloyDB Omni, see [Customize your AlloyDB Omni installation](/alloydb/docs/omni/install).\n\n1. [Install the AlloyDB Omni CLI](/alloydb/omni/15.5.2/docs/omni-cli#install-debian).\n\n2. Use the AlloyDB Omni CLI to confirm that your Linux machine is ready to install\n AlloyDB Omni:\n\n sudo alloydb system-check\n\n If needed, modify your system until the output of the `system-check`\n command returns a successful check.\n3. Optional: To create a new disk partition for\n AlloyDB Omni to use for data storage, we recommend that you\n use an `ext4` file system for optimal performance.\n\n 1. To create an `ext4` file system, use the following command:\n\n mkfs.ext4 -m 1 -F \"$disk_path\"\n\n 2. To mount your disk, use the following command:\n\n mount --make-shared -o noatime,discard,errors=panic \"$disk_path\" \"$disk_mountpoint\"\n\n4. Install the server software using one of the following options:\n\n | **Note:** To install AlloyDB Omni with machine learning (ML) functions enabled, including the ability to query large language models (LLMs), see [Install AlloyDB Omni with AlloyDB AI](/alloydb/omni/15.5.2/docs/install-with-alloydb-ai).\n - To configure the server as a primary instance, run the following command:\n\n sudo alloydb database-server install --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e)\n\n Replace \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e with the directory on your local file system\n where you want AlloyDB Omni to store its data, metadata,\n and configuration files. AlloyDB Omni tries to create\n this directory if it doesn't already exist. If you don't specify this\n value, then AlloyDB Omni defaults to\n `/var/alloydb/main/`.\n\n To have AlloyDB Omni listen for connections on a TCP port\n other than the default `5432`, include the `--pg-port`\n flag: \n\n sudo alloydb database-server install \\\n --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e) \\\n --pg-port=\u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e with the TCP port that you want\n AlloyDB Omni to accept connections on.\n - To configure the server as a read replica, include the `--replica-source-ip`\n and `--replica-source-port` flags:\n\n sudo alloydb database-server install \\\n --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e) \\\n --replica-source-ip=\u003cvar translate=\"no\"\u003eSOURCE_IP\u003c/var\u003e \\\n --replica-source-port=\u003cvar translate=\"no\"\u003eSOURCE_PORT\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e: the directory on your local file system\n where you want AlloyDB Omni to store its data, metadata,\n and configuration files. AlloyDB Omni tries to create\n this directory if it doesn't already exist. If you don't specify this\n value, then AlloyDB Omni defaults to\n `/var/alloydb/main/`.\n\n - \u003cvar translate=\"no\"\u003eSOURCE_IP\u003c/var\u003e: the IP address of the primary\n AlloyDB Omni instance to replicate from.\n\n - \u003cvar translate=\"no\"\u003eSOURCE_PORT\u003c/var\u003e: the TCP port of the primary\n AlloyDB Omni instance to replicate from. If you don't\n provide this value, then AlloyDB Omni applies a default\n value of `5432`.\n\n For more information on AlloyDB Omni read replicas, see\n [Create a read-only replica](/alloydb/omni/15.5.2/docs/set-up-read-replica).\n5. If your system runs Red Hat Enterprise Linux, then update the\n `/usr/lib/tuned/virtual-guest/tuned.conf` file with the following:\n\n vm.swappiness=1\n\nConnect to and use the database server\n--------------------------------------\n\nConnect to AlloyDB Omni using `psql`: \n\n sudo docker exec -it pg-service psql -h localhost -U postgres\n\nThe terminal window displays `psql` login text that ends with a\n`postgres=#` prompt."]]