Providers & Production Deployment
The OASIS provider system is what makes the platform blockchain-agnostic, resilient and future-proof. This module explains how providers work, how to configure your ONODE for production, and how to deploy with Railway or Docker.
What you'll learn
- What OASIS providers are and the full provider catalogue
- Configure auto-failover, load balancing and auto-replication
- Switch providers at runtime from your app code
- Deploy an ONODE (the OASIS backend) to Railway and Docker
- Environment variables, secrets management and OASIS config
- Production security: JWT expiry, CORS, rate limiting
- Monitoring and health checks
The OASIS Provider Model
Every storage, blockchain and identity operation in OASIS goes through a provider — a pluggable adapter that translates OASIS API calls into the native operations of a specific network or database. Your app code never calls Solana, MongoDB or Holochain directly; it calls the OASIS API and the active provider handles the rest.
This gives you three powerful capabilities out of the box:
- Auto-failover — if the primary provider is unavailable, OASIS automatically retries on the next provider in your priority list. Zero downtime, no code changes.
- Auto-replication — write once, and OASIS copies the data to all configured providers simultaneously. Reads come from whichever is fastest.
- Hot-swap — change the active provider at runtime (or per-request) without restarting anything.
Provider Catalogue
| Provider | Type | Best for | Status |
|---|---|---|---|
MongoDBOASIS | Database | Fast structured data, default for most apps | Live |
HoloOASIS | P2P / DHT | Truly decentralised, agent-centric data | Live |
IPFSOASIS | File / Content | Immutable content addressing, large assets | Live |
SolanaOASIS | Blockchain | NFTs, tokens, on-chain proofs | Live |
EthereumOASIS | Blockchain | EVM smart contracts, ERC-721/1155 NFTs | Live |
EOSIOasisOASIS | Blockchain | High-throughput EOSIO/SEEDS transactions | Live |
Neo4jOASIS | Graph DB | Complex relationship queries, social graphs | Live |
SQLLiteDBOASIS | Database | Local / edge deployments, offline-first | Live |
ThreeFoldOASIS | Decentralised compute | Sovereign hosting, ThreeFold grid | Live |
AzureCosmosDBOASIS | Cloud DB | Enterprise Azure deployments | Live |
ActivityPubOASIS | Federation | Fediverse / Mastodon integration | Beta |
ChainlinkOASIS | Oracle | Real-world data feeds, price oracles | Beta |
Configuring Providers in Your ONODE
The OASIS ONODE reads provider config from appsettings.json. Here's a production-ready example with MongoDB as primary and Holochain as failover:
{
"OASIS": {
"StorageProviders": {
"MongoDBOASIS": {
"ConnectionString": "${MONGO_CONNECTION_STRING}",
"DBName": "oasis_prod",
"Priority": 1 // ← primary provider
},
"HoloOASIS": {
"HolochainConductorURI": "ws://localhost:8888",
"Priority": 2 // ← first failover
},
"IPFSOASIS": {
"IPFSNode": "https://ipfs.infura.io:5001",
"Priority": 3 // ← second failover
}
},
"AutoFailOver": true,
"AutoReplication": true, // write to all providers
"AutoLoadBalance": true, // reads from fastest provider
"DefaultProvider": "MongoDBOASIS",
"JWT": {
"Secret": "${JWT_SECRET}",
"ExpiresInDays": 7,
"RefreshExpiresInDays": 30
}
}
}
Use ${ENV_VAR} syntax in appsettings.json to reference environment variables. Never commit real connection strings, JWT secrets or API keys to source control. Use Railway / Docker secrets or a vault like HashiCorp Vault for production.
Switching Providers at Runtime
You can override the active provider on a per-request basis from your JavaScript app:
import { oasis } from './oasis.js'; // Switch the global default for subsequent calls await oasis.provider.setGlobalDefaultProvider({ providerType: 'HoloOASIS' }); // Or override just for a single request (non-global) const result = await oasis.data.saveHolon({ name: 'SensitiveRecord', metaData: { secret: 'data' }, providerType: 'HoloOASIS', // only this request uses Holochain setGlobally: false }); // List all registered providers and their status const { result: providers } = await oasis.provider.getProviders(); providers.forEach(p => console.log(p.providerType, p.status, p.priority));
Deploying an ONODE to Railway
Railway is the fastest way to deploy a production ONODE — it handles SSL, custom domains and environment variables automatically.
Fork and connect the repo
Fork NextGenSoftwareUK/OASIS to your GitHub account. In Railway, click New Project → Deploy from GitHub and select your fork. Choose the ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI directory as the root.
Set environment variables
MONGO_CONNECTION_STRING = mongodb+srv://user:pass@cluster.mongodb.net/oasis_prod
JWT_SECRET = your-256-bit-random-secret
OASIS__DefaultProvider = MongoDBOASIS
OASIS__AutoFailOver = true
OASIS__AutoReplication = false # enable when you have 2+ providers
ASPNETCORE_ENVIRONMENT = Production
Set the start command
dotnet NextGenSoftware.OASIS.API.ONODE.WebAPI.dll
Custom domain
In Railway → Settings → Domains, add your custom domain (e.g. api.myapp.com). Railway provisions Let's Encrypt SSL automatically. Point your OASIS SDK at this URL:
const oasis = new OASISClient({ baseUrl: 'https://api.myapp.com' });
Deploying with Docker
For self-hosted or enterprise deployments, use the official Docker setup:
version: '3.9' services: onode: image: nextgensoftware/oasis-onode:latest ports: - "80:80" - "443:443" environment: - MONGO_CONNECTION_STRING=${MONGO_CONNECTION_STRING} - JWT_SECRET=${JWT_SECRET} - OASIS__DefaultProvider=MongoDBOASIS - OASIS__AutoFailOver=true - ASPNETCORE_ENVIRONMENT=Production volumes: - ./appsettings.json:/app/appsettings.json restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost/api/health"] interval: 30s timeout: 10s retries: 3 mongo: image: mongo:7 volumes: - mongo_data:/data/db environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS} volumes: mongo_data:
docker compose up -d ✓ Container onode Started ✓ Container mongo Started # Verify health curl https://api.myapp.com/api/health {"status":"Healthy","providers":{"MongoDBOASIS":"Connected"}}
Production Security Checklist
- JWT secret — use a cryptographically random 256-bit value; rotate it every 90 days
- CORS — set
AllowedOriginsin appsettings to your actual domains; never use*in production - Rate limiting — enable the built-in rate limiter (
OASIS__RateLimiting__Enabled: true); default is 100 req/min per IP - HTTPS only — set
ASPNETCORE_URLS=https://+:443and redirect HTTP → HTTPS - Password policy — the OASIS avatar system enforces minimum 8 chars + complexity by default; don't disable this
- Admin endpoints — endpoints like
/api/avatar/get-all-avatarsrequire[Authorize]and admin role; verify your role config - MongoDB — use a dedicated database user with least-privilege access; enable MongoDB Atlas IP allowlisting
- Secrets — use Railway secrets, Docker secrets or HashiCorp Vault; never put real values in
appsettings.json
Health & Monitoring
The ONODE exposes a health endpoint and a stats endpoint for monitoring:
// Health check (no auth required — safe to expose) const health = await oasis.health.getHealthInfo(); console.log(health.result.status); // 'Healthy' | 'Degraded' | 'Unhealthy' console.log(health.result.providers); // { MongoDBOASIS: 'Connected', ... } // Platform stats const stats = await oasis.stats.getStats(); console.log(stats.result.totalAvatars); console.log(stats.result.totalHolons); console.log(stats.result.totalNFTs);
Point Uptime Robot or Better Stack at https://api.myapp.com/api/health for uptime alerts. For detailed metrics, the ONODE emits OpenTelemetry traces — connect to Grafana Cloud or Datadog by setting OTEL_EXPORTER_OTLP_ENDPOINT in your environment.
Building a Custom Provider
If you need to integrate OASIS with a database or chain that isn't in the catalogue, you can build your own provider by implementing the IOASISStorageProvider interface in C#:
using NextGenSoftware.OASIS.API.Core.Interfaces; using NextGenSoftware.OASIS.API.Core.Enums; public class MyCustomOASIS : IOASISStorageProvider { public ProviderType ProviderType => ProviderType.Custom; public string ProviderName => "MyCustomOASIS"; public async Task<OASISResult<IHolon>> SaveHolonAsync(IHolon holon, ...) { // Write holon to your custom backend var id = await _myDb.UpsertAsync(holon); holon.Id = id; return new OASISResult<IHolon>(holon); } public async Task<OASISResult<IHolon>> LoadHolonAsync(Guid id, ...) { var doc = await _myDb.GetAsync(id); return new OASISResult<IHolon>(MapToHolon(doc)); } // ... implement remaining interface methods }
Register your provider in Program.cs or via the OASIS provider registration API, and it becomes available as providerType: 'Custom' in all SDK calls. See the Providers directory in the main repo for full examples.
You've Completed the Series!
You've worked through all 8 modules — from your first API call to a production-deployed ONODE with multi-provider failover, GeoNFTs, quests and a published OApp. You're now equipped to build anything on the OASIS platform.
What to explore next
- WEB6 AI APIs — holonic memory, embeddings, ML inference and reasoning networks at
api.web6.oasisomniverse.one - STARNET — the decentralised OASIS networking layer for P2P app communication
- OGEngine — download the Unity package from the Dev Portal and build a 3D game world
- OASIS Founders NFT — holders get elevated platform access, revenue share and governance rights
- Contributing — the OASIS is open source; check the CONTRIBUTING.md guide
- Discord — join the developer community at discord.gg/oasis for support, feedback and early access to new APIs