Logo

github Download
Acra from sources

Installing Acra from sources #

In most cases, you don’t want to install Acra from sources, use packages or Docker instead.

These are the instruction for installation of AcraServer from the Cossack Labs' GitHub repository for Acra. You will need the same set of dependencies for each component.

Installing the dependencies #

Install the dependencies for Acra:

Debian / Ubuntu

sudo apt-get install git libssl-dev make build-essential

RHEL / CentOS / OEL

sudo yum groupinstall 'Development Tools'
sudo yum install openssl-devel

Install Go #

Install and configure the latest stable version of Golang.

Install Themis #

Install Themis library:

git clone https://github.com/cossacklabs/themis.git
cd themis
make
sudo make install

Build the key generator and generate the keys #

go get github.com/cossacklabs/acra/cmd/acra-keymaker

Then generate the keys and distribute them across the infrastructure.

Remember to generate ACRA_MASTER_KEY and assign it to the environmental variable!

Set up the environment for AcraServer #

On a separate machine, create a user for AcraServer and make sure your GOBIN is in PATH:

sudo useradd -m acra-server
sudo su acra-server
cd ~/
export PATH=$PATH:${GOBIN:-${GOPATH:-$HOME}/go/bin}

Build AcraServer #

go get github.com/cossacklabs/acra/cmd/acra-server

Place someid.pub, someid_storage and someid_server keys to .acrakeys directory for AcraServer. Now you can finally launch the AcraServer.

Run AcraServer #

Running AcraServer is easy, just point it to the database:

acra-server --db_host=127.0.0.1

If you see an error message "master key is empty", it means that you haven’t generated ACRA_MASTER_KEY, please return to the Key Generation step.

You can complement the command above with --db_port=5432 -v to adjust the listener port and add logs to get going quickly. For all the available CLI parameters, refer to the corresponding section in How AcraServer works.

AcraServer listens to port 9393 by default.

Set up the environment for AcraTranslator #

On a separate machine, create a user for AcraTranslator and make sure your GOBIN is in PATH:

sudo useradd -m acra-translator
sudo su acra-translator
cd ~/
export PATH=$PATH:${GOBIN:-${GOPATH:-$HOME}/go/bin}

Build AcraTranslator #

go get github.com/cossacklabs/acra/cmd/acra-translator

Place someid_translator.pub and someid_translator keys to .acrakeys directory for AcraTranslator. Now you can finally launch the AcraTranslator.

Run AcraTranslator #

acra-translator

If you see an error message "master key is empty", it means that you haven’t generated ACRA_MASTER_KEY, please return to the Key Generation step.

If no incoming_connection_{http|grpc}_string is set, AcraTranslator will serve gRPC connections on port 9696 by default.


Guides #

As further steps, we recommend reading the following sections: