API
Infrastructure Deployment

Safe{Core} Infrastructure deployment

Once you have deployed the Safe{Core} contracts, you must deploy the off-chain components of the Safe{Core} Stack, including backend and frontend services.

You have three options for deploying the Safe stack, depending on your needs.

Option 1: Safe Core Contributor Platform-as-a-Service

We roll out new networks quarterly, depending on our internal capacity, and only for medium to large chains based on a strict scoring framework.

ℹ️

If you want to submit your chain for assessment in the next quarter, please fill out this form (opens in a new tab).

Hard requirements

  • EVM-compatible chain.
  • At least two dedicated RPC node providers, with preference for at least one Tier 1 provider of Infura, Alchemy, Quicknode. You can find more on RPC nodes here.

Option 2: Third-party integrators

We are happy to introduce you to our integrators. Please contact networks@safe.global.

Option 3: Self-hosting

If you have engineering and cloud resources, you can also deploy the different components of the stack by following one of the procedures below.

You can find docker images for a majority of platforms (opens in a new tab).

Requirements

Hardware

These are the hardware requirements to run the different services required.

NetworkTransaction ServiceClient GatewayConfig ServiceDatabase
Small (new chain with low traffic)CPU: 2 vCPU RAM: 8GiBCPU: 2 vCPU RAM: 8 GiBCPU: 2 vCPU RAM: 8 GiBCPU: 2 vCPU RAM: 8GiB
StandardCPU: 4 vCPU RAM: 16GiBCPU: 2 vCPU RAM: 8 GiBCPU: 2 vCPU RAM: 8 GiBCPU: 4 vCPU RAM: 16GiB
Large (large chain with high-traffic)CPU: 8 vCPU RAM: 32GiBCPU: 2 vCPU RAM: 8 GiBCPU: 2 vCPU RAM: 8 GiBCPU: 16 vCPU RAM: 64GiB

RPC

For support, please refer to the RPC requirements. Safe (L1) requires tracing for indexing, while Safe (L2) supports events/logs.

Docker-compose deployment

Our docker-compose files are available on the safe-infrastructure (opens in a new tab) repository.


_10
git clone git@github.com:safe-global/safe-infrastructure.git
_10
cd safe-infrastructure

Prerequisites

Configuration


_10
cp .env.sample .env
_10
vi .env
_10
REVERSE_PROXY_PORT=8000
_10
CFG_VERSION=latest
_10
CGW_VERSION=latest
_10
TXS_VERSION=latest
_10
UI_VERSION=latest
_10
EVENTS_VERSION=latest
_10
RPC_NODE_URL=<REPLACE BY YOUR RPC ENDPOINT>

Run


_10
sh scripts/run_locally.sh
_10
# will ask to set up username/password for config-service and transactions-service

This command runs seventeen Docker containers from the docker-compose.yml (opens in a new tab):

  • Nginx reverse proxy
  • Postgres 14.x database (x3 for Transaction Service, Config Service, and Events Service)
  • Redis database (x2 for Transaction Service and Client Gateway)
  • RabbitMQ message queue (x2 for Transaction Service and General)
  • Transaction Service workers & scheduler (x4)
  • Transaction Service web
  • Config Service web
  • Client Gateway web
  • Events service web
  • Wallet web

Kubernetes deployment

⚠️

Our Helm Charts (opens in a new tab) are currently in alpha version, use them at your own risk and do not hesitate to share feedback.

An official helm chart creates all the necessary manifests, including the service account and RBAC entities needed for service discovery.


_10
helm repo add safe https://5afe.github.io/safe-helm-charts/charts/packages
_10
helm repo update
_10
helm install [RELEASE_NAME] safe/safe-stack -f your_values.yaml [-n NAMESPACE]

The helm chart allows you to inline all the configurations directly in your values.yaml:


_10
helm show values safe/safe-stack

Configuration

After all the components are up and running, you need to configure the Transaction Service and config service to start indexing data and connect to your chain from Safe{Wallet}.

Transaction Service

By default, Transaction Service will automatically setup MasterCopies and Proxy Factories for a list of known networks (opens in a new tab).

If your network is not supported you have to add the addresses manually in http://YOUR_TRANSACTION_SERVICE_DOMAIN/admin/ in Proxy Factories and also in Safe master copies section.

safe-infrastructure-installation-configuration.png

Config Service

Open http://YOUR_CONFIG_SERVICE_DOMAIN/admin to configure your chain:

safe-infrastructure-installation-config-service.png

Well done! You now have the Safe Contracts deployed on your chain and the Safe infrastructure up and running.

Was this page helpful?