Skip to content

Deployment and Compatibility

This page expands the manager overview into an operator-grade deployment and integration guide.

rauto-manager is designed as a self-hosted control plane for rauto agent fleets.

Typical production layout:

  • one central manager deployment
  • PostgreSQL as the persistent data store
  • one or more rauto agent instances in different network zones
  • operators accessing the manager through browser UI

Required:

  • PostgreSQL database
  • DATABASE_URL
  • JWT_SECRET
  • AGENT_API_KEY

Optional but important in larger deployments:

  • NEXT_PUBLIC_AGENT_API_KEY
  • NEXT_PUBLIC_MANAGER_URL
  • NEXT_PUBLIC_MANAGER_GRPC_URL
  • AGENT_TIMEOUT
  • AGENT_HEARTBEAT_INTERVAL
  • MANAGER_GRPC_ENABLED
  • MANAGER_GRPC_HOST
  • MANAGER_GRPC_PORT
  • MANAGER_GRPC_MAX_MESSAGE_BYTES

After startup, /login redirects to /setup on first boot so an administrator can create the initial account.

This means a production deployment should include:

  • database migration before first traffic
  • secure secret generation for JWT_SECRET
  • strong management of AGENT_API_KEY
  • controlled access to the initial bootstrap window
Terminal window
npm install
cp .env.example .env
npx prisma migrate deploy
npm run dev

For schema iteration in development:

Terminal window
npx prisma migrate dev

The project supports Vercel deployment and includes vercel.json together with a build:vercel flow.

Important notes:

  1. use a PostgreSQL database such as Neon
  2. make sure DATABASE_URL points to the migrated database
  3. set DIRECT_DATABASE_URL if Prisma migrations require a direct connection
  4. commit migration files under prisma/migrations/
  5. use separate databases or branches for production and preview
  6. set JWT_SECRET and AGENT_API_KEY manually

The built-in manager gRPC server is not started on Vercel.

If you need gRPC-reporting agents, run the manager in a self-hosted Node environment and set:

MANAGER_GRPC_ENABLED=true

Use HTTP when the manager is reachable through its normal web address.

Terminal window
rauto agent \
--bind 0.0.0.0 \
--port 8123 \
--manager-url http://<manager-host>:3000 \
--report-mode http \
--agent-name edge-sh-01 \
--agent-token <same-agent-api-key>

Use gRPC when the manager exposes a gRPC listener in a self-hosted deployment.

Terminal window
rauto agent \
--bind 0.0.0.0 \
--port 8123 \
--manager-url http://<manager-host>:50051 \
--report-mode grpc \
--agent-name edge-sh-01 \
--agent-token <same-agent-api-key>

After registration, the manager expects an agent to support:

  • registration and heartbeat updates
  • offline notifications
  • full inventory sync
  • incremental reachability updates
  • live task execution events
  • task execution callbacks
  • async agent-side error reporting

For full current UI behavior, an HTTP-reporting agent should expose at least:

  • GET /api/connections
  • PUT /api/connections/{name}
  • POST /api/connection/test
  • GET /api/templates
  • GET /api/device-profiles/all
  • GET /api/device-profiles/{name}/modes
  • POST /api/devices/probe

These endpoints support manager-side workflows such as:

  • connection inventory browsing
  • saved connection update and sync
  • connection testing
  • template discovery
  • profile lookup
  • device probe and sync

For gRPC-reporting agents, the manager expects matching RPC behavior in the task and reporting services.

At minimum, that includes:

  • task dispatch
  • task event reporting
  • task callback reporting
  • connection list and save
  • connection test
  • template list
  • device profile list
  • profile mode lookup
  • device probing and sync

The manager automatically chooses HTTP or gRPC based on the saved agent report mode.

The manager currently supports these task types:

TypeDescription
execSend a single command through a saved connection
templateExecute a named template with variables
tx_blockRun a transaction-style command block
tx_workflowExecute a workflow payload handled by the agent
orchestrateSubmit a multi-step orchestration plan

UI mapping:

  • simple dialog: exec, template, tx_block
  • visual designer: tx_workflow, orchestrate

Manager becomes worthwhile when you need:

  • multiple execution nodes
  • shared inventory
  • centralized task dispatch
  • live fleet-wide execution visibility
  • centralized history and notifications

Prefer saved connections on the agent side

Section titled “Prefer saved connections on the agent side”

Many advanced manager workflows assume the agent can expose or resolve saved connections cleanly.

Use HTTP when:

  • deployment is simpler
  • only web-port exposure is practical
  • Vercel or edge-style hosting is involved

Use gRPC when:

  • you are self-hosting the manager
  • transport efficiency matters
  • you want manager-side control flows to remain entirely gRPC-based

This usually means either:

  • prisma migrate deploy did not run successfully
  • the runtime is pointing to a different database or branch than the migrated one

Check:

  • AGENT_API_KEY on manager matches --agent-token
  • manager URL and port are correct
  • report mode matches the actual listener
  • firewall and network path allow traffic

Check:

  • manager is self-hosted, not Vercel-only
  • MANAGER_GRPC_ENABLED=true
  • MANAGER_GRPC_HOST and MANAGER_GRPC_PORT are reachable
  • the agent is using the gRPC listener URL rather than the normal web port