Skip to content
Back

[ENHANCEMENT] Use the custom Next.js deployment adaptors instead of open-runtimes

  • 0
  • Sites
  • Web
  • Cloud
WarFiN
19 Mar, 2026, 16:38

Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or modifying stuff.

Here are a few examples of why build adapters should be used:

  1. Native static asset fetching It's currently really hard to map out all the static routes and media just by looking at the build output. Instead, the adapter can return an array of all static assets available to be pushed to the CDN:
TypeScript
staticFiles: Array<AdapterOutput['STATIC_FILE']>
  1. Automatic configuration changes As I had suggested before, using standalone outputs for builds resulted in a much faster and smaller output size as compared to the standard builds. However, not everyone has migrated to the standalone output builds aswell as some people with completely static sites are probably running without the static export either. Instead, we can force an output type using the adapter to ensure the optimal builds are produced:
TypeScript
export interface NextAdapter {
  modifyConfig?: (
    config: {output: string},
  )
}
  1. Further enhancements (caching, edge runtimes, middleware optimizations) Appwrite doesn't have any of these at the moment. Adapters can return which function has to be ran on the origin and which ones can run on the edge in the CDN

Using adapters also means that we wouldn't have to worry about maintaining open-runtimes to support every new major Next.js version. If a native adapter is made once, it will be supported forever

Documentation: https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath

p.s. the nextjs team will be releasing more information on adapters next week

TL;DR
Developers can now use stable deployment adapters on Next.js, freeing them from the limitations of open-runtimes. Benefits include easier static asset fetching, automatic configuration changes for optimal builds, and potential for further enhancements. Adapters eliminate the need for maintaining open-runtimes for new Next.js versions. Documentation: [link]. Next.js team to release more adapter information next week.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more