From Bitmessage Wiki
Revision as of 09:34, 6 June 2013 by AyrA (talk | contribs) (→‎Deleting: added deletation info)
Jump to navigation Jump to search

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.


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)


The keys.dat contains multiple sections:

[DEFAULT] and [bitmessagesettings]

Example Configuration

label = unused address

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 =
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.


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.


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.


Instead of deleting, removing of entries is recommended, using the folowing 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.