Deploy Mastra Agent on Oracle Database
Mastra weather agent with all state in Oracle Database Free.
Mastra Server
Just deployed
Just deployed
/opt/oracle/oradata
Deploy and Host Mastra Agent on Oracle Database on Railway
Mastra is the open-source TypeScript framework for building AI agents and workflows. This template deploys a weather agent and workflow whose entire state — conversation threads, messages, workflow snapshots, and traces — lives in Oracle Database via @mastra/oracledb. OracleStore holds that state, and OracleVector is registered on the same connection pool, ready for semantic recall when you add an embedder.
About Hosting Mastra Agent on Oracle Database
The template provisions two services: the Mastra server and an Oracle Database Free instance (gvenzl/oracle-free) with a persistent volume. Give that volume at least 5 GB; the extracted database uses about 3.2 GB. You supply two values: an OpenAI API key and a password for the Oracle application user. The app reads that password over Railway's private network, so you set it once. Oracle needs about a minute to initialize on first boot, and about ten seconds on every restart after that — the app retries until the database accepts connections. The public domain serves both the Mastra REST API and Mastra Studio, so you can read the Oracle-backed threads and traces in the browser. Set your OpenAI API key and deploy.
Common Use Cases
- Run Mastra agents inside an Oracle-standardized data stack
- Evaluate
@mastra/oracledbstorage and vector search with a working reference - Keep agent state and workflow state in one database you already operate
Dependencies for Mastra Agent on Oracle Database Hosting
- OpenAI API key (agent model)
- A password of your choice for the Oracle application user. Use 12 to 30 letters and digits only. The Oracle image puts this value into a SQL statement, so quotes,
@,/, and spaces can break the user it creates.
Deployment Dependencies
Why Deploy Mastra Agent on Oracle Database on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Mastra Agent on Oracle Database on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Mastra Server
leoisadev1/mastra-template-oracledbOPENAI_API_KEY
APP_USER_PASSWORD
