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

One of the main features of NuxtHub is the ability to access your remote storage from your local environment or from external Nuxt projects.
Access your remote storage from your local environment, useful for sharing your database, KV, and blob data with your team or work with your production data.
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxthub/core'],
nitro: {
// Built/deployed (production) 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/deployed (production) 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: true,
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
That's it! Your local project is now using the remote storage.