---
title: "icegridnode"
url: https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/icegridnode
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# icegridnode

An IceGrid node is a process that [activates, monitors, and deactivates](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md) registered server processes. You can run any number of nodes in a domain, but typically there is one node per host. A node must be running on each host on which servers are activated automatically, and nodes cannot run without an IceGrid registry.

The IceGrid node server is implemented by the `icegridnode` executable. If you wish to run a registry and node in one process, `icegridnode` is the executable you must use.

> **Note**
>
> We recommend that you always run `icegridnode` and `icegridregistry` in separate processes.

## Command Line Options for `icegridnode`

The node supports the following command-line options:

```shell
Usage: icegridnode [options]
Options:
-h, --help           Show this message.
-v, --version        Display the Ice version.
--readonly           Start the collocated master registry in
                     read-only mode.
--initdb-from-replica <replica>
                     Initialize the collocated registry database from the
                     given replica.

--deploy DESCRIPTOR [TARGET1 [TARGET2 ...]]
                     Add or update descriptor in file DESCRIPTOR,
                     with optional targets.
```

If you are running the node with a collocated registry, the `--readonly` option prevents any updates to the registry's database; it also prevents slaves from synchronizing their databases with this master. This option is useful when you need to verify that the master registry's database is correct after [promoting a slave](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/promoting-a-registry-slave.md) to become the new master. The `--initdb-from-replica` option allows you to initialize the database from another registry replica. This option is useful when you need to start a new master with the contents of a slave database.

The `--deploy` option allows an application to be [deployed](https://docs.zeroc.com/ice/3.8/services/icegrid/using-icegrid-deployment.md) automatically as the node process starts, which can be especially useful during testing. The command expects the name of the XML deployment file, and optionally allows the names of the individual [targets](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-features.md) within the file to be specified.

Additional command line options are supported, including those that allow the node to run as a [Windows service or a daemon](https://docs.zeroc.com/ice/3.8/background-servers/command-line-options.md), and Ice includes a [utility](https://docs.zeroc.com/ice/3.8/background-servers/windows-services.md) to help you install an IceGrid node as a Windows service.

## Configuring Node Endpoints

The IceGrid node's endpoints are defined by the [IceGrid.Node.Endpoints](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md) property and must be accessible to the registry. It is not necessary to use a fixed port because each node contacts the registry at startup to provide its current endpoint information.

## Node Security Considerations

It is important that you give careful consideration to the permissions of the account under which the node runs. If the servers that the node will activate have no special [access requirements](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md), and all of the servers can use the same account, it is recommended that you do not run the node under an account with system privileges, such as the root account on Linux and macOS or the Administrator account on Windows.

## Configuring a Data Directory for the Node

The node requires an empty directory that it can use to store server files - more specifically, Ice config files for these servers. The pathname of this directory is supplied by the configuration property [IceGrid.Node.Data](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md#icegrid.node.data). To clear a node's state, first ensure the server is not currently running, then remove all of the files in its data directory and restart the server.

> **Warning**
>
> The node's [data directory](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/icegrid-persistent-data.md) may also contain files and subdirectories used by your application's servers. Before destroying the contents of the node's data directory, make sure that all servers are stopped and any important files are backed up.

## Node Configuration Example

A minimal node configuration is shown in the following example:

```config
IceGrid.Node.Endpoints=tcp
IceGrid.Node.Name=Node1
IceGrid.Node.Data=/opt/ripper/node

Ice.Default.Locator=IceGrid/Locator:tcp -p 4061
```

The value of the [IceGrid.Node.Name](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md#icegrid.node.name) property must match that of a deployed node known by the registry.

The [Ice.Default.Locator](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties.md#ice.default.locator) property is used by the node to contact the registry. The value is a proxy that contains the [registry's client endpoints](https://docs.zeroc.com/ice/3.8/services/icegrid/getting-started-with-icegrid.md). (You can avoid the need to define `Ice.Default.Locator` by using [IceLocatorDiscovery](https://docs.zeroc.com/ice/3.8/plugins/icelocatordiscovery.md).)

If you wish to run a collocated registry and node server, enable the property [IceGrid.Node.CollocateRegistry](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md#icegrid.node.collocateregistry) and include the [registry's configuration properties](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/icegridregistry.md).

The remaining configuration properties are discussed in [IceGrid.\*](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md).

## See Also

- [IceGrid Server Activation](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md)
- [Promoting a Registry Slave](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/promoting-a-registry-slave.md)
- [IceGrid Persistent Data](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-reference/icegrid-persistent-data.md)
- [Getting Started with IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/getting-started-with-icegrid.md)
- [Using IceGrid Deployment](https://docs.zeroc.com/ice/3.8/services/icegrid/using-icegrid-deployment.md)
- [Windows Services](https://docs.zeroc.com/ice/3.8/background-servers/windows-services.md)
- [IceGrid.\*](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md)
