You are reading the plain version of COIN Online.Open it on the COIN desktop »
COINonline home

Your money. Your business.

Guide

Run a node

Your wallet already runs a node while it's open. Keep one running around the clock and you help new users sync and keep the whole network strong.

Using the COIN Wallet? You already run a node. This guide is for keeping one online all the time, on a computer that stays on.

  1. Pick a computer that stays on

    A desktop that's always on, a home server or a small rented server all work. It needs room for the blockchain and a steady internet connection.

  2. Write a config file

    Next to coind, save this as coind.cfg:

    coind.cfg
    p2p-bind-ip=0.0.0.0
    p2p-bind-port=38880
    add-priority-node=seed.coinnet.org:38880
    out-peers=32
    in-peers=64
    rpc-bind-ip=127.0.0.1
    rpc-bind-port=38881

    It accepts peers on every network connection, keeps a line open to the seed node, allows up to 32 outgoing and 64 incoming peers and keeps the control port private to this computer.

  3. Start the node

    $ ./coind --config-file coind.cfg --detach

    On Windows, run coind --config-file coind.cfg in a Command Prompt and leave the window open.

  4. Open port 38880

    On your router, forward TCP port 38880 to this computer, and allow it through the computer's firewall. On Ubuntu that's sudo ufw allow 38880/tcp. Keep 38881 closed.

  5. Check it's working

    $ ./coind status

    It shows how far the node has synced and how many peers it has. Once incoming connections appear, other nodes are reaching you. Thank you.

Advanced: start the node with the computer (systemd)

On Linux, systemd can start coind at boot and restart it if it stops. Save this as /etc/systemd/system/coind.service, changing the user and the two paths to match where you put things:

[Unit]
Description=Coin node
After=network-online.target
Wants=network-online.target

[Service]
User=coin
ExecStart=/opt/coin/coind --config-file /opt/coin/coind.cfg --non-interactive
Restart=on-failure

[Install]
WantedBy=multi-user.target
$ sudo systemctl enable --now coind

Starts the node now and at every boot. systemctl status coind shows whether it's running.

Advanced: save disk space

Add prune-blockchain=1 to coind.cfg to keep a pruned copy of the blockchain. A pruned node still checks every block, but stores less of the old data.

Advanced: offer your node to other wallets

You can let other people's wallets use your node as a remote node. Only do this with restricted RPC, which allows wallet requests and blocks anything that could change your node:

rpc-bind-ip=0.0.0.0
confirm-external-bind=1
restricted-rpc=1

Then open TCP 38881 as well. Wallets connect to your address on that port.