Remote Storage
Access your remote data locally or from external Nuxt projects with our secured proxy.

Nuxt makes it easy to access your remote storage from your local environment, which is useful when sharing your database, KV, and blob data with your team or work with data on a different environment.
As NuxtHub is built on top of Nitro Storage and Database, you can modify the configuration for certain environments using environment overrides.
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxthub/core'],
nitro: {
// Built environment database configuration
storage: {
kv: {
driver: 'redis',
},
blob: {
driver: 'fs',
base: '.data/blob'
},
cache: {
driver: 'fs',
base: '.data/cache'
}
},
// Override driver for default dev storage for cache
devStorage: {
cache: {
driver: 'memory',
}
},
// Built environment database configuration
database: {
db: {
connector: 'postgresql',
options: {
connectionString: process.env.POSTGRES_URL
}
}
},
// Local development database configuration
devDatabase: {
db: {
connector: 'pglite',
options: {
dataDir: '.data/pglite'
}
}
}
},
// Staging environment database configuration
// Learn more at https://nuxt.com/docs/getting-started/configuration#environment-overrides
$env: {
staging: {
nitro: {
storage: {
kv: {
driver: 'cloudflare-kv-binding',
},
},
database: {
db: {
connector: 'postgresql',
options: {
connectionString: process.env.STAGING_POSTGRES_URL
}
}
},
}
}
},
hub: {
database: 'postgresql',
blob: true,
kv: true,
cache: true
},
})
Start your Nuxt project with:
Terminal
npx nuxt dev # dev environment
npx nuxt dev --envName staging # staging environment
npx nuxt dev --envName production # production environment