| sidebar_label | Deploy | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| description | Learn how to deploy your Next.js project to Juno. Follow the deployment guide to configure static exports, set up your satellite, and publish your site to production. | ||||||||
| keywords |
|
||||||||
| toc_min_heading_level | 2 | ||||||||
| toc_max_heading_level | 2 |
Use this guide to deploy and host your project to production.
The Internet Computer, including Juno, currently does not support Server Side Rendering (without workaround). Therefore, it is recommended to generate a pre-rendered or client-side-only frontend application.
We suggest using the static exports option from Next.js.
:::note
If you’re using the official Juno Next.js plugin, static exports are already configured for you.
:::
In next.config.js file:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export"
};
module.exports = nextConfig;import CreateSatellite from "../components/create-satellite.mdx";
Create a juno.config.mjs file at the root of your project, and replace the PROD_SATELLITE_ID with the ID of the Satellite you created earlier.
import { defineConfig } from "@junobuild/config";
/** @type {import('@junobuild/config').JunoConfig} */
export default defineConfig({
satellite: {
ids: {
development: "<DEV_SATELLITE_ID>",
production: "<PROD_SATELLITE_ID>"
},
hosting: {
source: "out",
predeploy: ["npm run build"]
}
}
});import Deploy from "../components/deploy.mdx";