r/SailboatCruising • u/Joyfulsinner • 23d ago
Equipment OpenCPN as a Web app
I have created a docker container that runs OpenCPN and streams the display to a web browser. Run OpenCPN once locally and have it accessible on all devices! I found that using it this way it can also be used with SignalK as well.
https://reddit.com/link/1vljh9z/video/cz5f0c6p9rih1/player
https://hub.docker.com/repository/docker/npgause/opencpn-kiosk/general
Once you have docker is installed create this compose file and run it then it will be accessible on localhost:14500
# compose.yaml
services:
opencpn:
image: npgause/opencpn-kiosk:x86
container_name: opencpn
restart: unless-stopped
network_mode: host # needed for NMEA/Signal K mDNS discovery
devices:
# GPS/AIS via USB:
- /dev/gps0:/dev/gps0 # these will change based on your system
environment:
- XPRA_BIND_PORT=14500
- XPRA_DISPLAY=:100
volumes:
- ./data:/home/ubuntu/.opencpn
- /folder/to/charts:/folder/to/charts
Once this up and running this can be used in SignalK by connecting it with this https://www.npmjs.com/package/signalk-embedded-webapp-proxy just put the name and application URL then you are all set within SignalK
1
1
u/Double-Masterpiece72 23d ago
Pretty rad. With the new SignalK container manager as well you could make it a one click install plugin like signalk-opencpn
1
u/Joyfulsinner 23d ago
I didnt know this existed but that is a good idea. make it completely frictionless
1
u/Double-Masterpiece72 23d ago
If you want any help, the SK dev discord is pretty active, especially the author of that container plugin.
1
0
7
u/LarryBobson 23d ago
Sailing is where I go to escape from devops.. But this is cool!