Server cannot allocate many ports?!

We are using DigitalOcean’s App Platform. So far our Dockerfile started NodeJS server which worked. Now we added Nginx in the Dockerfile as the first responder to proxy our Rust and old NodeJS server. It works perfectly on every machine we have tried on, but not on DigitalOcean’s App Platform. There simple

const app = express() app.listen(8084, () => …) just dones’t work.

Is this some kind of … limitation of the platform?

We have exposed only one port 8081 for Nginx. Internally Rust runs on 8085 and NodeJS should run on 8084.

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.

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
February 27, 2023

Hi Roger

App Platform can only expose 1 port to the outside world which needs to run HTTP traffic.

However, internal ports can be added to the app spec. Your rust port could be run on 8085 and accessed by the components locally. Here’s documentation on internal services.

If both services need to be accessed publicly then they should be separated into distinct components.

Try DigitalOcean for free

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

Sign up

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