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 valens@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.
Network | Transaction Service | Client Gateway | Config Service | Database |
---|---|---|---|---|
Small (new chain with low traffic) | CPU: 2 vCPU RAM: 8GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 2 vCPU RAM: 8GiB |
Standard | CPU: 4 vCPU RAM: 16GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 4 vCPU RAM: 16GiB |
Large (large chain with high-traffic) | CPU: 8 vCPU RAM: 32GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 2 vCPU RAM: 8 GiB | CPU: 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.
_10git clone git@github.com:safe-global/safe-infrastructure.git_10cd safe-infrastructure
Prerequisites
- Docker (opens in a new tab) v20.10+
- Docker-compose (opens in a new tab) 2.x.x+
- Running Ethereum JSON RPC client (opens in a new tab)
Configuration
_10cp .env.sample .env_10vi .env_10REVERSE_PROXY_PORT=8000_10CFG_VERSION=latest_10CGW_VERSION=latest_10TXS_VERSION=latest_10UI_VERSION=latest_10EVENTS_VERSION=latest_10RPC_NODE_URL=<REPLACE BY YOUR RPC ENDPOINT>
Run
_10sh 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.
_10helm repo add safe https://5afe.github.io/safe-helm-charts/charts/packages_10helm repo update_10helm 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
:
_10helm 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.
Config Service
Open http://YOUR_CONFIG_SERVICE_DOMAIN/admin
to configure your chain:
Well done! You now have the Safe Contracts deployed on your chain and the Safe infrastructure up and running.