What you need
You need three things: a Next.js app (an existing one is fine), a Git repository for it (GitHub works out of the box), and a cdn.com.tr account. You will not need to provision a server, install Node on a VM, or configure a reverse proxy — the platform handles the runtime, TLS and delivery. The only app-side change is telling Next.js to produce a self-contained build so it runs cleanly in a container.
Prepare the app for a container
First, enable Next.js standalone output. This bundles only the files the server needs, which keeps the image small and the container simple.
next.config.js
// next.config.js
module.exports = {
output: 'standalone',
};
Add a Dockerfile
A small multi-stage Dockerfile builds the app in one stage and ships only the runtime output in the next. Commit this file to the root of your repository.
Dockerfile
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Runtime stage
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
Deploy from Git (recommended)
In the cdn.com.tr panel, create a container app and connect your Git repository. The platform reads your Dockerfile, builds the image and runs the container — no build server to maintain. From then on, deploying is just pushing to your branch: every push triggers a fresh build and a zero-downtime rollout.
Ship a change
git add .
git commit -m "Update homepage"
git push origin main
# cdn.com.tr builds the new image and rolls it out automatically
Or deploy with the cdnctl CLI
Prefer the command line or a CI pipeline? The cdnctl operator CLI manages your container apps as code. Log in once and pick your account, then create the app from an image you pushed to a registry — and use the same tool to stream logs, scale or roll back. This is what makes cdn.com.tr fast to ship on: one command instead of a console click-through.
cdnctl login
cdnctl accounts use <account_uuid>
# create the app from your pushed image, on your domain
cdnctl container apps create \
--name my-nextjs \
--image registry.example.com/acme/my-nextjs --tag 1.0.0 \
--port 3000 --domain app.example.com \
--healthcheck /api/health --healthcheck-type http
# then, anytime:
cdnctl container apps logs --app <app_uuid> --tail 100
cdnctl container apps scale --app <app_uuid> --replicas 2
cdnctl container apps deploy --app <app_uuid>
Custom domain, HTTPS and the edge
Point your domain at the app and cdn.com.tr issues and renews an SSL certificate automatically — no manual certbot. Your Next.js app now runs behind the CDN edge, so static assets are cached and delivered close to each visitor, a WAF filters malicious traffic, and traffic spikes are absorbed at the edge instead of hammering a single container. You get a fast, secure, production Next.js deployment without operating any of the infrastructure underneath it.
Good fits
Next.js pages served from the edge load fast worldwide and stay up during a launch or a viral moment.
Run your Next.js API routes and SSR as a managed container with automatic HTTPS and a WAF in front.
Git-push deploys with zero-downtime rollouts fit CI and frequent releases without server babysitting.
Next.js deploy FAQ
Do SSR and API routes work, or only static export?
Both work. Because the app runs as a real Node container (not a static export), server-side rendering, API routes and middleware all run normally. The CDN caches what is cacheable and passes dynamic requests through to the container.
How do updates and rollbacks work?
Every push to your connected branch builds a new image and rolls it out with zero downtime. If a build fails, the previous version keeps serving, so a bad commit does not take your site down.
Do I need to manage the server, Node version or SSL?
No. The container runtime, scaling, TLS certificates and the edge are managed for you. You control the app and its Dockerfile; the infrastructure underneath is handled.