Start a Node - Vast

Start a node on Docker clouds such as vast.ai

We DON'T encourage to rent a GPU on the cloud to run Crynux Node in general. The income from running a Crynux Node may not cover the cost to rent the GPU.

Use at your own risk!

DO NOT use the Web UI to create or import private keys on Vast!

You will lose your tokens!

If you're using HTTP protocol to access the WebUI, the connection is not encrypted, and the private key might be intercepted by a malicious middle man.

Instead, use an SSH connection in the terminal to transfer your private key to the node.

Your private key is not secure on Vast!

You will lose your tokens!

The docker containers started on Vast are running on the local computers of the individual node providers, who could retrieve your private key easily from the container, and steal your funds.

DO NOT use Vast unless Cold Wallet is enabled.

The Crynux Node can be easily started on cloud services, such as Vast.ai, who supports starting a VM using Docker images directly. The steps to start a node on those services are quite similar. We will use Vast.ai as an example to show the complete steps to start a Crynux Node.

Start the container using template

We have already created the template for the Crynux Node on Vast, just use this template to start the node:

The content of the template is shown below:

Some highlights in case you are starting the container using other cloud services:

  • Use the image link of Crynux Node to start the container:

ghcr.io/crynux-ai/crynux-node:latest

  • Expose port 7412 for WebUI

  • Use the default docker ENTRYPOINT to start the container. Do not use interactive shells.

After selecting your desired hardware, and starting the instance, find the instance in the INSTANCES tab:

Wait until the container finishes initialization, and shows the RUNNING status.

Find the URL to access the WebUI

Click on the network info button to show the detailed ip address and ports:

The URL to access the WebUI will be shown in the popup:

In this case, the URL of the WebUI is http://213.181.122.2:40021. Just open it in a browser window, you should see the WebUI of the Node:

4. Prepare the wallet

DO NOT use the Web UI to create or import private keys on Vast!

You will lose your tokens!

If you're using HTTP protocol to access the WebUI, the connection is not encrypted, and the private key might be intercepted by a malicious middle man.

Instead, use an SSH connection in the terminal to transfer your private key to the node.

Your private key is not secure on Vast!

You will lose your tokens!

The docker containers started on Vast are running on the local computers of the individual node providers, who could retrieve your private key easily from the container, and steal your funds.

DO NOT use Vast unless Cold Wallet is enabled.

Use an SSH connection to login to the Docker container you started, and set the private key in the config file at:/app/config/config.yml, and the field name is privkey:

ethereum:
  privkey: ""

After you filled the value of the private key, restart the Docker container.

Get the test CNX tokens from the Discord Server

Some test CNX tokens are required to start the node. The test CNX tokens can be acquired for free in the Discord server of Crynux:

In the happy-aigen-discussions channel of the Discord server, type in the following command in the input bar, DO NOT copy & paste the command, it only works when typed in using keyboard:

/user join

Then bind the wallet address using the following command:

/node wallet {wallet_address}

Remember to replace {wallet_address} with the wallet address you just created in the Web UI.

After a short while, the test CNX tokens should appear in your node wallet:

5. Wait for the system initialization to finish

If this is the first time you start a node, it could take quite a long while for the system to initialize. The most time consuming step is to download ~40GB of the commonly used model files from the Huggingface. The time may vary depending on your network speed.

After the models are downloaded, a test image generation task will be executed locally to examine the capability of your device. If the device is not capable to generate images, or the generation speed is too slow, the node will not be able to join the network. If the task is finished successfully, the initialization is completed:

6. Join the Crynux Network

The Crynux Node will try to join the network automatically every time it is started. After the transaction is confirmed on-chain, the node has successfully joined the network. When the node is selected by the network to execute a task, the task will start automatically, and the tokens will be transferred to the node wallet after the task is finished.

Now the Node is fully up and running. You could just leave it there to run tasks automatically.

The Node could be paused or stopped at any time by clicking the control buttons. If the node is in the middle of running a task, after clicking the buttons, the node will go into the "pending" status and continue with the running task. When the task is finished, the node will pause/stop automatically.

The difference between pausing and stopping is that pausing will not cause the staked CNX tokens to be returned, so that the transaction costs less gas fee than stopping. If you have a plan of going back, you could use pausing rather than stopping.

Last updated