This article briefly covers setting up the BitGo wallet solely via your server's command line, which works for all machine and server versions.
This method does not require first updating your machine, then server in order to configure BitGo credentials within the admin.
For more information, please see our main BitGo setup article.
In your server's terminal, run these two commands individually:
cd /usr/local/lib/node_modules/lamassu-server node node_modules/lamassu-bitgo/setup
Then enter each credential, hitting Enter. The
Wallet Passphrase field will intentionally remain blank when pasting.
The admin will not show BitGo as the current wallet selection and will contain empty credentials, since the fields do not map to the values BitGo uses. The setup script above is what informs the server of the correct credentials and can be used again if these change.
Checking for success
To be sure all was entered correctly and the server is connecting to BitGo, run these four commands individually:
stop lamassu-server start lamassu-server LAMASSU_ENV=debug tail -30 /var/log/upstart/lamassu-server.log | bunyan
If any lines reveal an 'ERROR', check the credentials and re-enter them with the setup script.
Possible errors revealed in the logs:
Error: unauthorized– Incorrect token. Double check token or create a new one, then re-run the setup script.
Error: invalid wallet id– An incorrect address was used as the Wallet ID, likely truncated when input. Double check the Wallet ID by going to the 'Receive' screen in the BitGo wallet page, and use the address at the very end of the page that's labeled with your wallet name.
- Error: not found – An incorrect address in your wallet was used as your Wallet ID. Make sure you've gone to the 'Receive' screen in the wallet, and used the address at the very end of the page that's labeled with your wallet name.
Error: Attempt to use IP-restricted token from an unauthorized IP address– The IP address of your admin server was listed incorrectly during token creation. Double check the IP address of your server, create a new token, and re-run the setup script.
TypeError: Object #<Object> has no method 'factory'– An older version of lamassu-server is being run. Upgrade using the commands found here. Afterwards, no need to re-run the setup script, though run the previous 'tail' command to check for any of the above configuration errors.
Not revealed in the logs:
- Incorrect password – This must be tested by placing a transaction at the machine. If you find the bitcoins aren't sent, confirm by checking your transaction log. If the error column for the transaction states 'Unable to decrypt user keychain', then the password is incorrect.
Ensure that you are using the wallet password (secondary password) and not that of your BitGo account. Also, since the password field remains blank when pasting and typing, ensure that you're doing so accurately. (Pasting on Linux/Mac should be done via the Edit>Paste menu. In PuTTY on Windows it is via a single right-click.)
- To view your wallet balance, log into your BitGo wallet. It uses multiple change addresses, so unlike Blockchain.info this cannot be observed by monitoring a single address. (We're at work on the next-generation admin which will include this info on the dashboard.) Email alerts are also configurable via BitGo.
- Bitgo won't appear in the Lamassu Admin's wallet page. It's configured solely via the server.
We value your feedback and experience with the module. Please let us know at email@example.com.