Running Next.js as web service on DO App Platform

I’m currently deploying my Next.js app as a web service on the DO App Platform, because I want to take advantage of some Next.js features like SSR and the new Image component that would require a running node server. Are there any cons to this approach that I should be aware of?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
December 2, 2020
Accepted Answer

Hi @ilonews,

That’s definitely a valid approach to running a Next.js app! Service components also enjoy the same benefits as Static Site components by being behind the Cloudflare CDN.

One thing to keep in mind is that you can make use of caching on the Cloudflare CDN edge by setting the Cache-Control HTTP Headers on your Next.js server.

@kamaln7, about your recommendation to set Cache-Control from Next.js, is there a recommended way of doing that? Have run into this issue which is preventing me from managing the Cloudflare cache for my app.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel