Strapi on DigitalOcean - can't fix URL

System Information
  • **Strapi Version4.0.5:
  • Operating System:
  • **DatabasePostgreSQL:
  • **Node Version16.14.0:
  • NPM Version:
  • Yarn Version:

I have just deployed my first Strapi app onto DigitalOcean. Build is complete and I receive the following URL’s from DO:
[2022-02-10 15:11:34] Welcome back!
[2022-02-10 15:11:34] To manage your project :rocket:, go to the administration panel at:
[2022-02-10 15:11:34] http://0.0.0.0:8080/[do_url].ondigitalocean.app/admin
[2022-02-10 15:11:34]
[2022-02-10 15:11:34] To access the server :zap:, go to:
[2022-02-10 15:11:34] http://0.0.0.0:8080/[do_url].ondigitalocean.app

As you can see there is 0.0.0.0:8080 before the actual URL. I can’t seem to get rid of this.

My /config/env/production/server.js file is as follows:

module.exports = ({ env }) => ({
  url: '[do_url].ondigitalocean.app/'
});

I guess the 0.0.0.0:8080 is coming from the /config/server.js file, as follows:

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
});

How can I fix this so that I can reach my Strapi instance? :slight_smile:

Thanks in advance,
Mike

Hi @Mxkert
are you using a droplet or the app platform?

I’m running strapi on the app platform and have no custom production server config.
The message about the population of the admin panel is the same (except your custom string) because it’s just used internally.

[xxx] [2022-02-10 15:17:54] To manage your project 🚀, go to the administration panel at:
[xxx] [2022-02-10 15:17:54] http://0.0.0.0:8080/admin
[xxx] [2022-02-10 15:17:54] 
[xxx] [2022-02-10 15:17:54] To access the server ⚡️, go to:
[xxx] [2022-02-10 15:17:54] http://0.0.0.0:8080

You can access the instance with the droplet or (in my case) app url generated from DO.
Just remove your custom prod config and try again.

Hope this helps.

Hi @mrt-stl,

Thank you for the quick answer. I’m also using the App Platform.
I deleted the server.js production file and re-built the app. Everything is working now, thank you!

On Heroku I had to create that file so I thought I’d just swap it with DO credentials.