### Install and Lookup Neo4j Service (Standalone) Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/accessing-neo4j.adoc Install Neo4j using Helm and then use kubectl to get the service by its label selector. ```shell # install neo4j helm install "my-release" … # lookup installed service kubectl get service -l helm.neo4j.com/service=default,helm.neo4j.com/instance=my-release ``` -------------------------------- ### Start Neo4j Container for Cypher Shell Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/operations.adoc Starts a Neo4j container, mounting the data volume, to prepare for accessing it with Cypher Shell. This is a prerequisite for running interactive queries. ```shell docker run --interactive --tty --name \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/data:/data \ neo4j:{neo4j-version-exact} ``` -------------------------------- ### Install npm Packages Source: https://github.com/neo4j/docs-operations/blob/dev/README.adoc Run this command to install the necessary packages for the project. Ensure Node.js and npm are installed. ```bash npm i ``` -------------------------------- ### Example failure output for SHOW DATABASES Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc This output shows a database that failed to start due to an issue with the seed. ```text | name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | "seed3" | "standard" | [] | "read-write" | "localhost:7682" | "unknown" | FALSE | "online" | "offline" | "Unable to start database `DatabaseId{3fe1a59b[seed3]}`" | ---- ``` -------------------------------- ### Start a composite database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/scalability/composite-databases/start-stop-composite-databases.adoc Use the `START DATABASE` command to start a composite database. This command can also be used for standard databases. ```cypher START DATABASE inventory ``` -------------------------------- ### Start Neo4j Server Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/neo4j-admin-neo4j-cli.adoc The `neo4j start` command is an alias for `neo4j-admin server start`, used to start the Neo4j server. ```bash neo4j start ``` -------------------------------- ### Example Output: Showing Databases in Standalone Neo4j Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/clustering/monitoring/show-databases-monitoring.adoc This output demonstrates the expected results when executing SHOW DATABASES against a standalone Neo4j server. Note that in a standalone setup, address, role, and writer fields are consistent across databases. ```queryresults +--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | constituents | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------++ |"neo4j" |"standard" |[] |"read-write"|"localhost:7687"| "primary" | true | "online" | "online" | "" |true |true |[] | |"system" |"system" |[] |"read-write"|"localhost:7687"| "primary" | true | "online" | "online" | "" |false |false |[] | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ``` -------------------------------- ### Get Examples for Neo4j PowerShell Command Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/windows.adoc Shows usage examples for a specific Neo4j PowerShell command. This is useful for understanding how to use the command in practice. ```powershell Get-Help -examples ``` -------------------------------- ### Start a Neo4j database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/start-stop-databases.adoc Use the START DATABASE command to bring a database online. Ensure you are connected to the 'system' database for this operation. ```cypher START DATABASE customers ``` -------------------------------- ### Neo4j Pod Log Output Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-standalone/verify-installation.adoc This is an example of the log output from a Neo4j pod, showing startup information and configuration details. It is useful for verifying that Neo4j has started correctly. ```text Changed password for user 'neo4j'. Directories in use: home: /var/lib/neo4j config: /config/ logs: /data/logs plugins: /var/lib/neo4j/plugins import: /var/lib/neo4j/import data: /var/lib/neo4j/data certificates: /var/lib/neo4j/certificates run: /var/lib/neo4j/run Starting Neo4j. 2021-06-02 17:38:27.791+0000 INFO Command expansion is explicitly enabled for configuration 2021-06-02 17:38:27.819+0000 INFO Starting... 2021-06-02 17:38:31.195+0000 INFO ======== Neo4j 5.26.0 ======== 2021-06-02 17:38:34.168+0000 INFO Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED 2021-06-02 17:38:34.188+0000 INFO Setting up initial user from `auth.ini` file: neo4j 2021-06-02 17:38:34.190+0000 INFO Creating new user 'neo4j' (passwordChangeRequired=false, suspended=false) 2021-06-02 17:38:34.205+0000 INFO Setting version for 'security-users' to 2 ``` -------------------------------- ### Set File Permissions and Start Neo4j Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/aliases/remote-database-alias-configuration.adoc Secure the Neo4j configuration file and start the server with command expansion enabled. ```bash chmod 640 conf/neo4j.conf bin/neo4j start --expand-commands ``` -------------------------------- ### Start a Neo4j Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/backup-restore/copy-database.adoc After compacting a database in place, start the newly created version of the database. ```cypher START DATABASE neo4j ``` -------------------------------- ### Run Neo4j Docker container with data import Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/operations.adoc This example demonstrates starting a Neo4j Docker container with persistent volumes for data and imports, and then performing a full database import using `neo4j-admin`. The `--rm` flag ensures the container is removed upon exit. Adjust volume paths and CSV file names as needed. ```shell docker run --interactive --tty --rm \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/data:/data \ --volume=$HOME/neo4j/import:/import \ neo4j:{neo4j-version-exact} \ neo4j-admin database import full --nodes=Movies=/import/movies_header.csv,/import/movies.csv \ --nodes=Actors=/import/actors_header.csv,/import/actors.csv \ --relationships=ACTED_IN=/import/roles_header.csv,/import/roles.csv databasename ``` -------------------------------- ### Enable Neo4j Service to Start on Boot Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/debian.adoc Configure the Neo4j service to automatically start when the system boots up on Debian-based distributions using systemd. ```bash sudo systemctl enable neo4j ``` -------------------------------- ### Starting Neo4j Server Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/neo4j-admin-neo4j-cli.adoc Starts the Neo4j server as a background daemon. This is the standard way to run Neo4j in a production environment. ```bash neo4j-admin server start ``` -------------------------------- ### Example Migration Output Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/migrate-database.adoc This output shows the successful completion of a database migration process, including progress indicators and confirmation messages. It details the steps from starting the migration to its successful completion. ```shell 2025-01-22 18:03:21.842+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Starting migration for database 'movies' 2025-01-22 18:03:22.504+0000 INFO [o.n.k.i.s.StoreMigrator] 'record-aligned-1.1' has been identified as the current version of the store 2025-01-22 18:03:22.504+0000 INFO [o.n.k.i.s.StoreMigrator] 'block-block-1.1' has been identified as the target version of the store migration 2025-01-22 18:03:22.506+0000 INFO [o.n.k.i.s.StoreMigrator] Starting migration of database 2025-01-22 18:03:22.586+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Store files (1/1): 2025-01-22 18:03:22.588+0000 INFO [o.n.k.i.s.StoreMigrator] Store files 2025-01-22 18:03:23.270+0000 INFO [c.n.i.b.i.BlockBatchImporter] Import completed successfully, took 654ms. 2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed 2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed 2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed 2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed 2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed 2025-01-22 18:03:23.761+0000 INFO [o.n.k.i.s.StoreMigrator] Starting transaction logs migration. 2025-01-22 18:03:23.800+0000 INFO [o.n.k.i.s.StoreMigrator] Transaction logs migration completed. 2025-01-22 18:03:23.802+0000 INFO [o.n.k.i.s.StoreMigrator] Successfully finished migration of database, took 1s 296ms 2025-01-22 18:03:23.804+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Database migration completed successfully ``` -------------------------------- ### Install Neo4j with values.yaml Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/operations/scaling.adoc Install Neo4j using Helm with a specified `values.yaml` file. This applies the configurations defined in the file. ```shell helm install server4 neo4j -f values.yaml ``` -------------------------------- ### Start a Stopped Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/clustering/multi-region-deployment/disaster-recovery.adoc Before deallocating databases from a server, stopped databases must be started. This command initiates the process. If a database fails to start, it may need to be recreated. ```cypher START DATABASE stopped-db ``` -------------------------------- ### Combine SHOW SETTINGS with dbms.checkConfigValue Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/show-settings.adoc This example demonstrates combining `SHOW SETTINGS` with the `dbms.checkConfigValue` procedure to validate the current values of specific settings. It filters settings starting with 'db.checkpoint', yields their name and value, and then calls the procedure to check their validity. ```cypher SHOW SETTINGS YIELD name, value WHERE name STARTS WITH 'db.checkpoint' CALL dbms.checkConfigValue(name, value) YIELD valid, message RETURN name, value, valid, message; ``` -------------------------------- ### Example Output of SHOW SERVERS Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/clustering/monitoring/show-servers-monitoring.adoc This is an example of the output you can expect when running `SHOW SERVERS` against a Neo4j cluster. It displays a table with server details. ```queryresults +------------------------------------------------------------------------------------------------------+ | name | address | state | health | hosting | +------------------------------------------------------------------------------------------------------+ |"f4ae1895-26f1-4b93-bd31-6f482be80d3d"|"localhost:7681"|"Enabled"|"Available"|["system","foo","neo4j"]| |"ffa55a5b-2aca-45fc-be09-2a894067025c"|"localhost:7682"|"Enabled"|"Available"|["system","foo","neo4j"]| |"server3" |"localhost:7683"|"Enabled"|"Available"|["system","neo4j"] | +------------------------------------------------------------------------------------------------------+ ``` -------------------------------- ### Installing Plugins and Licenses in Docker Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/plugins.adoc Shows how to mount both a plugins folder and a licenses folder to the Neo4j Docker container to install plugins and their corresponding license files. ```shell docker run \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/plugins:/plugins \ --volume=$HOME/neo4j/licenses:/licenses \ neo4j:{neo4j-version-exact} ``` -------------------------------- ### Enable universe repository on Ubuntu Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/debian.adoc If installing on Ubuntu Server and encountering a 'daemon but it is not installable' error, enable the 'universe' repository. ```bash sudo add-apt-repository universe ``` -------------------------------- ### Install Neo4j Server with Helm Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/operations/scaling.adoc Use this command to install a new Neo4j server into an existing cluster, ensuring `neo4j.name` matches the existing cluster. ```shell helm install server4 neo4j --set neo4j.edition=enterprise --set neo4j.acceptLicenseAgreement=yes --set volumes.data.mode=defaultStorageClass --set neo4j.password="password" --set neo4j.minimumClusterSize=3 --set neo4j.name=my-cluster --set neo4j.operations.enableServer=true --set image="neo4j/helm-charts-operations:2025.8.0" --set protocol="neo4j" ``` -------------------------------- ### Start Neo4j Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/password-and-user-recovery.adoc Use this command to start the Neo4j service after configuration changes have been made. ```shell bin/neo4j start ``` -------------------------------- ### Start Neo4j as macOS Service with Homebrew Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/osx.adoc Start the Neo4j service managed by Homebrew. This command also configures Neo4j to launch automatically on system startup. ```shell brew services start neo4j ``` -------------------------------- ### Install Neo4j with Custom StorageClass Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/persistent-volumes.adoc Install a single Neo4j server using the Helm chart and a custom values file that specifies the StorageClass for the data volume. ```shell helm install standalone-with-storage-class neo4j -f storage-class-values.yaml ``` -------------------------------- ### Install Headless Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-cluster/access-inside-k8s.adoc Installs the neo4j-cluster-headless-service Helm chart. Ensure the cluster name is set correctly using the `neo4j.name` parameter. ```shell helm install headless neo4j/neo4j-headless-service --namespace neo4j --set neo4j.name=my-cluster ``` -------------------------------- ### Start Neo4j Windows Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/windows.adoc Start the Neo4j service after it has been installed. This allows Neo4j to run in the background. ```bash %NEO4J_HOME%\bin\neo4j start ``` -------------------------------- ### Start Local Server Source: https://github.com/neo4j/docs-operations/blob/dev/README.adoc Use this command to launch a local development server. This allows you to preview the generated HTML output and enables live preview for AsciiDoc file changes. ```bash npm start ``` -------------------------------- ### Docker Compose File Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc Example Docker Compose file for deploying a Neo4j cluster. This file defines the services, networks, and volumes for the cluster members. ```yaml version: '3.8' ``` -------------------------------- ### Example: Show Supported Privileges Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/manage-privileges.adoc Demonstrates how to list up to 10 supported privileges, ordering them by action in descending order and returning specific details. ```cypher SHOW SUPPORTED PRIVILEGES YIELD * ORDER BY action DESC LIMIT 10 RETURN action, qualifier, target, scope, description ``` -------------------------------- ### Create Example Graph Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/procedures/call-procedures.adoc Use this Cypher statement to create the example graph used throughout the documentation. Ensure you run this against an empty Neo4j database. ```cypher CREATE (andy:Developer {name: 'Andy', born: 1991}), (beatrice:Developer {name: 'Beatrice', born: 1985}), (charlotte:Administrator {name: 'Charlotte', born: 1990}), (david:Administrator {name: 'David', born: 1994, nationality: 'Swedish'}), (andy)-[:KNOWS]->(beatrice), (beatrice)-[:KNOWS]->(charlotte), (andy)-[:KNOWS]->(david) ``` -------------------------------- ### Start Neo4j Container for Reports Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/operations.adoc Starts a Neo4j container and mounts volumes for data and reports. The reports volume is essential for storing generated reports. ```shell docker run --interactive --tty --rm \ --name=neo4j \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/data:/data \ --volume=$HOME/neo4j/reports:/reports \ neo4j:{neo4j-version-exact} ``` -------------------------------- ### Create Users and Roles Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/manage-roles.adoc Initial setup for managing roles by creating sample users and roles. These commands are executed against the system database. ```cypher CREATE USER bob SET PASSWORD 'abcd1234' CHANGE NOT REQUIRED; CREATE USER user1 SET PASSWORD 'abcd1234' CHANGE NOT REQUIRED; CREATE USER user2 SET PASSWORD 'abcd1234' CHANGE NOT REQUIRED; CREATE USER user3 SET PASSWORD 'abcd1234' CHANGE NOT REQUIRED; CREATE ROLE myrole IF NOT EXISTS; CREATE ROLE role1 IF NOT EXISTS; CREATE ROLE role2 IF NOT EXISTS; ``` -------------------------------- ### Filter SHOW SETTINGS with WHERE clause Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/show-settings.adoc Filter the displayed settings based on a condition, for example, by filtering settings whose names start with 'server'. This example also specifies the returned columns and filters the results. ```cypher SHOW SETTINGS YIELD name, value, description WHERE name STARTS WITH 'server' RETURN name, value, description ``` -------------------------------- ### CREATE DATABASE with Options Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/create-databases.adoc Example of using the `OPTIONS` clause with `CREATE DATABASE` to specify how existing data on disk should be handled. The `existingData` option must be set to `use` when using seeding methods. ```cypher CREATE DATABASE mydatabase OPTIONS { existingData: 'use' } ``` -------------------------------- ### Install Neo4j cluster server 1 Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-cluster/install-servers.adoc Installs the first Neo4j server using the 'neo4j/neo4j' Helm chart and a specific values file. Ensure 'server-1.values.yaml' is correctly configured for your deployment. ```shell helm install server-1 neo4j/neo4j --namespace neo4j -f server-1.values.yaml ``` -------------------------------- ### Clean Up GKE Resources Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/persistent-volumes.adoc Removes the Neo4j Helm installation, associated PVC, and the created persistent disk from Google Cloud. This is a cleanup step for the example. ```shell helm uninstall ${RELEASE_NAME} ${RELEASE_NAME}-disk kubectl delete pvc data-${RELEASE_NAME}-0 gcloud compute disks delete ${RELEASE_NAME} --quiet ``` -------------------------------- ### Set default Java version Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/debian.adoc Configure the default Java version to Java 21 or 25 for Neo4j to start correctly. Replace `` with the actual name of your Java 21 installation. ```bash sudo update-java-alternatives --jre --set ``` -------------------------------- ### Show all settings with specified return columns Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/show-settings.adoc Select specific columns like `name`, `defaultValue`, and `startupValue` when displaying all settings. ```cypher SHOW SETTINGS YIELD name, defaultValue, startupValue ``` -------------------------------- ### Log Message Example: Checkpoint Triggered by Time Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-internals/checkpointing.adoc A log message indicating a checkpoint initiated due to the time interval threshold, showing the transaction ID and start of the checkpoint process. ```log 2023-05-28 12:55:05.174+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by "Scheduled checkpoint for time threshold" @ txId: 49 checkpoint started... ``` -------------------------------- ### CSV Import with Relationship Actions Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/import.adoc Shows how to use the ':ACTION' keyword in a CSV header for updating relationships. This example includes creating, updating, and deleting relationships based on start and end node IDs and type. ```cypher :ACTION,:START_ID,:END_ID,:TYPE,role CREATE,person1,movie1,ACTED_IN,"Neo" UPDATE,person2,movie1,ACTED_IN,"Morpheus" DELETE,person3,movie1,ACTED_IN ``` -------------------------------- ### Create Initial Roles and Databases Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/database-administration.adoc Sets up initial roles and databases for testing or demonstration purposes. ```cypher CREATE ROLE regularUsers; CREATE ROLE alterDbUsers; CREATE ROLE databaseAdminUsers; CREATE DATABASE `remote-db`; CREATE COMPOSITE DATABASE `composite`; CREATE USER jake SET PASSWORD 'abcd1234' CHANGE NOT REQUIRED; ``` -------------------------------- ### Create Database and Alias Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/delete-databases.adoc Example of creating a database and then creating a local alias that targets it. ```cypher CREATE DATABASE movies CREATE ALIAS films FOR DATABASE movies ``` -------------------------------- ### Enable Neo4j System Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/rpm.adoc Enable the Neo4j service to start automatically on system boot using systemctl. ```bash systemctl enable neo4j ``` -------------------------------- ### Deny START Privilege on Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/database-administration.adoc Denies the START privilege on a specific database to a role. Use this to prevent roles from starting a database instance. ```cypher DENY START ON DATABASE system TO regularUsers ``` -------------------------------- ### Grant START Privilege on Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/database-administration.adoc Grants the START privilege on a specific database to a role. Use this to allow roles to start a database instance. ```cypher GRANT START ON DATABASE neo4j TO regularUsers ``` -------------------------------- ### Install Primary Neo4j Server with Helm Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-analytics-cluster.adoc Installs a single primary Neo4j server using a specified values file. Ensure the values file is correctly configured before running. ```bash helm install primary neo4j/neo4j -f /path/to/neo4j-primary.yaml ``` -------------------------------- ### Verify GDS Library Installation Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-analytics-cluster.adoc Runs a Cypher query to check the installed version of the Graph Data Science (GDS) library. Ensure the GDS library is installed before running. ```cypher RETURN gds.version(); ``` -------------------------------- ### Example Output of Cypher Query Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/operations.adoc This is an example of the tabular output produced by a Cypher query, likely from the initial script example, showing actors, movie titles, and movie years. ```shell Actors, Movies, MovieYear "Keanu Reeves", "The Matrix Revolutions", 2003 "Keanu Reeves", "The Matrix Reloaded", 2003 "Keanu Reeves", "The Matrix", 1999 "Laurence Fishburne", "The Matrix Revolutions", 2003 "Laurence Fishburne", "The Matrix Reloaded", 2003 "Laurence Fishburne", "The Matrix", 1999 "Carrie-Anne Moss", "The Matrix Revolutions", 2003 "Carrie-Anne Moss", "The Matrix Reloaded", 2003 "Carrie-Anne Moss", "The Matrix", 1999 ``` -------------------------------- ### Importing Database with Arguments File Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/neo4j-admin-neo4j-cli.adoc Demonstrates how to import a database using a file containing command-line arguments. This is useful when the command line becomes too long to manage. ```bash neo4j-admin database import full @/path/to/your/ mydb ``` -------------------------------- ### Start Database Command Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/syntax.adoc Command to start a stopped database. Optionally wait for the operation to complete. ```syntax START DATABASE name [WAIT [n [SEC[OND[S]]]]||NOWAIT] ``` -------------------------------- ### Example Output: Showing Databases in a Cluster Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/clustering/monitoring/show-databases-monitoring.adoc This is an example of the output when running SHOW DATABASES against a Neo4j cluster. The output is similar to a standalone server but provides details relevant to distributed environments. ```queryresults +--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ``` -------------------------------- ### Grant ACCESS Privilege Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/database-administration.adoc Example of granting the 'regularUsers' role access to the 'neo4j' database. ```cypher GRANT ACCESS ON DATABASE neo4j TO regularUsers ``` -------------------------------- ### Start Neo4j as Background Process Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/tarball.adoc Start Neo4j in the background as a detached process. This is suitable for production environments. ```bash $NEO4J_HOME/bin/neo4j start ``` -------------------------------- ### Show all settings with all return columns Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/show-settings.adoc To view all available columns for configuration settings, use `YIELD *`. ```cypher SHOW SETTINGS YIELD * ``` -------------------------------- ### SHOW SERVERS Output Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/clustering/servers.adoc This table displays the output of the SHOW SERVERS command, detailing various attributes of each server in the cluster such as its ID, name, addresses, state, health, and version. ```text serverId | name | address | httpAddress | httpsAddress | state | health | hosting | requestedHosting | tags | allowedDatabases | deniedDatabases | modeConstraint | version +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | "135ad202-5405-4d3c-9822-df39f59b823c" | "135ad202-5405-4d3c-9822-df39f59b823c" | "localhost:7690" | "localhost:7477" | NULL | "Deallocating" | "Available" | ["system"] | ["system"] | [] | [] | [] | "NONE" | "5.0.0-drop09.0" | "25a7efc7-d063-44b8-bdee-f23357f89f01" | "25a7efc7-d063-44b8-bdee-f23357f89f01" | "localhost:7689" | "localhost:7476" | NULL | "Enabled" | "Available" | ["system", "foo", "neo4j"] | ["system", "foo", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0-drop09.0" | "42a97acc-acf6-40c0-aff2-3993e90db1ff" | "42a97acc-acf6-40c0-aff2-3993e90db1ff" | "localhost:7691" | "localhost:7478" | NULL | "Free" | "Available" | ["system"] | [] | [] | [] | [] | "NONE" | "5.0.0-drop09.0" | "782f0ee2-5474-4250-b905-4cd8b8f586ba" | "782f0ee2-5474-4250-b905-4cd8b8f586ba" | "localhost:7688" | "localhost:7475" | NULL | "Enabled" | "Available" | ["system", "foo", "neo4j"] | ["system", "foo", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0-drop09.0" | "8512c9b9-d9e8-48e6-b037-b15b0004ca18" | "8512c9b9-d9e8-48e6-b037-b15b0004ca18" | "localhost:7687" | "localhost:7474" | NULL | "Enabled" | "Available" | ["system", "foo", "neo4j"] | ["system", "foo", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0-drop09.0" ``` -------------------------------- ### Grant MERGE Privilege Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/privileges-writes.adoc Example of granting the 'regularUsers' role the ability to MERGE on all elements of the 'neo4j' graph. ```cypher GRANT MERGE {*} ON GRAPH neo4j ELEMENTS * TO regularUsers ``` -------------------------------- ### CREATE DATABASE Options Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/create-databases.adoc Explains the available options for the `CREATE DATABASE` command, such as `existingData` and `existingDataSeedServer`. ```APIDOC ## CREATE DATABASE Options ### Description Details the available options that can be specified when creating a database. ### Method CYPHER command ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cypher CREATE DATABASE myDatabase OPTIONS {existingData: 'use'}; ``` ### Response #### Success Response (200) Indicates successful database creation with specified options. #### Response Example ```json { "message": "Database 'myDatabase' created successfully with options." } ``` ``` -------------------------------- ### Retry Starting a Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/errors.adoc Attempts to start a database named 'foo'. This operation can be retried if it fails, but retries are not guaranteed to succeed. ```cypher neo4j@system> START DATABASE foo; ``` -------------------------------- ### Start Neo4j Docker Container Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/docker-compose-standalone.adoc Command to start the Neo4j Docker container in detached mode using Docker Compose. ```shell docker-compose up -d ``` -------------------------------- ### List Available Neo4j Packages Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/rpm.adoc Verify the Neo4j repository setup by listing available Neo4j package versions. ```bash yum list neo4j --showduplicates ``` -------------------------------- ### Show all settings with default return columns Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/show-settings.adoc Use this command to display all configuration settings with the default set of returned columns. ```cypher SHOW SETTINGS ``` -------------------------------- ### Grant Start or Stop Privilege Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/database-administration.adoc Grants roles the privilege to start or stop the home database, specific databases, or all databases. ```syntax GRANT [IMMUTABLE] { START | STOP } ON { HOME DATABASE | DATABASE[S] {* | name[, ...] } } TO role[, ...] ``` -------------------------------- ### Example of Neo4j command expansion Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/configuration/command-expansion.adoc Demonstrates how to use command expansion in the neo4j.conf file to set a configuration value by executing a script. Ensure the script is executable and returns a valid output. ```shell neo4j.configuration.example=$(/bin/bash echo "expanded value") ``` -------------------------------- ### Install Secondary Neo4j Server with Helm Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/quickstart-analytics-cluster.adoc Installs a secondary Neo4j server, typically for GDS, using a specified values file. Repeat for additional secondary servers with unique names. ```bash helm install gds1 neo4j/neo4j -f /path/to/secondary-gds.yaml ``` -------------------------------- ### Delete Neo4j Installation Directory Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/windows.adoc This command removes the Neo4j installation directory. It is recommended to back up your data before performing this action. ```shell rmdir NEO4J_HOME ``` -------------------------------- ### Copying a Database with Schema Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/backup-restore/copy-database.adoc This example demonstrates how to copy a database store and its schema using the `--copy-schema` option. This option is supported for versions 4.4 and 5.x to 5.26 LTS and later. ```bash neo4j-admin database copy --copy-schema ``` -------------------------------- ### Install Neo4j Windows Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/windows.adoc Install Neo4j as a Windows service. Ensure the service account has the 'Log on as a service' right. ```bash %NEO4J_HOME%\bin\neo4j windows-service install ``` -------------------------------- ### Verify Standalone Neo4j Installation Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/accessing-neo4j-ingress.adoc Checks all Kubernetes resources related to the standalone Neo4j installation to verify its status and configuration. ```shell kubectl get all, pvc, pv, configmaps, secrets ``` -------------------------------- ### Start a Database Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/queries.adoc Initiates a specific database, making it available for read and write operations. Use this command when a database is in an offline state. ```cypher neo4j@system> START DATABASE sales; ``` -------------------------------- ### Install Neo4j Community Edition Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/rpm.adoc Install Neo4j Community Edition using yum. Replace {neo4j-version-exact} with the desired version. ```bash yum install neo4j-{neo4j-version-exact} ``` -------------------------------- ### Install Neo4j with Default StorageClass Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/persistent-volumes.adoc Install a single Neo4j server using the Helm chart and a values file that specifies the use of the default StorageClass for dynamic volume provisioning. ```shell helm install standalone-with-default-storage-class neo4j -f default-storage-class-values.yaml ``` -------------------------------- ### Deny WRITE Privilege Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/privileges-writes.adoc Example of denying the 'regularUsers' role the ability to perform WRITE operations on the 'neo4j' graph. ```cypher DENY WRITE ON GRAPH neo4j TO regularUsers ``` -------------------------------- ### Grant WRITE Privilege Example Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/authentication-authorization/privileges-writes.adoc Example of granting the 'regularUsers' role the ability to perform WRITE operations on the 'neo4j' graph. ```cypher GRANT WRITE ON GRAPH neo4j TO regularUsers ``` -------------------------------- ### Helm Installation with Values File and Set Argument Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/configuration.adoc Install the Neo4j Helm chart, specifying the `neo4j.name` parameter using the `--set` argument and providing a values file. The `neo4j.name` parameter is mandatory. ```shell helm install neo4j/neo4j --set "neo4j.name=my-neo4j-db" -f neo4j-values.yaml ``` -------------------------------- ### Uninstall Neo4j Windows Service Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/windows.adoc Uninstall a previously installed Neo4j Windows service. This is a required step before installing a new version. ```bash %NEO4J_HOME%\bin\neo4j windows-service uninstall ``` -------------------------------- ### Display Docker Run Help Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/docker/introduction.adoc Access the help information for `docker run` commands to see all available options and their descriptions. ```shell docker run --help ``` -------------------------------- ### Install Nginx Ingress Controller (GKE) Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/accessing-neo4j-ingress.adoc Installs the Nginx Ingress controller for Kubernetes, suitable for Google Kubernetes Engine (GKE). ```shell helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx \ --namespace ingress-nginx --create-namespace ``` -------------------------------- ### JVM Heap and Metaspace Settings Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/kubernetes/configuration.adoc These are example JVM arguments for configuring heap size, heap dump path, and metaspace size. Ensure these are set according to your system's memory and Neo4j's requirements. ```bash -XX:HeapDumpPath=/logs/neo4j.hprof ``` ```bash -XX:MaxMetaspaceSize=180m ``` ```bash -XX:ReservedCodeCacheSize=40m ``` -------------------------------- ### Install Neo4j Enterprise Edition (Non-Interactive) Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/installation/linux/rpm.adoc Perform a non-interactive installation of Neo4j Enterprise Edition by setting the NEO4J_ACCEPT_LICENSE_AGREEMENT environment variable. ```bash NEO4J_ACCEPT_LICENSE_AGREEMENT=yes yum install neo4j-enterprise-{neo4j-version-exact} ``` -------------------------------- ### Create Database from Directory (Cypher 5) Source: https://github.com/neo4j/docs-operations/blob/dev/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc Use this command to create a database named 'foo' from the most recent backup chain found in the seed directory on 'server-id'. Requires 'existingData: "use"' option. ```cypher5 CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'server://server-id/' }; ```