Difference between revisions of "Keys.dat"

From Bitmessage Wiki
Jump to navigation Jump to search
m (→‎Location: punctuation)
(added more option documentation)
 
(5 intermediate revisions by 4 users not shown)
Line 5: Line 5:
 
On a Windows system in non-portable mode it is in the [http://en.wikipedia.org/wiki/Special_Folders#File_system_directories AppData] and can be reached by typing '''%APPDATA%\PyBitmessage''' in the windows explorers address bar. (Windows Explorer, not Internet Explorer)
 
On a Windows system in non-portable mode it is in the [http://en.wikipedia.org/wiki/Special_Folders#File_system_directories AppData] and can be reached by typing '''%APPDATA%\PyBitmessage''' in the windows explorers address bar. (Windows Explorer, not Internet Explorer)
  
Under Linux it is found in the users home directory: ~/PyBitmessage
+
Under Linux it is found in the users home directory: ~/.config/PyBitmessage
 +
 
 +
Under OSX it is found in the users home directory: ~/Library/Application Support/PyBitmessage
  
 
== Configuration ==
 
== Configuration ==
Line 47: Line 49:
 
=== Address Sections ===
 
=== Address Sections ===
 
The keys.dat contains sections, called [[Address Block|address blocks]].
 
The keys.dat contains sections, called [[Address Block|address blocks]].
 +
 +
== Hidden options ==
 +
Some options are either not documented or are not set by default. These can be found on the [[keys.dat options]] page.
  
 
== Editing ==
 
== Editing ==
 
Editing requires shutdown of the client first or changes may be overwritten again by the client.
 
Editing requires shutdown of the client first or changes may be overwritten again by the client.
All fields (except the '''DEFAULT''' section) can be edited in the clients settings dialog. changes can prevent the client from loading or addresses from working and should be taken with care. The keys.dat can be edited in any text editor and has to be saved back as raw text file, rendering office applications rather complicated to use. On windows, [http://en.wikipedia.org/wiki/Notepad_(software) notepad.exe] can be used for this purpose.
+
All fields (except the '''DEFAULT''' section) can be edited in the clients settings dialog. changes can prevent the client from loading or addresses from working and should be taken with care. The keys.dat can be edited in any text editor and has to be saved back as raw text file, rendering office applications rather complicated to use. On windows, [http://en.wikipedia.org/wiki/Notepad_(software) notepad.exe] can be used for this purpose. Notepad can be opened and then the file can be loaded either by using '''File > Open''' or dragging it into the editor.
  
 
== Deleting ==
 
== Deleting ==
Line 57: Line 62:
  
 
== Debugging ==
 
== Debugging ==
Instead of deleting, removing of entries is recommended, using the folowing steps:
+
Instead of deleting, removing of entries is recommended, using the following steps:
 
* Create a copy of keys.dat in case something rouls up.
 
* Create a copy of keys.dat in case something rouls up.
 
* Delete the file and restart bitmessage.
 
* Delete the file and restart bitmessage.
Line 63: Line 68:
 
* Restart bitmessage, if it works, continue adding address blocks.
 
* Restart bitmessage, if it works, continue adding address blocks.
 
* If bitmessage no longer works, the invalid message block should be removed from keys.dat and be sent to atheros (on github or the forum) for further debugging.
 
* If bitmessage no longer works, the invalid message block should be removed from keys.dat and be sent to atheros (on github or the forum) for further debugging.
 +
 +
[[Category:DAT Files]]

Latest revision as of 23:16, 2 May 2014

keys.dat is a mixture of Bitmessage configuration and Address blocks. It should be protected since it contains sensitive data that can be abused to impersonate others.

Location

The file is located in the bitmessage directory (if run in portable mode). On a Windows system in non-portable mode it is in the AppData and can be reached by typing %APPDATA%\PyBitmessage in the windows explorers address bar. (Windows Explorer, not Internet Explorer)

Under Linux it is found in the users home directory: ~/.config/PyBitmessage

Under OSX it is found in the users home directory: ~/Library/Application Support/PyBitmessage

Configuration

The keys.dat contains multiple sections:

[DEFAULT] and [bitmessagesettings]

Example Configuration

[DEFAULT]
label = unused address

[bitmessagesettings]
settingsversion = 5
port = 8444
timeformat = %%a, %%d %%b %%Y  %%I:%%M %%p
blackwhitelist = black
startonlogon = False
minimizetotray = True
showtraynotifications = False
startintray = False
socksproxytype = none
sockshostname = localhost
socksport = 9050
socksauthentication = False
socksusername = USER
sockspassword = PASS
keysencrypted = false
messagesencrypted = false
apienabled = true
apiport = 8442
apiinterface = 127.0.0.1
apiusername = API-Username
apipassword = API-Password
defaultnoncetrialsperbyte = 320
defaultpayloadlengthextrabytes = 14000

The API settings are not present by default. The section may additionally contain a Daemon entry.

Address Sections

The keys.dat contains sections, called address blocks.

Hidden options

Some options are either not documented or are not set by default. These can be found on the keys.dat options page.

Editing

Editing requires shutdown of the client first or changes may be overwritten again by the client. All fields (except the DEFAULT section) can be edited in the clients settings dialog. changes can prevent the client from loading or addresses from working and should be taken with care. The keys.dat can be edited in any text editor and has to be saved back as raw text file, rendering office applications rather complicated to use. On windows, notepad.exe can be used for this purpose. Notepad can be opened and then the file can be loaded either by using File > Open or dragging it into the editor.

Deleting

Deleting the keys.dat renders all addresses generated unusable and causes the client to revert to its default sections. Messages that were received prior to deletation remain in the messages.dat file and are still readable.

Debugging

Instead of deleting, removing of entries is recommended, using the following steps:

  • Create a copy of keys.dat in case something rouls up.
  • Delete the file and restart bitmessage.
  • Close bitmessage, open the newly generated keys.dat and add a message block from the backup.
  • Restart bitmessage, if it works, continue adding address blocks.
  • If bitmessage no longer works, the invalid message block should be removed from keys.dat and be sent to atheros (on github or the forum) for further debugging.