Preventing panel serve to start a browser on the server

Hello

I have a small application using panel that I’m serving via a windows server, the application is working fine the only issue is that each time a user connect to the app the web browser is started on the server
here’s the command that I’m using to serve the script :

panel serve --allow-websocket-origin=172.21.XX.XX:5000 --address 0.0.0.0 -- port 5000 web_ui.py

What am I doing wrong ?, thanks in advance

1 Like

Hi @thekuroro

Welcome to the community.

To me your command looks fine and I would not expect it to open a web browser.

What is the content of your script or code?

Hello Marc thank for the warm welcome

I doesn’t do anything crazy I have a class that build a layout with multiple column that I serve via the server

    def start(self):

        widgets = pn.layout.WidgetBox(
            self.upload,
            self.select,
            self.selection_range,
            self.battery_capacity,
            self.self_discharge,
            pn.Row(pn.widgets.StaticText(name='Range info', value='', width=100), self.current_range),
            pn.Row(pn.widgets.StaticText(name='Cursor range', value='', width=100), self.selection_range),
            pn.Row(pn.widgets.StaticText(name='Battery life', value='', width=100), self.battery_life),
            max_width=380,
            height_policy='max',
            sizing_mode='stretch_height',
        ).servable(target='sidebar')

        right_column = pn.Column(pn.bind(self.explore, self.select), height_policy='max', width_policy='max', sizing_mode='stretch_both').servable(target='main')
        pn.serve(pn.Column(widgets, right_column))


WebUi().start()