{"id":13509857,"url":"https://github.com/nknorg/nkn","last_synced_at":"2026-02-12T06:40:26.222Z","repository":{"id":37711354,"uuid":"119047243","full_name":"nknorg/nkn","owner":"nknorg","description":"Official Go implementation of NKN full node.","archived":false,"fork":false,"pushed_at":"2025-07-18T09:32:39.000Z","size":35351,"stargazers_count":485,"open_issues_count":20,"forks_count":166,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-07-18T13:39:39.643Z","etag":null,"topics":["blockchain","decentralization","distributed-systems","go","network","nkn","p2p"],"latest_commit_sha":null,"homepage":"https://www.nkn.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nknorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-01-26T12:07:15.000Z","updated_at":"2025-07-18T09:32:44.000Z","dependencies_parsed_at":"2026-01-01T16:03:04.067Z","dependency_job_id":null,"html_url":"https://github.com/nknorg/nkn","commit_stats":null,"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"purl":"pkg:github/nknorg/nkn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nknorg%2Fnkn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nknorg%2Fnkn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nknorg%2Fnkn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nknorg%2Fnkn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nknorg","download_url":"https://codeload.github.com/nknorg/nkn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nknorg%2Fnkn/sbom","scorecard":{"id":690262,"data":{"date":"2025-08-11","repo":{"name":"github.com/nknorg/nkn","commit":"1e65fafdf8f00c27c886cfb5b00b6ddf173e742e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 10/21 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-ubuntu.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-ubuntu.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/nknorg/nkn/build-ubuntu.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-ubuntu.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/nknorg/nkn/build-ubuntu.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/Dockerfile:2","Warn: containerImage not pinned by hash: docker/Dockerfile:9","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.2.1 not signed: https://api.github.com/repos/nknorg/nkn/releases/155643431","Warn: release artifact v2.2.0 not signed: https://api.github.com/repos/nknorg/nkn/releases/94372204","Warn: release artifact v2.1.9 not signed: https://api.github.com/repos/nknorg/nkn/releases/70444078","Warn: release artifact v2.1.8 not signed: https://api.github.com/repos/nknorg/nkn/releases/60307300","Warn: release artifact v2.1.7 not signed: https://api.github.com/repos/nknorg/nkn/releases/51529740","Warn: release artifact v2.2.1 does not have provenance: https://api.github.com/repos/nknorg/nkn/releases/155643431","Warn: release artifact v2.2.0 does not have provenance: https://api.github.com/repos/nknorg/nkn/releases/94372204","Warn: release artifact v2.1.9 does not have provenance: https://api.github.com/repos/nknorg/nkn/releases/70444078","Warn: release artifact v2.1.8 does not have provenance: https://api.github.com/repos/nknorg/nkn/releases/60307300","Warn: release artifact v2.1.7 does not have provenance: https://api.github.com/repos/nknorg/nkn/releases/51529740"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-hjwq-mjwj-4x6c","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-vf6r-87q4-2vjf","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-8g77-54rh-46hx","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-q82r-2j7m-9rv4","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2024-2631 / GHSA-c5q2-7r4c-mv6g"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T02:09:34.590Z","repository_id":37711354,"created_at":"2025-08-22T02:09:34.590Z","updated_at":"2025-08-22T02:09:34.590Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","decentralization","distributed-systems","go","network","nkn","p2p"],"created_at":"2024-08-01T02:01:14.937Z","updated_at":"2026-02-12T06:40:26.202Z","avatar_url":"https://github.com/nknorg.png","language":"Go","funding_links":[],"categories":["Go","blockchain"],"sub_categories":[],"readme":"[![NKN](https://github.com/nknorg/nkn/wiki/img/nkn_logo.png)](https://nkn.org)\n\n# NKN Full Node\n\n### _Official Go implementation of NKN full node._\n\n\u003cbr/\u003e\n\n[![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/nknorg/nkn/v2)](https://goreportcard.com/report/github.com/nknorg/nkn/v2) [![Build Status](https://github.com/nknorg/nkn/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/nknorg/nkn/actions/workflows/build-ubuntu.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#contributing)\n\n### Dev Status: V2 line, Production (Stable and Feature-Complete)\n\n---\n\n\u003cbr/\u003e\n\n\u003e NKN, short for New Kind of Network, is a project aiming to rebuild the\n\u003e Internet that will be truly open, decentralized, dynamic, safe, shared and\n\u003e owned by the community.\n\nOfficial website: [https://nkn.org/](https://nkn.org/)\n\nNote: This is the official **full node** implementation of the NKN protocol,\nwhich relays data for clients and earn mining rewards. For **client**\nimplementation which can send and receive data, please refer to:\n\n- [nkn-sdk-go](https://github.com/nknorg/nkn-sdk-go)\n- [nkn-sdk-js](https://github.com/nknorg/nkn-sdk-js)\n- [nkn-java-sdk](https://github.com/nknorg/nkn-java-sdk)\n\n## Introduction\n\nThe core of the NKN network consists of many connected nodes distributed\nglobally. Every node is only connected to and aware of a few other nodes called\nneighbors. Packets can be transmitted from any node to any other node in an\nefficient and verifiable route. Data can be sent to any clients without public\nor static IP address using their permanent NKN address with end-to-end\nencryption. The network stack of NKN network is open source at another repo\ncalled [nnet](https://github.com/nknorg/nnet) that can be used to build other\ndecentralized/distributed systems.\n\nThe relay workload can be verified using our Proof of Relay (PoR) algorithm. A\nsmall and fixed portion of the packets will be randomly selected as proof. The\nrandom selection can be verified and cannot be predicted or controlled. Proof\nwill be sent to other nodes for payment and rewards.\n\nA node in our network is both relayer and consensus participant. Consensus among\nmassive nodes can be reached efficiently by only communicating with neighbors\nusing our consensus algorithm based on Cellular Automata. Consensus is reached\nfor every block to prevent fork.\n\nMore details can be found in [our wiki](https://github.com/nknorg/nkn/wiki).\n\n## Technical Highlights\n\n- Transmit any data to any node/client without any centralized server.\n- Proof-of-Relay, a useful proof of work: mining is relaying data.\n- Extremely scalable consensus algorithm (billions of nodes within seconds).\n- Strong consistency rather than eventual consistency.\n- Dynamic, large-scale network.\n- Verifiable topology and routes.\n- Secure address scheme with public key embedded.\n\n### Use pre-built binaries\n\nYou just need to download and decompress the correct version matching your OS\nand architecture from [github releases](https://github.com/nknorg/nkn/releases).\n\nNow you can jump to [configuration](#configuration) for how to configure and run\na node.\n\n### Use pre-built Docker image\n\n_Prerequirement_: Have working docker software installed. For help with that\nvisit [official docker\ndocs](https://docs.docker.com/install/#supported-platforms)\n\nWe host latest Docker image (the same as you [build with\ndocker](#building-using-docker)) on our official Docker Hub account. You can get\nit by\n\n```shell\n$ docker pull nknorg/nkn\n```\n\nNow you can jump to [configuration](#configuration) for how to configure and run\na node.\n\n### Building using Docker\n\n_Prerequirement_: Have working docker software installed. For help with that\nvisit [official docker\ndocs](https://docs.docker.com/install/#supported-platforms)\n\nBuild and tag Docker image\n\n```shell\n$ docker build -f docker/Dockerfile -t nknorg/nkn .\n```\n\nThis command should be run once every time you update the code base.\n\n### Building from source\n\nTo build from source, you need a properly configured Go environment (lookup the required version within [go.mod](https://github.com/nknorg/nkn/blob/master/go.mod#L3), and\nsee [Go Official Installation Documentation](https://golang.org/doc/install) for install instructions).\n\nBuild the source code with make\n\n```shell\n$ git clone https://github.com/nknorg/nkn.git\n$ cd nkn\n$ make\n```\n\nRun Unit Tests\n\n```sh\n# run all tests\n$ go test -v ./...\n\n# run only specific tests\ngo test -v ./chain/store\n```\n\nAfter building is successful, you should see two executables:\n\n- `nknd`: the nkn node program\n- `nknc`: command line tool for nkn node control\n\nNow you can see [configuration](#configuration) for how to configure and run a\nnode.\n\nYou can also build binaries for other architectures by executing `make all`. The\nresulting binaries are stored in `build` directory.\n\n### Configuration\n\nWhen starting a NKN node (i.e. running `nknd`), it will reads a few configurable\nfiles: `config.json` for configuration, `wallet.json` for wallet, and `certs/*`\nfor certificates. Additionally, it will read directory `web` for web GUI\ninterface static assets. By default `nknd` assumes they are located in the\ncurrent working directory.\n\nFor Docker, a directory containing `config.json`, `wallet.json` (if exists) and\n`certs/` should be mapped to `/nkn/data` directory in the container. If not\nprovided, the default config and certs will be copied to `/nkn/data/`, and a\nwallet and random password will be generated and saved to `/nkn/data/` on nknd\nlaunch.\n\nThe path of config file, wallet file, database directory and log directory can\nbe specified by passing arguments to `nknd` or in `config.json`, run `nknd\n--help` for more information.\n\n#### `config.json`:\n\nWe provide a few sample `config.json`:\n\n- `config.mainnet.json`: join the mainnet\n- `config.local.json`: create and join a private chain on your localhost\n\nYou can copy the one you want to `config.json` or write your own.\n\nFor convenience, we ship a copy of `config.mainnet.json` in release version (as\n`default.json`) and in docker image (under `/nkn/`). The docker container will\ncopy this default one to `/nkn/data/config.json` if not exists on nknd launch.\n\nIf config file is not provided, node will join the mainnet by default.\n\n#### `wallet.json`:\n\nBefore starting the node, you need to create a new wallet first. Wallet\ninformation will be saved at `wallet.json` and it's encrypted with the password\nyou provided when creating the wallet. So please make sure you pick a strong\npassword and remember it!\n\n```shell\n$ ./nknc wallet -c\nPassword:\nRe-enter Password:\nAddress                                Public Key\n-------                                ----------\nNKNRQxosmUixL8bvLAS5G79m1XNx3YqPsFPW   35db285ea2f91499164cd3e19203ab5e525df6216d1eba3ac6bcef00503407ce\n```\n\n**[IMPORTANT] Each node needs to use a unique wallet. If you use share wallet\namong multiple nodes, only one of them will be able to join the network!**\n\nIf you are using Docker, it should be `docker run -it -v ${PWD}:/nkn/data\nnknorg/nkn nknc wallet -c` instead, assuming you want to store the `wallet.json`\nin your current working directory. If you want it to be saved to another\ndirectory, you need to change `${PWD}` to that directory.\n\nThe docker container will create a wallet saved to `/nkn/data/wallet.json` and a\nrandom password saved to `/nkn/data/wallet.pswd` if not exists on nknd launch.\n\n#### `certs/`\n\n`nknd` uses Let's Encrypt to apply and renew TLS certificate and put in into `cert/` directory. By default `nknd` will generate certificate with `x-x-x-x.ipv4.staticdns{1,2,3}.io` domain name which `x-x-x-x` is your ipv4 address, replace dot with dash. **The default cert domain is deprecated and will be removed in the future version. Please provide your own domain or cert if you need to use tls.**\n\nIf you would like to use your own domain name, simply set `CertDomainName` with your domain name in `config.json`, `nknd` will\nautomatically apply or renew certificate from Let's Encrypt and deploy it.\n\nIf you already have certificate and want to use it in `nknd`, you can put it in the `certs` directory then set\n`HttpsJsonDomain` `HttpWssDomain` with your domain name, `HttpsJsonCert` `HttpsJsonKey` `HttpWssCert` `HttpWssKey`\nwith your certificate full chain file and private key file.\n\n#### Data and Logs\n\nAfter `nknd` starts, it will creates two directories: `ChainDB` to store\nblockchain data, and `Log` to store logs. By default `nknd` will creates these\ndirectories in the current working directory, but it can be changed by passing\n`--chaindb` and `--log` arguments to `nknd` or specify in config.json.\n\nNow you can [join the mainnet](#join-the-mainnet) or [create a private chain](https://github.com/nknorg/nkn/wiki/Create-a-Private-Chain).\n\n### Join the MainNet\n\n**[IMPORTANT] In order to join the MainNet, you need to have a public IP\naddress, or set up [port forwarding](#port-forwarding) on your router properly\nso that other people can establish connection to you.**\n\nIf you have done the previous steps correctly (`config.json`, create wallet,\npublic IP or port forwarding), joining the MainNet is as simple as running:\n\n```shell\n$ ./nknd\n```\n\nIf you are using Docker then you should run the following command instead:\n\n```shell\n$ docker run -p 30001-30005:30001-30005 -v ${PWD}:/nkn/data --name nkn --rm -it nknorg/nkn\n```\n\nIf you would like to enable web GUI interface from outside of the container, you\nneed to replace `-p 30001-30005:30001-30005` with `-p 30000-30005:30000-30005`.\n\nIf you get an error saying `docker: Error response from daemon: Conflict. The\ncontainer name \"/nkn\" is already in use by container ...`, you should run\n`docker rm nkn` first to remove the old container.\n\nIf everything goes well, you should be part of the MainNet after a few minutes!\nYou can query your wallet balance (which includes the NKN token you've mined)\nby:\n\n```shell\n$ ./nknc wallet -l balance\n```\n\nor if you are using Docker:\n\n```shell\n$ docker exec -it nkn nknc wallet -l balance\n```\n\nIf there is a problem, you may want to check if any of the previous steps went\nwrong. If the problem still persists, [create an\nissue](https://github.com/nknorg/nkn/issues/new) or ask us in our [Discord\ngroup](#community).\n\n### [Recommended] Using Beneficiary Address\n\nBy default, token mined by your node will be sent to the wallet your node is\nusing, which is NOT as safe as you might think. The recommended way is to use\nanother cold wallet (that is saved and backed up well) to store your token. You\ncan use your code wallet address as `beneficiaryAddr` in `config.json` such that\ntoken mined by your node will be sent directly to that beneficiary address. This\nis safer and more convenient because: 1. even if your node is hacked, or your\nnode wallet is leaked, you will not lose any token; 2. if you run multiple\nnodes, it's the only way that all their mining rewards will go to the same\naddress.\n\n### NAT traversal and port forwarding\n\nBy default, `nknd` will try to detect if your node is behind a router and if your router supports UPnP or NAT-PMP protocol, and if success, it will try to set up port forwarding automatically. You can add `--no-nat` flag when starting nknd OR add `\"NAT\": false` in `config.json` to disable automatic port forwarding. If your router does not support such protocol, you **have to** setup port forwarding on your router for port 30001 as well as **all** other ports specified in `config.json` (30001-30005 by default), otherwise other nodes cannot establish connections to you and you will **NOT** be able to earn mining rewards even though your node can still run and sync blocks.\n\nWhen setting up port forwarding, public port needs to be the same as private\nport mapped to your node. For example, you should map port 30001 on your\nrouter's public IP address to port 30001 on your node's internal IP address.\n\nThe specific steps to setup port forwarding depends on your router. But in\ngeneral, you need to log in to the admin interface of your router (typically in\na web browser), then navigate to the port forwarding section, and create several\nmappings, one for each port. One of the easiest way to find out how to setup\nport forwarding on your router is to search \"how to setup port forwarding\" +\nyour router model or name online.\n\n## Contributing\n\n**Can I submit a bug, suggestion or feature request?**\n\nYes. Please [open an issue](https://github.com/nknorg/nkn/issues/new) for that.\n\n**Can I contribute patches to NKN project?**\n\nYes, we appreciate your help! To make contributions, please fork the repo, push\nyour changes to the forked repo with signed-off commits, and open a pull request\nhere.\n\nPlease follow our [Golang Style Guide](https://github.com/nknorg/nkn/wiki/NKN-Golang-Style-Guide)\nfor coding style.\n\nPlease sign off your commit. This means adding a line \"Signed-off-by: Name\n\u003cemail\u003e\" at the end of each commit, indicating that you wrote the code and have\nthe right to pass it on as an open source patch. This can be done automatically\nby adding -s when committing:\n\n```shell\ngit commit -s\n```\n\n## Community\n\n- [Forum](https://forum.nkn.org/)\n- [Discord](https://discord.gg/c7mTynX)\n- [Telegram](https://t.me/nknorg)\n- [Reddit](https://www.reddit.com/r/nknblockchain/)\n- [Twitter](https://twitter.com/NKN_ORG)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnknorg%2Fnkn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnknorg%2Fnkn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnknorg%2Fnkn/lists"}