Skip to content

Configuring Your Application's Port

seenode automatically routes traffic from the internet to your running web service. To ensure your application can receive this traffic, the service must listen on the container port that you configure in the dashboard. There is no default port; the Port input must be set before your first deployment.

  • Choose the internal container port that your application listens on (for example 4000).
  • Update your start command so the application binds to that port on host 0.0.0.0.
  • Save the configuration and redeploy. The load balancer uses the value you provided to proxy traffic from ports 80/443 to your container.
  • Need to change the port later? Open your service and go to the project’s Settings tab, update the Port input, and redeploy.
  • You set the port in the service setup screen under the Port input. This is the single source of truth for routing and starts empty until you pick a value.
  • After the service is created, you can revisit the Port input from the project’s Settings tab and adjust it at any time.
  • Do not rely on a PORT environment variable. seenode does not provide one, and it is not required.
  1. A user sends a request to your application’s public URL (e.g., https://my-app.seenode.app).
  2. The request hits seenode’s load balancer on port 80 (for HTTP) or 443 (for HTTPS).
  3. The load balancer forwards the request to your application’s container on the port you configured (for example 4000).

Here’s how to correctly configure a simple Flask application to work with seenode’s environment.

  1. Configure the port in the dashboard

    Set the internal port to match what your application expects (e.g., 4000). This value is used by the load balancer to forward traffic to your container.

    Port config dashboard screenshot
  2. Bind your application to the same port

    Ensure your application listens on 0.0.0.0 and the same port you configured in the dashboard. Provide a default value for local development as needed.

    app.py
    import os
    from flask import Flask
    app = Flask(__name__)
    # Choose the same port you set in the dashboard (e.g., 4000)
    port = int(os.environ.get("FLASK_PORT", 4000))
    @app.route('/')
    def hello_world():
    return 'Hello, World!'
    if __name__ == '__main__':
    app.run(host='0.0.0.0', port=port)
  3. Ensure your start command is correct

    Your start command should simply run the application.

    Terminal window
    python app.py

    For a production application, you would use a production server like Gunicorn and bind it to the correct host and port. Make sure the port matches the dashboard value you set—there is no automatic default.

    Terminal window
    gunicorn app:app --bind 0.0.0.0:4000

By following this pattern, your application will work seamlessly with seenode’s automatic routing and port management, both in production and during local development.

Web Service NamePublic ConnectionPrivate Connection
web-abcdefghhttps://web-abcdefgh.up-de-fra1-k8s-1.apps.run-on-**seenode**.comhttp://web-abcdefgh-service
  1. Let’s say your app is configured to start on port 4000 app.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello, World!"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=4000)
  1. Set the port to 4000
Port config dashboard screenshot
  1. Follow the next steps by clicking continue

  2. Now when the app is built and deployed successfully you can connect to your app by:

    a. Public connection domain (user for access from the internet)

    b. Private connection domain (use for internal connections between your services)