Skip to main content

Set up and run the Resonate Server

This page will help you install and run the Resonate Server.

First install the Server on your machine.

Install with Homebrew

You can download and install the Resonate Server using Homebrew with the following commands:

brew install resonatehq/tap/resonate

This previous example installs the latest release. You can see all available releases and associated release artifacts on the releases page.

Once installed, you can start the server with:

resonate serve

You will see log output like the following:

time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting http server" addr=:8001
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting poll server" addr=:8002
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting grpc server" addr=:50051
time=2025-09-09T20:54:31.351-06:00 level=INFO msg="starting metrics server" addr=:9090

The output indicates that the server has HTTP endpoints available at port 8001, a polling endpoint at port 8002, a gRPC endpoint at port 50051, and a metrics endpoint at port 9090.

These are the default ports and can be changed via configuration. The SDKs are all configured to use these defaults unless otherwise specified.

Build from source

If you don't have Homebrew, we recommend building from source using Go. Run the following commands to download the repository and build the server:

git clone https://github.com/resonatehq/resonate
cd resonate
go build -o resonate

After it is built, you can compile and run it as a Go program using the following command:

go run main.go serve

Or, you can run it as an executable using the following command:

./resonate server

Custom configuration

The Resonate Server is highly configurable.

You can configure the server using a configuration file or via command flags.

./resonate serve --config resonate.yml

Command flags will override settings in the configuration file. See the resonate serve command for a full list of available options that are available via the CLI.

For production deployments, we recommend using a configuration file.

At the top level, the file supports five keys:

  • system: Controls core scheduling behavior.
  • api: Configures external interfaces.
  • aio: Configures asynchronous I/O subsystems.
  • metricsAddr: Prometheus metrics bind address (default :9090).
  • logLevel: One of debug, info, warn, error (default info).

Here is a resonate.yml file that explicitly sets every option to the server's build-in defaults. Using this file is equivalent to starting Resonate with no configuration file. See the config key reference for details on each option.

system:
url: http://localhost:8001
coroutineMaxSize: 1000
submissionBatchSize: 1000
completionBatchSize: 1000
promiseBatchSize: 100
scheduleBatchSize: 100
taskBatchSize: 100
taskEnqueueDelay: 10s
signalTimeout: 1s

api:
size: 1000
subsystems:
http:
enable: true
config:
addr: ":8001"
auth: {}
cors:
allowOrigin: []
timeout: 10s
taskFrequency: 1m
grpc:
enable: true
config:
addr: ":50051"

aio:
size: 1000
subsystems:
echo:
enable: false
config:
size: 100
batchSize: 100
workers: 1
router:
enable: true
config:
size: 100
workers: 1
sources:
- name: default
type: tag
data: { "key": "resonate:invoke" }
sender:
enable: true
config:
size: 100
plugin:
http:
enable: true
config:
size: 100
workers: 1
timeout: 1s
poll:
enable: true
config:
size: 100
bufferSize: 100
maxConnections: 1000
addr: ":8002"
cors:
allowOrigin: []
timeout: 10s
auth: {}
targets:
- name: default
type: poll
data: { "cast": "any", "group": "default" }
store-postgres:
enable: false
config:
size: 1000
batchSize: 1000
workers: 1
host: localhost
port: "5432"
username: ""
password: ""
database: resonate
query: {}
txTimeout: 10s
reset: false
store-sqlite:
enable: true
config:
size: 1000
batchSize: 1000
path: resonate.db
txTimeout: 10s
reset: false

metricsAddr: ":9090"
logLevel: info

You can customize the configuration by supplying only the keys you want to change.

For example, if you want to use PostgreSQL as the database instead of the default SQLite:

# resonate.yml
aio:
subsystems:
store-postgres:
enable: true
config:
host: db.example.com
port: "5432"
username: resonate
password: secret
database: resonate

Or, just customize the connection ports, metrics port, and auth credentials:

# resonate.yml
metricsAddr: ":9090" # custom metrics port

system:
url: "https://<your-domain>:8001" # custom system URL, port is external store

api:
subsystems:
http:
config:
addr: ":8001" # custom HTTP port
auth:
{ app_id }: { password } # HTTP basic auth credentials

grpc:
config:
addr: ":50051" # custom gRPC port
aio:
subsystems:
sender:
config:
plugins:
poll:
config:
addr: ":8002" # custom poller plugin port
auth:
{ username }: { password } # poller plugin auth

Run on Kubernetes

The recommended Kubernetes deployment strategy is a deployment. The easiest way to do this is with the yaml manifest below:

---
apiVersion: v1
kind: Service
metadata:
name: resonate
spec:
selector:
app: resonate
ports:
- port: 8001
name: api
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: resonate
spec:
replicas: 1
selector:
matchLabels:
app: resonate
template:
metadata:
labels:
app: resonate
spec:
containers:
- name: resonate
image: ghcr.io/resonatehq/resonate:v0.5.0
args:
- "serve"
- "--aio-store=postgres"
- "--aio-store-postgres-host=HOST"
- "--aio-store-postgres-port=PORT"
- "--aio-store-postgres-username=USERNAME"
- "--aio-store-postgres-password=SECRET"
- "--aio-store-postgres-database=DBNAME"
ports:
- name: api
containerPort: 8001

Create a file named resonate.yml and apply the above YAML manifest.

kubectl apply -f resonate.yml

Finally, cleanup and remove resonate from your Kubernetes cluster.

kubectl delete -f resonate.yml

Config key reference

System Section

KeyTypeDefaultDescription
urlstringResonate server URL
coroutineMaxSizeint1000Maximum concurrent coroutines
submissionBatchSizeint1000Max submissions per tick
completionBatchSizeint1000Max completions per tick
promiseBatchSizeint100Promises processed per iteration
scheduleBatchSizeint100Schedules processed per iteration
taskBatchSizeint100Tasks processed per iteration
taskEnqueueDelayduration10sDelay before re-enqueueing tasks
signalTimeoutduration1sWait time for API/AIO signals

API Section

KeyTypeDefaultDescription
sizeint1000Submission channel buffer size
subsystems.http.enablebooltrueEnable HTTP API
subsystems.grpc.enablebooltrueEnable gRPC API (disabled in minimal examples)

HTTP Subsystem

KeyTypeDefaultDescription
addrstring:8001HTTP listen address
authmapBasic auth user/pass pairs
cors.allowOrigin[]stringAllowed origins for CORS
timeoutduration10sGraceful shutdown timeout
taskFrequencyduration1mDefault task frequency

gRPC Subsystem

KeyTypeDefaultDescription
addrstring:50051gRPC listen address

AIO Section

KeyTypeDefaultDescription
sizeint1000Completion channel buffer size
subsystems.echo.enableboolfalseEcho subsystem
subsystems.router.enablebooltrueRouter subsystem
subsystems.sender.enablebooltrueSender subsystem
subsystems.store-postgres.enableboolfalsePostgres store
subsystems.store-sqlite.enablebooltrueSQLite store

Echo Subsystem

KeyDefaultDescription
size100Submission channel size
batchSize100Max submissions per iteration
workers1Number of workers

Router Subsystem

KeyDefaultDescription
size100Submission channel size
workers1Number of workers
sources[]Routing sources; default adds tag resonate:invoke

Sender Subsystem

KeyDefaultDescription
size100Submission channel size
plugin.http.enabletrueHTTP plugin
plugin.poll.enabletruePoll plugin
targetslistDelivery targets (default poll with group default)

HTTP Plugin

KeyDefaultDescription
size100Message buffer size
workers1Worker count
timeout1sRequest timeout

Poll Plugin

KeyDefaultDescription
size100Message buffer size
bufferSize100Connection buffer size
maxConnections1000Max client connections
addr:8002HTTP server address
cors.allowOrigin[]Allowed origins
timeout10sShutdown timeout
authmapBasic auth pairs

SQLite Store

KeyDefaultDescription
size1000Submission channel size
batchSize1000Max submissions per iteration
pathresonate.dbDB file path (:memory: for in‑memory DST)
txTimeout10sTransaction timeout
resetfalseDrop database on shutdown

PostgreSQL Store

KeyDefaultDescription
size1000Submission channel size
batchSize1000Max submissions per iteration
workers1Worker count
hostlocalhostDB host
port5432DB port
username / passwordCredentials
databaseresonateDB name (resonate_dst in DST)
queryAdditional query parameters (e.g., sslmode)
txTimeout10sTransaction timeout
resetfalseDrop database on shutdown