Hi Goran,
this took me quite a while to figure out, too. I found a solution on stackoverflow, but maybe this will help you:
@echo off
echo Try to kill the task/process of any previous Bokeh server:
taskkill /IM bokeh.exe /F
rem # Find the current IP:
for /f “tokens=1-2 delims=:” %%a in (‘ipconfig^|find “IPv4”’) do set ip=%%b
set ip=%ip:~1%
rem # Read command line option #1 as port number (or set 80 to default):
set port=%1
if not defined port set port=80
rem # Read command line option #2 as log-level (default is ‘critical’):
rem # ‘log-level’ can be one of: trace, debug, info, warning, error or critical
set loglevel=%2
if not defined loglevel set loglevel=critical
echo This batch file starts a Bokeh server that can be accessed remotely.
echo - For local access type “localhost:%port%/whatever” in local browser.
echo - For remote access type “%IP%:%port%/whatever” in remote browser.
rem # Start Bokeh server with enabled remote access and the given log-level
bokeh serve whatever --show --allow-websocket-origin localhost:%port% ^
–allow-websocket-origin %ip%:%port% --port %port% ^
–log-level %loglevel%
``
On Windows, the above is my “start_bokeh.cmd” batch file that I just have to double-click to start my bokeh server “whatever”.
The important part is “–allow-websocket-origin %ip%:%port%”. This %ip% is the one a remote client has to type into his browser, and it is allowed in this step.
Please note: I only use this within a local network. I don’t know if this works via internet.
But my guess is that you could add “–allow-websocket-origin http://mywebpage.com:%port%”
Regards
···
Am Mittwoch, 13. Dezember 2017 20:20:11 UTC+1 schrieb Goran Goki:
Hi, I’m new in bokeh server environment. My bokeh application working perfectly on localhost and any port .
Now I would like the application to be available for users via internet. I don’t now how to write bokeh server running statement, the application to be available via network with "normal URL address (for instance: “http://mywebpage.com/whatever”) and without IP address. The server name where is installed bokeh server and .py application is “testserver”. I need detailed information how to do it? Should I put something in my .py code?
Best regards,
Goran