Guide

About

Twister

Twister is an open source, decentralized p2p microblogging platform, created by Miguel Freitas in June, 2013.

Software conception uses it own PoW blockchain to store the user meta and DHT/BitTorrent protocol to share the data. Twister supports TOR to make host connections protected, direct messages end-to-end encrypted, groups, and other features.

To start using twister, no funds needed, the network works for everyone and for free. Infrastructure running by PoW miners advertising their services in promotion posts and DNS seeders, who crawling the active connections. User content saving permanently between following nodes, not require stable online from publisher. Data storage not censured, not owned just by publisher and not limited in time. Your posts accessible as long as you have followers online.

For more technical details about twister conception, please read original Whitepaper.

According to Announcement, in June 25, 2020 official project maintenance was discontinued, but the Network still active as not requires centralized servers.

Twisterarmy

Twisterarmy is a non-profitable organization, created in 2021 by few users with intention to support original twister network in the community format.

Community resources contain many of independent forks by different people: related software collections, analytics tools, cloud servers and finally - self maintained software solutions, like TwisterArmy Edition with extra-features which not included in official repository. To get more details about our activity, take a look at Twisterarmy GitHub Repository.

Our goal to keep speech tools free, people connection accessible and source code living.

If you have any of propositions, please create new ticket or send a message to our official account @twisterarmy

Let's build a freedom together ♡

Getting Started

Overview

There is few twister versions available: Official and Twisterarmy Editions. We recommend to chose the last one, because it supports new DNS seeders and some features, like more templates and media formats support, still not merged with official one. For more details, please read release notes of selected version.

Both of versions are compatible with original twister blockchain, soft- and hard-points, has the same dependencies an code-level versions.

Also, Twisterarmy Edition updates are sending to official branches, but not all of them merged with official codebase. All of official updates are merging with Twisterarmy Edition.

Requirements

  • CPU Architectures: amd64, ARM
  • CPU Freq: 500MHz
  • RAM: 1024 Mb
  • Storage: 2048 Mb
  • Bandwidth: depends on the network activity, at this moment - about 2 Gb per month.

Install

At this moment, available community-maintained pre-compiled Debian/Linux binaries for amd64 and armhf processors.

To download latest version, please visit Installation page.

Pre-compiled binaries contain all requirements to launch twister full node on your machine.

Package installation example:

          sudo dpkg -i twister.deb
        

After installing, launch twister node from application menu or by command line interface.

Web application in your browser should be opened automatically at the address: http://localhost:28332

Uninstall

Purge twister software removing may be initiated by the command or using GUI software manager:

          sudo apt remove twister
        

Build from Source

The better way to use free and open software is building it from the sources.

We recommend to use Twister CLI Installer script, where you can simply select twister edition and setup remote connection by answering guide questions.

If you would like to build twister for yourself, please, choose edition you like and follow instructions on the Installation Page, Build from Source section.

Manual installation means installing twister-core server and twister-html client separately.

Alternative Usage

If you have hardware or internet provider restrictions, limited connection or wish to join twisterverse trough smartphone or laptop where power safe in priority,

try connect to Twister Cloud Providers where the local node installation not required.

Development

Command Line Interface

          twisterd [options]
          twisterd [options] command [params]    Send command to -server or twisterd
          twisterd [options] help                List commands
          twisterd [options] help command        Get help for a command
        

Options

          -?                                     This help message
          -conf=file                             Specify configuration file (default: ~/.twister/twister.conf)
          -pid=file                              Specify pid file (default: twisterd.pid)
          -gen                                   Generate coins (default: 0)
          -datadir=dir                           Specify data directory
          -htmldir=dir                           Specify HTML directory to serve (default: data/html)
          -dbcache=n                             Set database cache size in megabytes (default: 25)
          -timeout=n                             Specify connection timeout in milliseconds (default: 5000)
          -proxy=ip:port                         Connect through socks proxy
          -socks=n                               Select the version of socks proxy to use (4-5, default: 5)
          -tor=ip:port                           Use proxy to reach tor hidden services (default: same as -proxy)
          -dns                                   Allow DNS lookups for -addnode, -seednode and -connect
          -port=port                             Listen for connections on port (default: 28333 or testnet: 18333)
          -maxconnections=n                      Maintain at most n connections to peers (default: 125)
          -addnode=ip                            Add a node to connect to and attempt to keep the connection open
          -connect=ip                            Connect only to the specified node(s)
          -seednode=ip                           Connect to a node to retrieve peer addresses, and disconnect
          -externalip=ip                         Specify your own public address
          -onlynet=net                           Only connect to nodes in network net (IPv4, IPv6 or Tor)
          -multiconnperip                        Enable libtorrent multiple connections per ip (default: 0)
          -discover                              Discover own IP address (default: 1 when listening and no -externalip)
          -checkpoints                           Only accept block chain matching built-in checkpoints (default: 1)
          -listen                                Accept connections from outside (default: 1 if no -proxy or -connect)
          -bind=addr                             Bind to given address and always listen on it. Use [host]:port notation for IPv6
          -dnsseed                               Find peers using DNS lookup (default: 1 unless -connect)
          -banscore=n                            Threshold for disconnecting misbehaving peers (default: 100)
          -bantime=n                             Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
          -maxreceivebuffer=n                    Maximum per-connection receive buffer, n*1000 bytes (default: 5000)
          -maxsendbuffer=n                       Maximum per-connection send buffer, n*1000 bytes (default: 1000)
          -upnp                                  Use UPnP to map the listening port (default: 1 when listening)
          -paytxfee=amt                          Fee per KB to add to transactions you send
          -testnet                               Use the test network
          -debug                                 Output extra debugging information. Implies all other -debug* options
          -debugnet                              Output extra network debugging information
          -logtimestamps                         Prepend debug output with timestamp
          -shrinkdebugfile                       Shrink debug.log file on client startup (default: 1 when no -debug)
          -printtoconsole                        Send trace/debug info to console instead of debug.log file
          -regtest                               Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.
          -rpcuser=user                          Username for JSON-RPC connections
          -rpcpassword=pw                        Password for JSON-RPC connections
          -rpcport=port                          Listen for JSON-RPC connections on port (default: 28332 or testnet: 18332)
          -rpcallowip=ip                         Allow JSON-RPC connections from specified IP address
          -rpcconnect=ip                         Send commands to node running on ip (default: 127.0.0.1)
          -rpcthreads=n                          Set the number of threads to service RPC calls (default: 10)
          -public_server_mode                    Limit JSON-RPC execution to public/safe commands only.
          -blocknotify=cmd                       Execute command when the best block changes (%s in cmd is replaced by block hash)
          -walletnotify=cmd                      Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
          -alertnotify=cmd                       Execute command when a relevant alert is received (%s in cmd is replaced by message)
          -upgradewallet                         Upgrade wallet to latest format
          -keypool=n                             Set key pool size to n (default: 100)
          -rescan                                Rescan the block chain for missing wallet transactions
          -salvagewallet                         Attempt to recover private keys from a corrupt twisterwallet.dat
          -checkblocks=n                         How many blocks to check at startup (default: 500, 0 = all)
          -checklevel=n                          How thorough the block verification is (0-4, default: 3)
          -txindex                               Maintain a full transaction index (default: 0)
          -loadblock=file                        Imports blocks from external blk000??.dat file
          -reindex                               Rebuild block chain index from current blk000??.dat files
          -par=n                                 Set the number of script verification threads (up to 16, 0 = auto, 0 = leave that many cores free, default: 0)

          -blockminsize=n                        Set minimum block size in bytes (default: 0)
          -blockmaxsize=n                        Set maximum block size in bytes (default: 250000)
          -blockprioritysize=n                   Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)

          -rpcssl                                Use OpenSSL (https) for JSON-RPC connections
          -rpcsslcertificatechainfile=file.cert  Server certificate file (default: server.cert)
          -rpcsslprivatekeyfile=file.pem         Server private key (default: server.pem)
          -rpcsslciphers=ciphers                 Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
        

JSON-RPC/API

JSON data requests should be encoded with UTF-8.

Before using API calls trough RPC interface, create configuration file in the twister profile directory.

On the UNIX-based platforms, path to the file looks like ~/.twister/twister.conf

          rpcuser=username
          rpcpassword=password
          rpcsslcertificatechainfile=path to certificate file (if SSL connection required)
          rpcsslprivatekeyfile=path to key file (if SSL connection required)
          rpcallowip=x.x.x.x to restrict connections from specified IP (0.0.0.0 or * to allow all connections)
        

* By using community-written twister-cli-installer script, configuration file and certificates creating automatically.

Calls list

          twisterd help
        

Code examples

PHP

cloud-server — Multi-account instance allow users to interact with the twister network through web service.

DNS seeder

Overview

Twister network requires a couple of special DNS seeders which provide an updated list of known peers. If you have a 24×7 linux machine and you are able to add an special NS record to your domain, please consider running twister-seeder.

Install

At this moment, twister-seeder could be compiled from the source code:

          sudo apt install build-essential libboost-all-dev libssl-dev
          git clone https://github.com/twisterarmy/twister-seeder.git
          cd twister-seeder
          make
        

Configuration

System

Enable 53 port connections, if the firewall enabled. With the ufw manager for ip-tables, it is possible just by one simple command bellow:

          sudo ufw allow 53
        

Ubuntu users must to free 53 port, that natively using for systemd-resolved process in /etc/systemd/resolved.conf

          DNSStubListener=no
        

DNS records

Usually, providers requires at least 2 NS records in the domain settings:

          domainseed.tk  NS domaindns1.tk, domaindns2.tk
          domaindns1.tk  A Server IP
          domaindns2.tk  A Server IP
        

On following example - DNS seeder implementation, that has name servers on itself subdomains:

          seed.domain.org NS ns1.domain.org, ns2.domain.org
          ns1.domain.org  A Server IP
          ns2.domain.org  A Server IP
        

To launch our DNS instance on the system startup, let's update crontab settings (by root):

          @reboot /path-to/dnsseed -h domainseed.tk -n domaindns1.tk
        

Testing

Run twister-seeder server by the root user:

          sudo /path-to/dnsseed -h domainseed.tk -n domaindns1.tk
        

If everything configurated properly, and DNS records cache has been updated, we can test DNS response with host tool:

          host -a domainseed.tk domaindns1.tk

          Trying "domainseed.tk"
          Using domain server:
          Name: domaindns1.tk
          Address: IP#53
          Aliases:

          ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18126
          ;; flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

          ;; QUESTION SECTION:
          ;domainseed.tk.		IN	ANY

          ;; ANSWER SECTION:
          domainseed.tk.	40000	IN	NS	domaindns1.tk.
          domainseed.tk.	60	IN	A	IP
          domainseed.tk.	60	IN	A	IP

          Received 99 bytes from IP#53 in 0 ms
        

Pay attention, in the ANSWER SECTION transmitting twister-core nodes, that running on port 28333 only, so if you also want to participate DATA sharing, do not forget about opening this port on your twister-core server using -port=28333 flag.

Network registration

Finally, our seeding instance should be reachable for other twister-seeder and twister-core nodes, so let's declare it in the source code of these projects.

twister-core

Find following string in the file src/chainparams.cpp

          vSeeds.push_back(CDNSSeedData("twisterarmy.dedyn.io", "seed.twisterarmy.dedyn.io"));
        

add

          vSeeds.push_back(CDNSSeedData("domainseed.tk", "domainseed.tk"));
        

or

          vSeeds.push_back(CDNSSeedData("seed.domain.org", "seed.domain.org"));
        

Note, after these changes, twister-core users need to be noticed about updating their software to apply these changes. Usually, it happens on the new release announcement.

twister-seeder

Find following string in the file main.cpp

          static const string mainnet_seeds[] = {"seed.twister.net.co","seed2.twister.net.co","seed3.twister.net.co","twisterseed.tk","twisterarmyseed.tk","seed.twisterarmy.dedyn.io",""};
        

add DNS seeder address to the end of this list:

          static const string mainnet_seeds[] = {"seed.twister.net.co","seed2.twister.net.co","seed3.twister.net.co","twisterseed.tk","twisterarmyseed.tk","seed.twisterarmy.dedyn.io","domainseed.tk",""};
        

or

          static const string mainnet_seeds[] = {"seed.twister.net.co","seed2.twister.net.co","seed3.twister.net.co","twisterseed.tk","twisterarmyseed.tk","seed.twisterarmy.dedyn.io","seed.domain.org",""};
        

Changes will be applied on the twister-seeders recompilation.

Network monitor

Add your DNS to the Network Monitor on this website by changing providers list on GitHub.

Troubleshooting

DNS offline

If your twister-seeder returns empty results on the network crawling, like response on example below, seems that another DNS seeding instances could be offline:

          0/2 available (2 tried in 333s, 0 new, 0 active), 0 banned; 31 DNS requests, 13 db queries
        

As the solution, if you have still connected to the network twister-core instance, it is pretty possible to grab active connections from collected ~/.twister/peers.dat. All that is needed - connecting our twister-seeder to the twister-core running, by using it IP and 28333 port.

Open main.cpp file and find a row:

          CDnsSeedOpts *opts = (CDnsSeedOpts *)arg;
        

add twister-core connection details bellow:

          db.Add(CService("NODE_IP", 28333, true), true);
        

Save and recompile twister-seeder and launch it again with twister-core running.

Technical support

https://github.com/twisterarmy/twister-seeder/issues

Contribution

Twisterarmy is the community project. Please send your proposes and participate with improvements to development on GitHub.