gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

configuration.rst (895B)


      1 Configuration
      2 =============
      3 
      4 In order to start the REST service, execute:
      5 
      6 ::
      7 
      8    $ gnunet-arm -i rest
      9 
     10 The REST service will listen by default on port 7776.
     11 The service is run by each user so you may have to modify the port accordingly:
     12 
     13 ::
     14 
     15   $ gnunet-config -s rest -o HTTP_PORT -V 7788
     16 
     17 Note that you may need to authenticate agains the API using HTTP basic authentication.
     18 The REST service autogenerates a password upon first launch.
     19 You can get your user-specific authentication secret by executing:
     20 
     21 ::
     22 
     23   $ SECRET=$(gnunet-config -f -s rest -o BASIC_AUTH_SECRET_FILE)
     24 
     25 To access the REST API, you can use any HTTP client such as a browser or cURL:
     26 
     27 ::
     28 
     29   $ curl localhost:7776/identity -u<$USER>:<$SECRET>
     30 
     31 You may disable the authentication if you want to by executing:
     32 
     33 ::
     34 
     35   $ gnunet-config -s rest -o BASIC_AUTH_ENABLED -V NO
     36 
     37 However, disabling authentication is not recommended.
     38 
     39