January 31, 2026 (2mo ago)
Written by Temps Team
Last updated January 31, 2026 (2mo ago)
Deploying a Next.js application shouldn't require a DevOps degree. With Temps, you go from code to production in under 5 minutes — complete with automatic HTTPS, preview environments, and built-in analytics.
This tutorial walks through deploying any Next.js app to Temps, whether you're starting fresh or migrating from another platform.
After following this guide, your Next.js app will have:
All without per-seat charges or bandwidth limits.
The fastest way to deploy is through the command line.
# macOS / Linux
curl -fsSL https://temps.sh/deploy.sh | bash
# Or with npm/bun
npm install -g @temps-sdk/cli
bunx @temps-sdk/cli login
This opens a browser window for authentication. Sign in with GitHub, GitLab, or email.
# Create a new project
bunx @temps-sdk/cli projects create -n "My Next.js App" -d "Next.js application"
# Connect your Git repository
bunx @temps-sdk/cli projects git -p my-nextjs-app \
--owner your-org --repo your-nextjs-app --branch main --preset nextjs -y
Temps automatically detects your Next.js configuration and sets up optimal deployment settings.
bunx @temps-sdk/cli deploy my-nextjs-app -b main -e production -y
That's it. Temps builds your application and deploys it to production. You'll receive a URL like your-app.temps.sh within seconds.
Connect your repository for automatic deployments on every push.
Temps auto-detects Next.js projects. Default settings work for most apps:
| Setting | Default Value |
|---|---|
| Build command | npm run build |
| Output directory | .next |
| Node version | 20 |
Click Deploy or push to your main branch. Temps handles:
Most Next.js apps need environment variables for databases, APIs, or feature flags.
# Add a single variable
bunx @temps-sdk/cli environments vars set -e production \
DATABASE_URL "postgresql://..."
# Add multiple from a file
bunx @temps-sdk/cli environments vars import -e production -f .env.production
# List all variables
bunx @temps-sdk/cli environments vars list -e production
Environment variables are encrypted and securely injected at build and runtime.
Every pull request automatically gets a preview deployment.
Preview URLs follow the pattern:
pr-123-your-app.temps.sh
Share these with stakeholders for feedback before merging to production.
Add an A record pointing to your server:
| Type | Name | Value |
|---|---|---|
| A | yourdomain.com | YOUR_SERVER_IP |
| A | www | YOUR_SERVER_IP |
# Uses HTTP challenge by default
bunx @temps-sdk/cli domains add -d yourdomain.com
For wildcard domains, DNS challenge is required:
# Wildcard — must use DNS challenge
bunx @temps-sdk/cli domains add -d "*.yourdomain.com" --challenge=dns-01
With --challenge=dns-01, the CLI shows a TXT record to add to your DNS provider. Once propagated, Temps completes ACME validation and issues the certificate. For standard (non-wildcard) domains, the default http-01 challenge handles everything automatically.
SSL certificates are provisioned via Let's Encrypt.
Temps supports the full Next.js feature set:
// app/page.tsx - fully supported
export default function Home() {
return <h1>Hello from App Router</h1>
}
// Server components work out of the box
async function getData() {
const res = await fetch('https://api.example.com/data')
return res.json()
}
export default async function Page() {
const data = await getData()
return <div>{data.title}</div>
}
// app/api/hello/route.ts
export async function GET() {
return Response.json({ message: "Hello" });
}
// Server actions work without configuration
async function submitForm(formData: FormData) {
"use server";
// Handle form submission
}
// ISR with revalidation
export const revalidate = 60; // Revalidate every 60 seconds
// middleware.ts
export function middleware(request: NextRequest) {
// Runs on the edge
}
After deployment, your Temps dashboard includes analytics:
No additional integration required. Privacy-friendly and GDPR-compliant by default.
Temps captures frontend and backend errors automatically:
Errors appear in your dashboard immediately. No Sentry subscription needed.
For smaller, faster deployments, add to next.config.js:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
};
module.exports = nextConfig;
This reduces deployment size by excluding unnecessary dependencies.
Temps supports Next.js Image Optimization out of the box:
import Image from 'next/image'
export default function Page() {
return (
<Image
src="/hero.jpg"
alt="Hero"
width={1200}
height={600}
priority
/>
)
}
Images are automatically optimized and cached at the edge.
| Aspect | Temps | Vercel |
|---|---|---|
| Deploy time | ~30 seconds | ~30 seconds |
| Team pricing | Free (unlimited) | $20/seat |
| Bandwidth | Unlimited | $40/100GB |
| Analytics | Included | $10+/month |
| Error tracking | Included | Not included |
| Aspect | Temps | Docker + VPS |
|---|---|---|
| Setup time | 5 minutes | 30+ minutes |
| Preview deploys | Automatic | Manual setup |
| SSL certificates | Automatic | Let's Encrypt setup |
| Rollbacks | One click | Manual |
Check your build logs in the dashboard. Common issues:
Your Next.js app is now live on Temps. Here's what to explore next:
# Install CLI
curl -fsSL https://temps.sh/deploy.sh | bash
# Login
bunx @temps-sdk/cli login
# Create project and connect repo
bunx @temps-sdk/cli projects create -n "My App" -d "My Next.js app"
bunx @temps-sdk/cli projects git -p my-app --owner myorg --repo my-app --branch main --preset nextjs -y
# Deploy
bunx @temps-sdk/cli deploy my-app -b main -e production -y
# Set environment variable
bunx @temps-sdk/cli environments vars set -e production KEY "value"
# View logs
bunx @temps-sdk/cli runtime-logs -p my-app -f
# Add custom domain (HTTP challenge by default, use --challenge=dns-01 for wildcards)
bunx @temps-sdk/cli domains add -d yourdomain.com
# Rollback to previous deployment
bunx @temps-sdk/cli deployments rollback -p my-app -e production
Ready to deploy? Get started at temps.sh or run:
curl -fsSL https://temps.sh/deploy.sh | bash && bunx @temps-sdk/cli deploy