# System Requirements and Installation Guide¶

## Introduction¶

The easiest way to start Rotki is to download the packaged binary for your Operating system. Linux, OSX and Windows is supported. To see how to do this go to the next section.

## Packaged Binaries¶

### Linux¶

Go to the releases page and download the linux-x64 appimage from the latest release. Or the tar.xz file. Whichever you prefer.

If you got the appimage you have to give it the executable permission. Do chmod +x rotki-linux_x86_64-vx.x.x.AppImage replacing the x with the proper version. And then run it.

If you got the tar, unzip it in a directory of your choice. In the root directory of the unzipped archive there is a rotki executable. Run it via the terminal to start rotki.

#### Troubleshooting¶

If you get a problem when starting the application or during its usage please open an issue in Github and include all logs that can be found in ~/.config/rotkehlchen/.

### OSX¶

Go to the releases page and download the darwin-x64 dmg package from the latest release.

Click on the dmg installer and when prompted drag the Rotki logo to your Applications. This will install the application and once finished you can select Rotki from your applications folder and launch it.

#### Troubleshooting¶

If you get a problem when starting the application or during its usage please open an issue in Github and include all logs that can be found in ~/Library/Logs/rotkehlchen.

### Windows¶

Go to the releases page and download the win32-x64 package from the latest release.

Unzip it in a folder of your choice. In the root directory of the unzipped archive there is a rotki executable. Double click it to start rotki.

#### Troubleshooting¶

If you get “The python backend crushed” or any other error please run the executable via the Command Prompt. Then provide us with the output that is visible in the prompt and this will help us debug your issue.

You should also include all logs that can be found in %APPDATA%/rotki/.

## Build from Source¶

### Linux¶

Make sure you have node.js and npm. If you don’t, use your linux distro’s package manager to get them.

Get sqlcipher:

• If you’re running Archlinux you can install the package with pacman.
• If you’re running Ubuntu you will need to install libsqlcipher-dev with apt-get instead.

Install electron and any other npm dependencies by:

cd electron-app
npm ci


Create a new virtual environment to install all the python dependencies. If you don’t have mkvirtualenv then check how to get it depending on your distribution. Here is a guide for Ubuntu and here is one for ArchLinux:

mkvirtualenv rotki


Then install all the python requirements by doing:

pip install -r requirements.txt


If you want to also have the developer requirements in order to develop rotki then do:

pip install -r requirements_dev.txt


Now to start the application you need to type npm run electron:serve.

If you get runtime errors about a Node version mismatch, you can try to rebuild the electron modules like this:

./node_modules/.bin/electron-rebuild


### OSX¶

The tl;dr version is: - install sqlcipher - use a virtual env with python 3.7.x - make sure pip installed everything it says it installed - get your node under control with nvm. It has been tested with 8.9

The following recipe has been tested using Anaconda. VirtualEnv works as well, refer to the documentations of those projects to install and use them.

Rotki uses an encrypted database called SQLCipher. Before we can proceed, we need to install it. Homebrew makes it simple:

$brew update && brew install sqlcipher  Also these are some dependencies that may or may not be properly installed in your system so make sure you have them. $ brew install gmp


If you wish to use Conda, use the following commands:

$brew cask install caskroom/cask/anaconda$ echo "export PATH=$PATH:/usr/local/anaconda3/bin" >> ~/.bash_profile$ echo ". /usr/local/anaconda3/etc/profile.d/conda.sh" >> ~/.bash_profile
$source ~/.bash_profile$ conda create python=3.7 --name rotki
$conda activate rotki  If you wish to use Virtualenvwrapper use the following: $ pip install virtualenv
$pip install virtualenvwrapper  And add the following to your shell startup file, assuming virtualenvwrapper was installed in /usr/local/bin: export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel source /usr/local/bin/virtualenvwrapper.sh  Before using pip, let´s ensure we have the latest version: $ pip install --upgrade pip


Install all the requirements:

$sudo pip install -r requirements.txt  If you want to also have the developer requirements in order to develop rotki then do: $ pip install -r requirements_dev.txt


Note

Make sure that pysqlcipher3 is properly installed. If $pip freeze | grep pysqlcipher3 returns nothing for you then it was not installed. Try to manually install only that dependency with the verbose option to see where it fails. $ pip install pysqlcipher3 -v. If it fails at the stage of finding the library for -lsqlcipher then brew install sqlciper did not place the installed lib directory to the LIBRARY_PATH and you will have to do it manually. For example if sqlcipher was installed at /usr/local/Cellar/sqlcipher/3.4.2/ then use pip install this way:
$LIBRARY_PATH=/usr/local/Cellar/sqlcipher/3.4.2/lib pip install pysqlcipher3. Rotki uses electron, we need to install it. To do so you need node.js and npm. If you don’t have it use homebrew to install it: $ brew install node


Almost there, we can now install all the NodeJS dependencies. Using a recent NodeJS version such as 8.9.x, it should be smooth. Also since npm uses gyp and gyp requires python 2.7 make sure to set it up appropriately before invoking npm:

$npm ci  You can now start Rotki: $ npm run electron:serve


### Windows¶

This is the guide on how to manually build rotki binaries in Windows from source.

#### Dependencies¶

##### Python and git¶

Get python 3.7.

Make sure it’s 64 bit if you are in 64-bit windows!!!!!

If it’s not in the Path add both directories to the path:

C:\Users\lefteris\AppData\Local\Programs\Python\Python37;C:\Users\lefteris\AppData\Local\Programs\Python\Python37\Scripts

Get latest git.

Setup a python virtualenvironment. If you don’t know how to do it in windows here is a good guide.

Make sure you have pip installed.

Also make sure you have the Microsoft visual studio build tools. Check the troubleshooting guide’s relevant section Microsoft Visual C++ 14.0 is required.

##### Sqlcipher and pysqlcipher3¶

Here is a good guide on how to compile SQLCipher for windows.

The guide also requires you to get OpenSSL. You can do that from here. Make sure it’s for the same architecture as the rest. 32/64 bit. At the installer change the location to the bin directory as the tutorial says. Make sure that -IC:\dev\OpenSSL-Win64\include and all other relevant options point to the actual location where openssl was installed. Also pay attention to the rest of the stuff in the tutorial warns to change in Makefile.msc.

Then you can go to pysqlcipher3 and edit the setup.py file to include the location of the headers and the libraries you just compiled. Add the following to the extension that is being built.:

library_dirs=[r'C:\Users\yourusername\w\sqlcipher'],


Obviously replace yourusername with whatever you are using. And then do python setup.py build and python setup.py install.

##### Nodejs¶

Get node.js from here.

#### Installation¶

Inside rotki install normally like you would in linux … but you got to either copy slqcipher.dll in the rotki directory or put it in the directory where windows searches for DLLs.

#### Troubleshooting¶

##### anyapi-ms-win-crt-runtime missing¶

If you get anyapi-ms-win-crt-runtime-l1-1-0.dll is missing error when running python follow this guide to resolve it.

##### Microsoft Visual C++ 14.0 is required¶

If you get:

building 'gevent.libev.corecext' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/


Then go here and get the microsoft visual studio build tools and install them. The specific parts of the tools that need to be installed can be seen in this SO answer.

You also need to add them to the path. The tools were probably installed here: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools Environment variable should be: VS140COMNTOOLS

#### Alternative dependencies with sqlciper amalgamation¶

This is a not so well tested way but some work has been done by cryptomental in this issue for it. With the amalgamation you can obtain all sqlcipher dependencies precompiled and amalgamated in one big blog. But … it’s tricky, hense not so well tested.

Read the issue for a lot of details and also the appveyor.yml for what needs to be done to build sqlcipher and keep the following in mind:

1. Replace robocopy with copy -r and make sure to copy into python system include and not the venv one.

2. If while building the amalgamation you get: "Fatal error: OpenSSL could not be detected!" try this SO answer. and make sure to add OPENSSL_CONF to the environment variables pointing to the location of openssl.conf.

3. In addition copy the amalgamation dir’s ssl include folder to the python include folder:

$cp -r sqlcipher-amalgamation-3020001/openssl-include/openssl/ /c/Users/lefteris/AppData/Local/Programs/Python/Python37-32/include/openssl  4. Copy the amalgamation dir’s ssl libraries to the python lib folder: $ cp sqlcipher-amalgamation-3020001/OpenSSL-Win32/* /c/Users/lefteris/AppData/Local/Programs/Python/Python37-32/libs/


Note it has to be the OpenSSL-Win32 part.