Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

java - How can I properly self-host my Spring Boot app on my computer?

I can't connect remotely to my SB app that I want to self-host

Introduction

I made a Spring Boot app with a 'my-sql' container that I want to share outside my home network to test it with some friends. The app works locally but I want to use it outside my network.

I have never, ever, deployed an app and I have little knowledge on this matter and I want to do it properly to avoid problems that I won't be able to handle myself.

What have I done so far

  • I tried opening the 8080 port on the firewall for any connection
  • I added my public ip in the application.properties with port 8080
  • Used 0.0.0.0 to listen to any connection to 8080 as in this solution
  • Load the app to Heroku (success) and self-host the 'my-sql' (that one is another question)

Problem

None of these solutions above worked for me


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a network-related question. However, you need to have a static IP provided by your ISP first. Then you need to configure your network gateway to forward requests to your application.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...