Docker Swarm

💡 Tip

The easiest way to run SigNoz is to use SigNoz Cloud - no installation, maintenance, or scaling needed.

New users get 30 days of unlimited access to all features. Click here to sign up.

This section provides information on installing SigNoz on Docker Swarm.

Prerequisites

Install SigNoz on Docker Swarm

  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/
    
  2. Initialize a single-node swarm 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.
    
  3. (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.

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

    • -c and the path to the Compose file (docker-swarm/clickhouse-setup/docker-compose.yaml)
    • The name of the stack (signoz)
    docker stack deploy -c docker-swarm/clickhouse-setup/docker-compose.yaml signoz
    

    The output should look similar to the following:

    Creating network signoz_default
    Creating service signoz_query-service
    Creating service signoz_frontend
    Creating service signoz_otel-collector
    Creating service signoz_hotrod
    Creating service signoz_load-hotrod
    Creating service signoz_clickhouse
    Creating service signoz_alertmanager
    
  5. (Optional) By default, the instructions in this document create three replicas, and each replica can handle 50K spans per second. To handle an increased load, perform the steps in the Scale Up section of the Operate on Docker Swarm page.

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
    6b67m0nuzf40   signoz_alertmanager             replicated   1/1        signoz/alertmanager:0.23.0-0.1
    zgateenyifwv   signoz_clickhouse               replicated   1/1        yandex/clickhouse-server:21.12.3.32
    vzc1gdx86f0w   signoz_frontend                 replicated   1/1        signoz/frontend:0.8.0                          *:3301->3301/tcp
    dgisjp0vhv8m   signoz_hotrod                   replicated   1/1        jaegertracing/example-hotrod:1.30
    336omtkvwukm   signoz_load-hotrod              replicated   1/1        grubykarol/locust:1.2.3-python3.9-alpine3.12
    av5iggw983b5   signoz_otel-collector           replicated   3/3        signoz/otelcontribcol:0.43.0-0.1               *:4317-4318->4317-4318/tcp
    hw28zb1hozu5   signoz_query-service            replicated   1/1        signoz/query-service:0.8.0                     *:8080->8080/tcp
    

Go to Docker Swarm Operate section for detailed instructions.

✅ Info

By default, 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 https://signoz.io/docs/userguide/retention-period.

Next Steps