Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Deploy a Next.js application on a Linux VPS by running its production Node.js server on a private port, supervising it with PM2 or systemd, and putting Nginx in front as the public reverse proxy. This arrangement supports the full Next.js feature set, keeps the application port off the internet, and gives you a clear place to terminate HTTPS, limit requests, and manage operational failures.

The workflow is: prepare the VPS and DNS, create a non-root user, install a compatible Node.js release, install dependencies, set server-side environment variables, run next build, start with next start, configure a process supervisor, proxy through Nginx, add TLS, and verify restarts, assets, images, streaming, and error handling.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the deployment model before you provision the server

A VPS can run Next.js in several ways. Your choice determines which framework features remain available and how much operational work you will own.

Deployment model Feature coverage Operational complexity Portability Proxy and storage considerations Best fit
Node.js server with next start Full Next.js feature support, including server-rendered routes and server-side behavior Moderate: you manage Node.js, a supervisor, Nginx, TLS, logs, and updates Runs directly on a Linux VPS and is straightforward to debug Use a reverse proxy; decide how cache and durable files should work if you add more instances The default choice for a dynamic application on one VPS
Docker container Also supports all Next.js features when the image is built correctly Higher initial setup, but repeatable builds and deployments High: the same image can run on different hosts Usually still place Nginx or another proxy at the edge; explicitly plan persistent storage and shared cache Teams that already use containers or need reproducible releases
Static export Limited feature set; no server-only behavior or dynamic server execution Low after the export is generated Very high: serve files from Nginx or Apache No Node.js process is required; unsupported features must be replaced with client-side or external services Sites that are genuinely static and do not need server-rendered or server-dependent features

This guide uses the Node.js server model. Next.js requires a build script and a start script in package.json; the production sequence is npm run build followed by npm run start.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

What you need before starting

  • A Linux VPS with a public IPv4 address (and IPv6 if you intend to serve it), administrative access, and enough CPU, memory, and disk for your application and build process.
  • A domain name whose DNS you can edit. Create an A record for the hostname, such as app.example.com, pointing to the VPS address. Add an AAAA record only when the server is correctly configured for IPv6.
  • A Next.js project that builds successfully in a clean environment, committed to Git or available as an archive.
  • The Node.js version required by your exact Next.js release and its dependencies. Check the project’s declared engine requirements rather than choosing a version from memory.
  • SSH access and a plan for backups, updates, logs, and rollback.

DNS changes may take time to appear at different resolvers. You can continue preparing the server while the hostname propagates, then test the site after the record resolves to the VPS.

Prepare and secure the Linux VPS

Connect and apply updates

Use the provider’s initial administrator account only for setup. On an Ubuntu or Debian-based VPS, connect over SSH and apply security updates:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh root@SERVER_IP
apt update
apt full-upgrade -y

On another distribution, use its package manager and service conventions. Reboot when the kernel or other core packages require it, then reconnect before continuing.

Create a non-root deployment user

Run the application as an unprivileged account. Replace deploy with the username you want to use:

adduser deploy
usermod -aG sudo deploy

Copy your SSH public key to the new account and test a second session before disabling root login. Keep the original session open until the new account is confirmed:

ssh-copy-id deploy@SERVER_IP
ssh deploy@SERVER_IP

After testing key-based login, harden SSH in /etc/ssh/sshd_config by disabling direct root login and, where appropriate, password authentication. Validate the configuration before restarting the daemon:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sshd -t
systemctl restart ssh

Configure the firewall

Expose only the services that must be public. SSH is needed for administration; HTTP and HTTPS are needed for certificate issuance and web traffic:

sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose

Do not open port 3000 to the public internet. The Next.js process will listen on localhost, and Nginx will be the only public application entry point.

Install a compatible Node.js runtime

Install the Node.js major version supported by your project’s Next.js release. A version manager can make switching versions easier for a deployment user; a system package or distribution repository can be preferable when you want centrally managed updates. Whichever method you choose, verify both Node.js and the package manager in the same account that will build and run the app:

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
node --version
npm --version

If the project uses a lockfile, use the matching package manager and its lockfile-aware command. For npm, production installation on a server commonly looks like:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm ci --omit=dev

Some projects require development dependencies during the build. In that case, install all locked dependencies for the build, run the build, and use a deployment strategy that retains the dependencies needed by your runtime. Do not remove a package merely because it is listed under development dependencies until you have confirmed that the generated application does not need it at runtime.

Upload the application and define its environment

Place the source in a predictable directory

Clone the repository or upload a release archive under the deployment user’s home directory. A common layout keeps the current release in one stable path:

sudo mkdir -p /var/www/my-next-app
sudo chown -R deploy:deploy /var/www/my-next-app
cd /var/www/my-next-app
git clone YOUR_REPOSITORY_URL .

For production, pin the deployment to a reviewed commit or tag rather than building an unreviewed branch. If you use an archive instead of Git, verify its checksum before extracting it.

Separate build-time and runtime variables

Next.js treats public environment variables differently from server-only variables. Variables with the public prefix are embedded into the browser bundle during next build; changing them after the build does not change already-generated client code. Keep API keys, database credentials, signing secrets, and other confidential values in server-only variables without that public prefix.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create an environment file readable only by the deployment account, or provide variables through your service manager. For example:

cd /var/www/my-next-app
cat > .env.production <<'EOF'
DATABASE_URL=replace-with-a-server-only-value
SESSION_SECRET=replace-with-a-long-random-value
NEXT_PUBLIC_API_BASE_URL=https://api.example.com
EOF
chmod 600 .env.production

Do not commit this file. The public URL in the example is safe to expose only if the value itself is intended for browsers; the database URL and session secret must never be prefixed for client exposure. Because public values are compiled into the application, change them and rebuild whenever they need to change.

Build and test the production application locally on the VPS

Install dependencies and run the production build

From the project directory, install dependencies with the project’s package manager and execute the production build:

npm ci
npm run build

The build generates optimized production output. Treat a build failure as a deployment failure: read the first actionable error, correct the code, dependency, environment, or Node.js mismatch, and run the build again. Do not place a development server behind Nginx as a workaround.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Start on a private port

Start the production server on localhost. Port 3000 is a conventional example; choose another local port if it conflicts with an existing service:

HOSTNAME=127.0.0.1 PORT=3000 npm run start

In a second SSH session, check that the process responds locally:

curl -I http://127.0.0.1:3000
curl http://127.0.0.1:3000

Stop this foreground test with Ctrl-C after confirming the response. The supervisor will start it in the next step.

Keep Next.js running with PM2 or systemd

PM2 setup

PM2 is convenient when your team wants a simple process list, log commands, and restart controls. Install it for the deployment environment, then create an ecosystem file:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo npm install --global pm2
cd /var/www/my-next-app
cat > ecosystem.config.cjs <<'EOF'
module.exports = {
  apps: [{
    name: 'my-next-app',
    cwd: '/var/www/my-next-app',
    script: 'node_modules/next/dist/bin/next',
    args: 'start -p 3000 -H 127.0.0.1',
    env: {
      NODE_ENV: 'production'
    }
  }]
};
EOF
pm2 start ecosystem.config.cjs
pm2 status
pm2 logs my-next-app

Save the process list and generate the startup command PM2 recommends for your distribution and user:

pm2 save
pm2 startup

Run the exact elevated command printed by pm2 startup, then run pm2 save again. Test a controlled restart before declaring the deployment complete:

pm2 restart my-next-app
curl -I http://127.0.0.1:3000

systemd alternative

Use systemd when you want the operating system to own the service definition and logs. Create /etc/systemd/system/my-next-app.service as root:

[Unit]
Description=Next.js production server
After=network.target

[Service]
Type=simple
User=deploy
WorkingDirectory=/var/www/my-next-app
Environment=NODE_ENV=production
EnvironmentFile=/var/www/my-next-app/.env.production
ExecStart=/usr/bin/npm run start -- -p 3000 -H 127.0.0.1
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Confirm the paths to npm and the environment file on your system, then load and enable the unit:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl daemon-reload
sudo systemctl enable --now my-next-app
sudo systemctl status my-next-app
sudo journalctl -u my-next-app -f

Choose one supervisor for the application. Running both PM2 and systemd against the same port will create competing processes and confusing restarts.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Install Nginx as the reverse proxy

Next.js recommends a reverse proxy instead of exposing the application directly. Nginx can reject malformed requests, enforce payload limits, absorb slow-connection behavior, apply rate limits, terminate TLS, and keep the Node.js port private.

Install and enable Nginx:

sudo apt install nginx -y
sudo systemctl enable --now nginx

Create a server block for your hostname. Replace the domain and certificate paths after TLS is issued:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 80;
    listen [::]:80;
    server_name app.example.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Enable the site, check the syntax, and reload without interrupting existing connections:

sudo ln -s /etc/nginx/sites-available/my-next-app /etc/nginx/sites-enabled/my-next-app
sudo nginx -t
sudo systemctl reload nginx

Visit the hostname over HTTP and inspect both the browser response and Nginx’s error log. A 502 status normally means Nginx cannot connect to the local Next.js process; verify the supervisor status and the local curl test first.

Add HTTPS and redirect HTTP

Obtain a certificate for the exact hostname after DNS resolves to the VPS and port 80 is reachable. An ACME client that integrates with Nginx can request the certificate and install the redirect. The exact package command varies by distribution, so follow the client’s documented installation method for your Linux release.

Your final Nginx configuration should have an HTTPS server block that listens on 443 with the certificate and key, plus an HTTP block that performs a permanent redirect:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 80;
    listen [::]:80;
    server_name app.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name app.example.com;

    ssl_certificate /etc/letsencrypt/live/app.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Test renewal before relying on it. Keep certificate renewal automated and monitor its logs; an expired certificate makes a healthy application appear unavailable to browsers.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle images, streaming, and request limits deliberately

Image optimization

When the application uses next/image, self-hosting with next start works without a special image service. On glibc-based Linux systems, image optimization can still consume substantial memory in some workloads. Watch the process and system memory while testing representative image sizes and traffic. If memory rises unexpectedly, review image dimensions and formats, constrain the optimization workload, or move image transformation to a service designed for it.

Streaming and Suspense

Streaming responses and React Suspense depend on every proxy preserving incremental data. Nginx response buffering can make a page appear stuck until the entire response is generated. For routes that stream, disable buffering, for example by returning the header X-Accel-Buffering: no from the application or by applying the equivalent Nginx location setting. Verify that every intermediary, including an additional load balancer or CDN, passes chunked or HTTP/2 streaming rather than collecting the response.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Payload and timeout policy

Set request body limits and proxy timeouts intentionally instead of inheriting values that are inappropriate for your application. Large uploads, long server actions, and streaming endpoints may need separate locations and timeout policies from ordinary page requests. Keep limits at Nginx so rejected requests do not consume Node.js resources.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the deployment end to end

Use a checklist rather than relying on a successful home-page load:

  • Resolve the hostname from an external network and confirm it reaches the VPS address.
  • Confirm ports 80 and 443 are open and the Next.js port is not publicly reachable.
  • Load a server-rendered route, a statically generated route, and a deliberate error page.
  • Check JavaScript, CSS, fonts, and files under /_next/static/ for successful responses and correct content types.
  • Exercise image optimization with the largest normal image sizes used by the application.
  • Test every build-time public variable in the browser and every server-only variable on the server. Ensure no secret appears in rendered HTML, client JavaScript, or logs.
  • Restart the supervised process and verify that Nginx returns the site again without manual intervention.
  • Reboot the VPS and confirm the supervisor and Nginx both start automatically.
  • Inspect PM2 logs or journalctl, Nginx access logs, and Nginx error logs while making a request.
  • Test certificate renewal in the ACME client’s dry-run mode and record where renewal failures will be reported.

Deploy updates without making the site unavailable

For a simple single-VPS release, fetch a reviewed revision, install its locked dependencies, rebuild, and restart the process:

cd /var/www/my-next-app
git fetch --tags origin
git checkout RELEASE_OR_COMMIT
npm ci
npm run build
pm2 restart my-next-app

With systemd, replace the final command with sudo systemctl restart my-next-app. Keep the previous commit and its build procedure available so you can roll back quickly. A restart is not a substitute for a rollback: if the new build is faulty, check out the previous revision, reinstall its lockfile, rebuild, and restart.

For releases that must avoid interruption, build a new release in a separate directory, run smoke tests against it on a different local port, then switch a stable symlink and restart the supervisor. This adds disk usage and deployment scripting but prevents a failed build from replacing the currently running release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan cache, files, and scaling before adding instances

A single VPS process can hide assumptions that fail when you scale horizontally. If you run multiple application instances, decide where shared cache entries live and where uploaded or generated files are stored. Local disk is not automatically shared, and an in-memory cache in one process is invisible to another. Durable storage, session strategy, invalidation, and coordination must be explicit before placing several instances behind a load balancer.

Even on one VPS, document whether the application writes to disk, how those files are backed up, and what happens after a rebuild. Keep user uploads and other durable data outside disposable release directories unless the application is designed around an external storage system.

Troubleshoot the most common failures

Nginx returns 502 Bad Gateway

  • Check systemctl status my-next-app or pm2 status.
  • Run curl -I http://127.0.0.1:3000 on the VPS.
  • Confirm the proxy port, bind address, and working directory match the supervisor configuration.
  • Read the application logs for a crash caused by a missing variable, incompatible Node.js version, or failed import.

The build fails but development worked

  • Verify the server’s Node.js and package-manager versions against the project requirements.
  • Run the lockfile-aware install again and remove an incomplete dependency directory only when you can reinstall it safely.
  • Check that all variables required during build are present; runtime-only variables do not automatically satisfy build-time code.
  • Inspect case-sensitive import paths, which often pass on a case-insensitive workstation and fail on Linux.

Environment changes do not appear

If the value is public, it was embedded during next build; update the environment and rebuild. For server-only values, restart the supervised process after changing the environment file. Verify the running process environment rather than assuming the shell used for SSH is the one used by PM2 or systemd.

Pages work but images or streamed responses fail

Check image optimizer memory and the requested image dimensions. For streaming, inspect buffering at Nginx and every upstream intermediary, and confirm the response includes the expected incremental behavior rather than arriving as one delayed block.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The site works locally but not through the domain

  • Confirm DNS A and AAAA records point only to correctly configured addresses.
  • Check the Nginx server_name and certificate names.
  • Verify the firewall allows 80 and 443.
  • Review Nginx access and error logs alongside the application logs to identify whether the request reaches the proxy and then the Node.js server.

When a VPS is the wrong choice

Use static export only when the application’s required features fit its limitations; it cannot provide server-only behavior. Choose a container workflow when repeatable images, isolated dependencies, or an existing container platform justify the added setup. For a dynamic Next.js application where you want direct control over Linux, Nginx, the Node.js version, and the release process, the supervised Node.js server on a VPS is the most complete and transparent option.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.