Docker Swarm

Self-Host - This page applies to self-hosted SigNoz editions.

Choose SigNoz Cloud for ease, or self-host for control—with the freedom to switch as your needs grow.

This section provides information on installing SigNoz on Docker Swarm.

Deploy with Foundry

Foundry can deploy SigNoz on Docker Swarm for you using Docker Swarm casting (a configuration file). You install the dependencies, and Foundry handles everything else, from generating the Compose file and configs to deploying the stack.

Prerequisites

Install SigNoz on Docker Swarm

Please use a non-root user (mainly for Git repository cloning), otherwise you may end up seeing file system permissions errors after the installation.

  1. In a directory of your choosing, clone the SigNoz repository and 'cd' into the signoz/deploy directory by entering the following commands:
   git clone -b main https://github.com/SigNoz/signoz.git && cd signoz/deploy/
  1. (Optional) If you don't have a swarm cluster in place, you can create one by entering the following command:
   docker swarm init

The output should look similar as shown below:

Swarm initialized: current node (6muco3j7jjuo6k4rbiq8yr8fw) is now a manager.

To add a worker to this swarm, run the following command:

docker swarm join --token SWMTKN-1-6ak6diq1lbrwemx17up9c1ph039h64z0dxksjxv647qnqrd290-4tt6q22dd462p4lf2n6bqbnt4 192.168.65.3:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
  1. (Optional) You can use the docker swarm join command to add more nodes to the swarm. Note that the node you added in the previous step is the manager. For details, see the Docker Swarm Join page of the Docker documentation.

  2. Deploy SigNoz by entering the docker stack deploy command and specifying the following:

  • -d to deploy the stack in detached mode
    • --prune to remove services that are no longer referenced by the stack
    • -c and the path to the Swarm Compose file (docker-compose.yaml)
    • The name of the stack (signoz)
   cd deploy/docker-swarm
   docker stack deploy -d --prune -c docker-compose.yaml signoz

The output should look similar to the following:

Creating network signoz-net
Creating service signoz_query-service
Creating service signoz_frontend
Creating service signoz_otel-collector
Creating service signoz_signoz-telemetrystore-migrator
Creating service signoz_init-clickhouse
Creating service signoz_zookeeper-1
Creating service signoz_clickhouse
Creating service signoz_alertmanager

Verify the Installation

  1. Using the docker stack services command, monitor the SigNoz deployment process. Wait until all SigNoz services and replicas are created:
   docker stack services signoz

You should see the following output:

ID             NAME                     MODE         REPLICAS   IMAGE                                        PORTS
loqa6qbq7lk3   signoz_clickhouse        replicated   1/1        clickhouse/clickhouse-server:24.1.2-alpine
zqoee9ij9xh0   signoz_init-clickhouse   replicated   0/1        clickhouse/clickhouse-server:24.1.2-alpine
9awvkhh1feov   signoz_otel-collector    replicated   3/3        signoz/signoz-otel-collector:0.111.24        *:4317-4318->4317-4318/tcp
eu5fbg0v1bps   signoz_signoz            replicated   1/1        signoz/signoz:0.113.0                         *:80->8080/tcp
fcp7uk67tkks   signoz_signoz-telemetrystore-migrator   replicated   0/1        signoz/signoz-otel-collector:0.144.1
nw6xukg1gkf7   signoz_zookeeper-1       replicated   1/1        signoz/zookeeper:3.7.1

By default, the retention period is set to 7 days for logs and traces, and 30 days for metrics. To change this, navigate to the General tab on the Settings page of SigNoz UI. For more details, refer to the retention period guide.

Scale Up SigNoz Cluster

SigNoz uses the OpenTelemetry Collector to ingest data. By default, the instructions in the Install SigNoz on Docker Swarm document create three replicas, and each replica can handle 50K spans per second. To handle an increased load, perform the following steps:

  1. Open the deploy/docker-swarm/docker-compose.yaml file in a plain-text editor.

  2. In the services.otel-collector.deploy.replicas field, enter the number of replicas you wish to create. The following example creates four replicas:

  3. Update the signoz stack by entering the following command:

   docker stack deploy --prune -d -c docker-compose.yaml signoz

Next Steps