Skip to content

How to set up DoubleZero

By connecting to the DoubleZero testnet I agree to the terms of the Evaluation Agreement set forth here (click to expand)

DoubleZero Testnet Evaluation Agreement

By accessing or using the Solution (defined below), you agree as of the first date of such access (the "Effective Date") that this Evaluation Agreement (the "Agreement") sets forth the terms and conditions under which DoubleZero Foundation ("DZF") will provide you ("User" or "you") access to the Solution on an evaluation basis. In consideration of the mutual promises herein, you agree as follows:

1. DEFINITIONS.

1.1 "Confidential Information" means any and all information disclosed by either party to the other which is designated as confidential, or which should otherwise be understood to be confidential, including but not limited to, the Solution, product plans, business plans, trade secrets, technology, or any other proprietary information.

1.2 "Solution" means the testnet version of the DoubleZero high-performance network infrastructure for web3 projects ("Testnet") and related edge filtering service with integrated bandwidth ("Information Service") the DZ Software (defined below), any and all materials provided by DZF relating to the DZ Software ("Documentation"), and other materials that DZF provides to User hereunder.

2. ACCESS.

2.1 Access to Solution. Subject to the terms and conditions of this Agreement, DZF will provide User access to the Solution through the Internet. User's access is a non-exclusive, non-transferable, limited use of the Solution to enable User to evaluate the Information Service only. With respect to any software comprising the Solution ("DZ Software"), DZF hereby grants User a limited, revocable license, during the Evaluation Period, to copy, download, make a reasonable number of copies of, run, and deploy (as applicable) such DZ Software solely as contemplated by the Documentation.

2.2 Restrictions. User may use the Solution in accordance with this Agreement from the Effective Date until terminated by DZF (the "Evaluation Period"). User understands that any rights to use the Solution beyond the Evaluation Period will be subject to a separate commercial agreement between the parties with respect thereto, including the payment of fees. User shall not, and shall not permit any third party to: (i) modify or create any derivative works based on the Solution or any portion thereof; (ii) reproduce the Solution except as expressly permitted by this Agreement; (iii) sublicense, distribute, sell, lend, rent, lease, transfer, or grant any rights in or to all or any portion of the Solution or provide access to the Solution to third parties, on a service bureau basis or otherwise, except as an offering of the Information Services through or in connection with User's platform or product and not on a standalone basis; or (iv) use the Solution other than as provided herein.

2.3 Ownership. DZF retains all right, title and interest, including intellectual property rights, in and to the Solution.

3 FEEDBACK. DZF may periodically request that User provide, and User agrees to provide to DZF, feedback regarding the use, operation, and functionality of the Solution ("Feedback"). User hereby grants DZF a non-exclusive, worldwide, perpetual, irrevocable, royalty-free, fully paid-up, fully sublicensable and transferable right and license to use and incorporate Feedback into any products and services, to make, use, sell, offer for sale, import, and otherwise exploit such products and services, and to otherwise use, copy, distribute, and otherwise exploit the Feedback without restriction.

4. TERM AND TERMINATION.

4.1 Term. This Agreement will commence as of the Effective Date and will remain in full force and effect for the Evaluation Period. Either party may terminate this Agreement immediately for convenience, for any reason or no reason, upon written notice to the other party (email to suffice).

4.1 Effects of Termination. Upon termination of this Agreement for any reason: (i) the rights granted to User hereunder will immediately terminate; (ii) User shall immediately discontinue any use of the Solution and shall return or destroy all Documentation and any DZ Software under its control; (iii) each party shall promptly return or destroy all Confidential Information and property of the other party; and (iv) Sections 2.2, 2.3, 3, 4.2, and 5 through 8 will survive.

5. CONFIDENTIALITY. Each party agrees that it will use the Confidential Information of the other party solely to perform its obligations and exercise its rights under this Agreement and it will not disclose, or permit to be disclosed, the same, except as otherwise permitted hereunder. However, either party may disclose Confidential Information to its personnel, attorneys, and other representatives who have a need to know and are bound by confidentiality obligations no less protective than those set forth in this Agreement; and as required by law (in which case the receiving party will provide the disclosing party with prior notice thereof and opportunity to contest such disclosure, and will minimize such disclosure to the extent permitted by applicable law). The obligations of confidentiality in this Section 5 shall not apply to information that: (a) is or becomes generally known or publicly available through no fault of the receiving party; (b) was properly known to the receiving party, without restriction, prior to disclosure by the disclosing party; (c) was properly disclosed to the receiving party, without restriction, by another person with the legal authority to do so; or (d) is independently developed by the receiving party without use of or reference to the disclosing party's Confidential Information. Each party agrees to exercise due care in protecting the Confidential Information of the other party from unauthorized use and disclosure. In the event of actual or threatened breach of the provisions of this Section or the licenses contained herein, the non-breaching party will be entitled to seek immediate injunctive and other equitable relief, without waiving any other rights or remedies available to it. User is responsible for maintaining the Solution and the secrecy of any passwords, seed phrases, or codes that provide access to the Solution as the Confidential Information of DZF. Nothing herein limits or restricts DZF's right or ability to use data regarding the performance, availability, usage, integrity and security of the Solution. If either party breaches, or threatens to breach the provisions of this Section 5, each party agrees that the non-breaching party will have no adequate remedy at law and is therefore entitled to immediate injunctive and other equitable relief, without bond and without the necessity of showing actual money damages.

6. WARRANTY DISCLAIMER; LIMITATION OF LIABILITY.

6.1 WARRANTY DISCLAIMER. THE SOLUTION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. DZF MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE WITH RESPECT TO THE SOLUTION AND DOCUMENTATION INCLUDING THEIR CONDITION, CONFORMITY TO ANY REPRESENTATION OR DESCRIPTION, AND DZF SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.

6.2 LIMITATION OF LIABILITY. EXCEPT FOR A BREACH OF SECTIONS 2.1, 2.2, AND 5, IN NO EVENT SHALL EITHER PARTY BE LIABLE TO THE OTHER FOR INDIRECT, INCIDENTAL, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS OR USE OR LOSS OF DATA, INCURRED BY YOU OR ANY THIRD PARTY, ARISING OUT OF OR RELATED TO THIS AGREEMENT WHETHER IN AN ACTION IN CONTRACT, TORT, OR OTHERWISE, EVEN IF THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL DZF'S AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS AGREEMENT EXCEED ONE HUNDRED DOLLARS (\$100), WHETHER AN ACTION IN CONTRACT, TORT, OR OTHERWISE. THE FOREGOING LIMITATIONS WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY HEREIN. THE PARTIES AGREE THAT THE FOREGOING LIMITATIONS REPRESENT A REASONABLE ALLOCATION OF RISK UNDER THIS AGREEMENT.

7. GOVERNING LAW. This Agreement and all matters arising out of or relating to this Agreement shall be governed, interpreted and constructed in accordance with the laws of the Cayman Islands. Should a controversy, dispute or claim arise out of or in relation to this Agreement ("Dispute"), the relevant party as appropriate, must give 30 days' notice of such Dispute to the other parties (the "Notice of Dispute"). Should the Dispute not be resolved at the expiration of 30 days after service of the Notice of Dispute, the relevant party may commence arbitration proceedings as provided herein. Should the Dispute remain at the expiration of 30 days after service of the Notice of Dispute, the Dispute shall be settled by arbitration administered by the Cayman International Mediation & Arbitration Centre (CI-MAC) in accordance with the CI-MAC Arbitration Rules (the "Arbitration Rules") in force as at the date of this Agreement, which Arbitration Rules are deemed to be incorporated by reference to this clause, and governed by the Arbitration Act (as amended). The arbitration shall be seated in George Town, Grand Cayman, Cayman Islands and governed by Cayman Islands law. The language of the arbitration shall be English. The arbitration shall be determined by a sole arbitrator to be appointed in accordance with the Arbitration Rules. Any award or decision made by the arbitrator shall be in writing and shall be final and binding on the parties without any right of appeal, and judgment upon any award thus obtained may be entered in or enforced by any court having jurisdiction thereof. No action at law or in equity based upon any claim arising out of or related to this Agreement shall be instituted in any court of any jurisdiction. If any litigation or arbitration is necessary to enforce the terms of this Agreement, the prevailing party will be entitled to have their attorney fees paid by the other party. Each party waives any right it may have to assert the doctrine of forum non conveniens, to assert that it is not subject to the jurisdiction of such arbitration or courts or to object to venue to the extent any proceeding is brought in accordance herewith.

8. GENERAL PROVISIONS. This Agreement may not be transferred or assigned by User without the prior written consent of DZF. DZF may freely assign this Agreement. All notices required to be sent hereunder shall be sent by email (to DZF: legal@doublezero.xyz) and deemed received the day after sending (with transmission confirmed). If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions of this Agreement will remain in full force and effect. The waiver by either party of any default or breach of this Agreement shall not constitute a waiver of any other or subsequent default or breach. Neither party shall be liable for any delay or failure in performance due to acts of God, earthquakes, shortages of supplies, transportation difficulties, labor disputes, riots, war, fire, epidemics, and similar occurrences beyond its control, whether or not foreseeable. This Agreement together with any attachments constitutes the complete agreement between the parties and supersedes all prior or contemporaneous agreements or representations, written or oral, concerning the subject matter herein. This Agreement may not be modified or amended except in writing signed by a duly authorized representative of each party.

Prerequisites

Warning

DoubleZero needs to be installed directly on your validator host, not in a container.

  • Internet connectivity with a public IP address (no NAT)
  • x86_64 server
  • Supported OS: Ubuntu 22.04+ or Debian 11+, or Rocky Linux / RHEL 8+
  • Root or sudo privileges on the server where DoubleZero will run
  • Solana CLI installed and on $PATH
  • Permission to access to the validator identity keypair file (e.g., validator-keypair.json) under the sol user
  • Verify the Identity key of Solana validator being connected has at least 1 SOL on it
  • Firewall rules permit outbound connections for DoubleZero and Solana RPC as needed including GRE (ip proto 47) and BGP (169.254.0.0/16 on tcp/179)
  • Optional but useful: jq and curl for debugging

Steps

Connecting a Solana Validator to DoubleZero

When onboarding a Solana validator onto DoubleZero, start by establishing identities. On your server, generate a DoubleZero identity, represented by a public key called the DoubleZero ID. This key is how DoubleZero recognizes your server.

Next, focus on the validator itself. Each Solana validator has its own identity keypair; from this, extract the public key known as the node ID. This is the validator's unique fingerprint on the Solana network.

With the DoubleZeroID and node ID identified, prove ownership. Create a message that includes the DoubleZeroID and sign it with the validator's identity key. The resulting cryptographic signature serves as verifiable proof that you control the validator.

Finally, submit a connection request to DoubleZero. This request communicates: "Here is my identity, here is proof of ownership, and here is how I intend to connect." DoubleZero validates this information, accepts the proof, and provisions network access for the validator on DoubleZero.

1. Install or Upgrade DoubleZero Packages

Follow these steps depending on your operating system:

Ubuntu / Debian

For a new install:

curl -1sLf https://dl.cloudsmith.io/public/malbeclabs/doublezero/setup.deb.sh | sudo -E bash
sudo apt-get install doublezero=0.6.6-1
To upgrade:
sudo apt-get install --only-upgrade doublezero

Rocky Linux / RHEL

For a new install:

curl -1sLf https://dl.cloudsmith.io/public/malbeclabs/doublezero/setup.rpm.sh | sudo -E bash
sudo yum install doublezero-0.6.6

After installation, verify the daemon is running:

sudo systemctl status doublezerod
sudo journalctl -u doublezerod
To upgrade:
sudo yum --only-upgrade doublezero

Check the status of doublezerod

After the package is installed, a new systemd unit is installed, activated and started. To see the status:

sudo systemctl status doublezerod
To see the doublezerod logs, look in the journal:
sudo journalctl -u doublezerod

Create doublezero config directory

mkdir -p ~/.config/doublezero

Add your Solana id.json to the doublezero config directory and check balance

Copy or link the id.json you want to use with DoubleZero to the doublezero config directory.

sudo cp </path/to/id.json> ~/.config/doublezero/

2. Create New DoubleZero Identity

Note

If you have an existing DoubleZero Identity skip to step 3

Create a DoubleZero Identity on your server with the following command:

doublezero keygen

3. Retrieve the server's DoubleZero identity

Review your DoubleZero Identity. This identity will be used to create the connection between your validator and DoubleZero

doublezero address

Output:

YourDoubleZeroAddress11111111111111111111111111111

4. Check that doublezerod has discovered DZ devices

Before connecting, be sure doublezerod has discovered and pinged each of the available DZ testnet switches:

doublezero latency
Sample output:
$ doublezero latency
 pubkey                                       | name      | ip             | min      | max      | avg      | reachable
 96AfeBT6UqUmREmPeFZxw6PbLrbfET51NxBFCCsVAnek | la2-dz01  | 207.45.216.134 |   0.38ms |   0.45ms |   0.42ms | true
 CCTSmqMkxJh3Zpa9gQ8rCzhY7GiTqK7KnSLBYrRriuan | ny5-dz01  | 64.86.249.22   |  68.81ms |  68.87ms |  68.85ms | true
 BX6DYCzJt3XKRc1Z3N8AMSSqctV6aDdJryFMGThNSxDn | ty2-dz01  | 180.87.154.78  | 112.16ms | 112.25ms | 112.22ms | true
 55tfaZ1kRGxugv7MAuinXP4rHATcGTbNyEKrNsbuVLx2 | ld4-dz01  | 195.219.120.66 | 138.15ms | 138.21ms | 138.17ms | true
 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k | ams-dz001 | 195.219.138.50 | 141.84ms | 141.97ms | 141.91ms | true
 65DqsEiFucoFWPLHnwbVHY1mp3d7MNM2gNjDTgtYZtFQ | frk-dz01  | 195.219.220.58 | 143.52ms | 143.62ms | 143.58ms | true
 9uhh2D5c14WJjbwgM7BudztdoPZYCjbvqcTPgEKtTMZE | sg1-dz01  | 180.87.102.98  | 176.66ms | 176.76ms | 176.72ms | true
If no devices are returned in the output, wait 10-20 seconds and retry.

5. Disconnect from DoubleZero

In the next sections you will set your DoubleZero Enviroment. In order to ensure success, disconnect the current session. This will avoid issues related to multiple tunnels open on your machine.

Check

doublezero status
if it is up run:

doublezero disconnect

Up Next: Enviroment and Connection

You may proceed to connecting to DoubleZero Testnet, Mainnet-Beta or multicast mode. It may take up to one minute for the tunnel to connect, and you will need to complete some steps to register your validator on the DoubleZero Network.

Optional: Enable Prometheus Metrics

Operators familiar with Prometheus metrics may want to enable them for DoubleZero monitoring. This provides visibility into DoubleZero client performance, connection status, and operational health.

What Metrics Are Available

DoubleZero exposes several key metrics: - Build Information: Version, commit hash, and build date - Session Status: Whether the DoubleZero session is active - Connection Metrics: Latency and connectivity information - Performance Data: Throughput and error rates

Enable Prometheus Metrics

To enable Prometheus metrics on the DoubleZero client follow these steps:

1. Modify the doublezerod systemd service startup command

Create or edit the systemd override configuration:

sudo mkdir -p /etc/systemd/system/doublezerod.service.d/
sudo nano /etc/systemd/system/doublezerod.service.d/override.conf

Replace with this configuration:

Note that the -env flag needs to point to either testnet or mainnet-beta depending on which network you would like to gather data from. In the sample block testnet is used. You may swap this out for mainnet-beta if needed.

[Service]
ExecStart=
ExecStart=/usr/bin/doublezerod -sock-file /run/doublezerod/doublezerod.sock -env testnet -metrics-enable -metrics-addr localhost:2113

2. Reload and restart the service

sudo systemctl daemon-reload
sudo systemctl restart doublezerod
sudo systemctl status doublezerod

3. Verify metrics are available

Test that the metrics endpoint is responding:

curl -s localhost:2113/metrics | grep doublezero

Expected output:

# HELP doublezero_build_info Build information of the client
# TYPE doublezero_build_info gauge
doublezero_build_info{commit="0d684e1b",date="2025-09-10T16:30:25Z",version="0.6.4"} 1
# HELP doublezero_session_is_up Status of session to doublezero
# TYPE doublezero_session_is_up gauge
doublezero_session_is_up 0

Troubleshooting

If metrics are not appearing:

  1. Check service status: sudo systemctl status doublezerod
  2. Verify configuration: sudo systemctl cat doublezerod
  3. Check logs: sudo journalctl -u doublezerod -f
  4. Test endpoint: curl -v localhost:2113/metrics
  5. Verify port: netstat -tlnp | grep 2113

Configure Prometheus Server

Configuration, and security are beyond the scope of this documentation. Grafana is an excellent option for visualization, and has documentation available here detailing how to collect Prometheus metrics.

Grafana Dashboard (Optional)

For visualization, you can create a Grafana dashboard using the DoubleZero metrics. Common panels include: - Session status over time - Build information - Connection latency trends - Error rate monitoring