Guide: Créer un Nœud Public

From Nxt Wiki
Jump to: navigation, search
This page is a translated version of the page How-To:CreatePublicNode and the translation is 50% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎Nederlands • ‎português do Brasil • ‎русский • ‎українська

1 Mettre en place un nœud public Nxt sur un VPS ou un serveur dédié'

NOTE: Il s’agit d'une opération avancée, et ce n'est pas une activité appropriée pour les personnes qui ne sont pas à l'aise avec Linux, les concepts de réseau, ou les interfaces de lignes de commande. Suivre ces étapes implique que vous désirez payer un abonnement mensuel à un fournisseur de service qui hébergera votre nœud Nxt. Si vous ne savez pas ce qu'est une adresse IP ou si vous ne savez pas utiliser un éditeur de texte en lignes de commande, ce n'est probablement pas pour vous. Lisez toutes les instructions et soyez sûrs que vous les comprenez avant de décider de continuer. Vous pouvez toujours contribuer au réseau en exécutant Nxt sur votre propre ordinateur.

  1. Inscivez vous pour un VPS (Virtual Private Server) avec un fournisseur comme digitalocean.com. Ces instructions supposent que vous utilisez DigitalOcean, mais d'autres fournisseurs sont similaires et offrent leur propre "documentation d'aide" pour la mise en place d'un serveur.
  2. Une fois que vous avez souscris, vous pouvez approvisionner votre compte
    • $5 couvre 1 mois de calculs pour 1 serveur, avec une petite quantité de stockage et de RAM. C'est suffisant, mais pas idéal
    • le plan mensuel de $10, avec 1 GB RAM VPS, est mieux et plus stable
  3. Créez votre premier droplet
    1. Choisissez le nom d'hôte (hostname) que vous voulez
    2. Choisissez l'option à $5 ou $10 par mois
    3. Choisissez "Debian 7.0 x64" qui est Debian sous l'onglet Linux Distributions

Once created, you will receive an email with the IP address, username (should be 'root'), and password. You are now ready to connect to your new server, and set up Nxt.

  1. If you are on Windows, download Putty ( http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html ) and use it to connect to your VPS.
    • If you are on a Mac, you can use your Terminal application, which is built in to MacOS
    • If you are on any UNIX system, you can use any shell
  2. Connect to your VPS
    1. If you are using putty, open it. Input the IP Address from the email into the Host Name field and select open.
    2. If you are using Terminal or a UNIX shell, use ssh to connect to your server by typing ssh {IPAddress}, where {IPAddress} is the address of your VPS
  3. Input the commands to setup your server
    • NOTE 1: These steps will set up your Nxt node to run as 'root'. This is risky, since anyone who compromises this account will get full access to your VPS. It is better to set up a separate user account to run your Nxt node. Setting up a user account is outside the scope of this How-To... but if you do not know how to set up a user account, this whole thing may be a Bad Idea for you.
    • NOTE 2: These steps make reference to a download link for the NRS software. The current version is 1.11.5, and is available from https://bitbucket.org/JeanLucPicard/nxt/downloads/nxt-client-1.11.5.zip. You can verify that the software is authentic by checking its SHA256 hash value, which is
      facb359f2a4fae62b5e2cbb2f5a41bd8cface8090ba72d3ddcba22a904fb23d3
      (source: Developers Release) - How to verify SHA256 checksums.
    1. The first step is to login. Just enter the username from the email (most likely root). Then enter (or copy and paste). Now you're ready to run these commands:
      1. sudo apt-get update
      2. sudo apt-get install openjdk-7-jre nano
      3. wget https://bitbucket.org/JeanLucPicard/nxt/downloads/nxt-client-1.11.5.zip
      4. unzip nxt.zip
        • NOTE: The exact filename may not be nxt.zip, depending on the version. The filename is the same as in the download link.
      5. pico nxt/conf/nxt-default.properties
        • "pico" is the name of a text editing utility. If you do not have pico on your system, try "nano".
      6. write these lines, where X.X.X.X is the IP address of the host:
        • nxt.myAddress=X.X.X.X
        • nxt.allowedBotHosts=127.0.0.1; localhost; X.X.X.X; 0:0:0:0:0:0:0:1;
        • nxt.allowedUserHosts=127.0.0.1; localhost; X.X.X.X; 0:0:0:0:0:0:0:1;
      7. press CTRL+X and then Y to save the file.
      8. cd ~/nxt
      9. nohup java -cp nxt.jar:lib/*:conf nxt.Nxt &
      10. exit
  4. open http://ipaddress:7876 in your browser to verify NXT is running ok. Your browser will give you a security certificate warning; this is normal. Click confirm to proceed. Your node is up and running!
  5. You should create a hallmark for your node. Read our hallmark FAQ, and then see these instructions.

1.1 Additional Tools

These tools have been created by the community and may help you manage your node:

  • http://nxtra.org/nodes/ (for generating a random list of well-known peers you can put in your web.xml file)
  • http://www.peerexplorer.com/ provides information and statistics on public servers that are running Nxt
  • nxtcoinbox offers a simple shell script for setting up and deploying a node on a Linux server
  • http://nxt.now.im for automated management of up to thousands of VPSs. Advanced linux/ansible.


1.2 Public Node from your home

Running a public server on your home system is similar to running an accessible peer-to-peer node on services such as napster (r.i.p.), emule, bittorrent, bitcoin, etc. So if you want to run a public server at your home (warning, you could potentially see a big traffic utilization happen), then unless you have uPNP on your home router set up, you must open a specific port (7874 for NXT) to incoming TCP traffic on your router and forward it to your computer that runs the NXT java software, and also open the same port on your computer's internal firewall. You also must edit a well-hidden configuration file, nxt/webapps/root/WEB-INF/web.xml, to insert your home internet connection's public IP address (from, for example, http://myip.dnsomatic.com) as the value of parameter myAddress. And if your IP number changes, you need to re-edit the file. Or if you upgrade the client you will also have to redo these edits to web.xml.

Preferably, you should obtain a free dynamic dns domain name from for example http://www.noip.com/free, set up the NOIP automatic update client to run at boot time on your system, and set myAddress to your noip.com name, such as nxtcoin9876.no-ip.org. In all cases, you need to save the web.xml file, so that when you upgrade NXT NRS client, you can then copy it back over the default file after unzipping an upgraded client.