The increasingly interconnected network results in the change of information flow between users and service providers, hence there is an emerging need for building a secure channel for connections. Currently, Public Key Infrastructure System (shortly PKI), the hierarchical trust relationship system, is the most widely used cornerstone technology to help secure the communication channels. However, PKI recently concerns the users due to various security breaches, i.e., the compromised PKI allows attackers to issue any valid keys to the victim and decrypt any secure connections within the system. In this paper, we design a decentralized PKI system, called NoPKI, by leveraging the blockchain technology. The system has multiple small and trusted groups called the neighborhood, which can be formed dynamically. These neighbors are the players in each neighborhood, and each transaction in the PKI system (including registration, revocation, and validation) requires witnesses of neighbors. In the evaluation, we implement our system and validate that our system ensures not only long-term accessibility but also the certificate security and public audit-ability.