The arguments to docker run are the ones used in earlier versions of AlloyDB Omni, but you may further customize them. See Customize your AlloyDB Omni installation for details.
If your database instance type is PRIMARY, run the following command to create the following users. These are usernames which are unused at the moment, but reserved for future extensions.
fornameinalloydbagentalloydbexportalloydbiamgroupuseralloydbiamuseralloydbimportexportalloydbobservabilityalloydbsqllogicalalloydbsuperuser;doechodockerexec-itCONTAINER_NAMEpsql-hlocalhost-Upostgresalloydbadmin\-c"CREATE ROLE ${name} NOLOGIN;"\-c"CREATE TABLE ${name}_table();"\-c"ALTER TABLE ${name}_table OWNER TO ${name};"done
[[["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-25 UTC."],[[["\u003cp\u003eAlloyDB Omni version 15.5.4 and later versions are managed using standard package-management tools, marking a shift from previous management methods.\u003c/p\u003e\n"],["\u003cp\u003eExisting AlloyDB Omni installations must first be upgraded to version 15.5.2 before proceeding with the single-image installation.\u003c/p\u003e\n"],["\u003cp\u003eThe in-place upgrade process involves stopping the existing database, running a new single-image container using Docker, and mounting the existing data directory.\u003c/p\u003e\n"],["\u003cp\u003eAfter upgrading, the AlloyDB Omni CLI should be uninstalled as it is no longer used to manage the new version.\u003c/p\u003e\n"],["\u003cp\u003eYou may need to create specific users and set up AlloyDB AI after upgrading, depending on your instance type and whether AI is enabled.\u003c/p\u003e\n"]]],[],null,["# Migrate from AlloyDB Omni version 15.5.2 and earlier to the latest version\n\nSelect a documentation version: 15.5.4keyboard_arrow_down\n\n- [15.7.0](/alloydb/omni/15.7.0/docs/migrate-to-latest-version)\n- [15.5.5](/alloydb/omni/15.5.5/docs/migrate-to-latest-version)\n- [15.5.4](/alloydb/omni/15.5.4/docs/migrate-to-latest-version)\n\n\u003cbr /\u003e\n\nStarting with AlloyDB Omni 15.5.4, you control AlloyDB Omni with common package-management tools.\n\n\u003cbr /\u003e\n\nIf you have an existing installation of AlloyDB Omni, follow the instructions on this page to migrate to the new, single-image installation.\n\nPrerequisites\n-------------\n\nBefore you can start upgrading to the latest version of AlloyDB Omni, complete the following prerequisites, if you haven't done so already.\n\n### Upgrade to AlloyDB Omni 15.5.2\n\nThe latest AlloyDB Omni version that supports the AlloyDB Omni CLI is 15.5.2.\nTo check the version of AlloyDB Omni, run the following command: \n\n sudo alloydb version\n\nThe output looks similar to the following: \n\n AlloyDB Omni CLI version: 1.6\n AlloyDB Omni database server version: 15.5.2\n\nIf the output displays a database version earlier than 15.5.2, run the following command to upgrade: \n\n sudo alloydb database-server upgrade\n\n### Gather information about your existing installation\n\n1. Run the following command:\n\n cat /var/alloydb/config/dataplane.conf\n\n2. From the output of the `cat` command, note the values of the following variables for your reference:\n\n - \u003cvar translate=\"no\"\u003eDATADIR_PATH\u003c/var\u003e---for example, `/var/alloydb/main`\n - \u003cvar translate=\"no\"\u003eENABLE_ALLOYDB_AI\u003c/var\u003e---for example, `FALSE`\n - \u003cvar translate=\"no\"\u003ePGPORT\u003c/var\u003e---for example, `5432`\n - \u003cvar translate=\"no\"\u003eINSTANCE_TYPE\u003c/var\u003e---for example, `PRIMARY/READ_REPLICA`\n\nPerform an in-place upgrade\n---------------------------\n\n1. Stop the existing database:\n\n sudo alloydb database-server stop\n\n2. Start the new single-image AlloyDB Omni, mounting your existing data directory from before:\n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003ePASSWORD\u003c/var\u003e \\\n -e PGDATA=/var/lib/postgresql/data \\\n -v /var/alloydb/main/data:/var/lib/postgresql/data \\\n -v /dev/shm:/dev/shm \\\n -p \u003cvar translate=\"no\"\u003ePGPORT\u003c/var\u003e:5432 \\\n --network=host \\\n --ulimit=nice=-20:-20 \\\n --ulimit=core=-1:-1 \\\n --log-driver=journald \\\n -d google/alloydbomni:15.5.4\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e: The name to assign this new AlloyDB Omni container in your host machine's container registry---for example, `my-omni`.\n\n - \u003cvar translate=\"no\"\u003ePASSWORD\u003c/var\u003e: The password assigned the new container's `postgres` user after its creation.\n\n - \u003cvar translate=\"no\"\u003ePGPORT\u003c/var\u003e: The IP address of the port the AlloyDB Omni runs on. This is the value you noted down in step 2 of [Gather information about your existing installation](#gather-information).\n\n The arguments to `docker run` are the ones used in earlier versions of AlloyDB Omni, but you may further customize them. See [Customize your AlloyDB Omni installation](/alloydb/omni/15.5.4/docs/install) for details.\n3. If your database instance type is `PRIMARY`, run the following command to create the following users. These are usernames which are unused at the moment, but reserved for future extensions.\n\n for name in alloydbagent alloydbexport alloydbiamgroupuser alloydbiamuser alloydbimportexport alloydbobservability alloydbsqllogical alloydbsuperuser; do\n echo docker exec -it \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e psql -h localhost -U postgres alloydbadmin \\\n -c \"CREATE ROLE ${name} NOLOGIN;\" \\\n -c \"CREATE TABLE ${name}_table();\" \\\n -c \"ALTER TABLE ${name}_table OWNER TO ${name};\"\n done\n\n4. If `ENABLE_ALLOYDB_AI` is set to `TRUE`, follow instructions in [Install AlloyDB Omni with AlloyDB AI](/alloydb/omni/15.5.4/docs/install-with-alloydb-ai) to set up AlloyDB AI.\n\n5. Connect to the database to verify that the data is unchanged:\n\n docker exec -it \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e psql -h localhost -U postgres\n\n6. Uninstall the AlloyDB Omni CLI:\n\n sudo alloydb database-server uninstall\n\n The AlloyDB Omni CLI uninstallation does not affect your data stored in AlloyDB Omni."]]