Docker image for OpenCPN - a full-featured chartplotter and marine GPS navigation software, accessible via web browser using Selkies.
OpenCPN is a free and open-source chartplotter and navigation software for recreational sailors and boaters. This Docker image packages OpenCPN with Selkies, a web-native remote desktop platform, allowing you to access OpenCPN through any modern web browser without needing VNC clients or remote desktop software.
- Browser-Based Access: Access OpenCPN from any device with a web browser
- No VNC Client Required: Uses WebRTC technology for low-latency streaming
- GPU Acceleration: Hardware-accelerated rendering for smooth chart display
- File Upload/Download: Easy chart management through web interface
- Multi-Architecture: Supports ARM64 (Raspberry Pi) and AMD64
- Persistent Storage: Configuration and charts stored in Docker volumes
- Night Mode Support: Includes xcalib for screen dimming
docker run -d \
--name opencpn \
-p 3020:3000 \
-v opencpn-config:/config \
--shm-size=1gb \
ghcr.io/hatlabs/opencpn-docker:latestAccess OpenCPN at http://localhost:3020
/config- OpenCPN configuration, charts, and user data
3000- HTTP web interface (map to your preferred external port)3001- HTTPS web interface (optional, self-signed certificate)8082- WebSocket connection (used internally)
Display Settings:
CUSTOM_RES_W- Browser width resolution (default: 1920)CUSTOM_RES_H- Browser height resolution (default: 1080)SELKIES_ENABLE_RESIZE=true- Enable responsive resolution scaling
GPU Acceleration:
DRI_NODE=/dev/dri/renderD128- Enable hardware acceleration
Authentication (Optional):
CUSTOM_USER- HTTP Basic auth usernamePASSWORD- HTTP Basic auth password
UI Customization:
TITLE=OpenCPN- Browser tab title (default)SELKIES_ENABLE_CLIPBOARD_SYNC=true- Enable clipboard sharing
- Access the web interface at your configured port
- OpenCPN will launch automatically in the browser
- Complete the initial setup wizard
- Configure chart directories and data sources
Upload Charts via Web Interface:
- Click the folder icon in the Selkies toolbar
- Use the upload feature to transfer chart files
- Charts will be saved in
/config/charts/ - In OpenCPN, add the chart directory: Options → Charts → Add Directory
Alternative - Docker Volume:
# Copy charts directly to the volume
docker cp /path/to/charts opencpn:/config/charts/Configure NMEA connections in OpenCPN:
- Network: Connect to Signal K or other NMEA servers
- Serial: Mount serial devices with
--device=/dev/ttyUSB0 - File Playback: Upload NMEA log files for replay
The container uses software rendering by default, which should work on all systems.
While hardware acceleration via /dev/dri is theoretically possible, it currently causes display issues on some systems (blank screen). This is a known limitation with the Selkies web desktop stack.
If you want to experiment with GPU acceleration:
docker run -d \
--name opencpn \
-p 3020:3000 \
-v opencpn-config:/config \
--device=/dev/dri:/dev/dri \
--shm-size=1gb \
-e DRI_NODE=/dev/dri/renderD128 \
ghcr.io/hatlabs/opencpn-docker:latestRequirements:
- Intel or AMD GPU with DRI3 support
- Proper GPU drivers installed on host
- May result in blank screen (see known limitations below)
Note: Software rendering performance is generally adequate for chart plotting. Only experiment with GPU acceleration if you experience performance issues.
docker run -d \
--name opencpn \
-p 3021:3001 \
-v opencpn-config:/config \
-e CUSTOM_USER=admin \
-e PASSWORD=your-secure-password \
--shm-size=1gb \
ghcr.io/hatlabs/opencpn-docker:latestdocker run -d \
--name opencpn \
-p 3021:3001 \
-v opencpn-config:/config \
-e CUSTOM_RES_W=2560 \
-e CUSTOM_RES_H=1440 \
--shm-size=1gb \
ghcr.io/hatlabs/opencpn-docker:latestdocker build -t opencpn:local .For multi-architecture builds:
docker buildx build --platform linux/amd64,linux/arm64 -t opencpn:local .- Ensure
--shm-size=1gbis set (required for Chromium-based Selkies) - Check browser console for WebRTC errors
- Verify port 3000 is accessible
- Software rendering is used by default (GPU acceleration has compatibility issues)
- Increase allocated resources (CPU/RAM)
- Reduce resolution with
CUSTOM_RES_WandCUSTOM_RES_Henvironment variables
- Verify charts are in
/config/charts/directory - In OpenCPN: Options → Charts → Add Directory
- Force chart database rebuild if needed
This Docker image is licensed under GPL-2.0, matching the upstream OpenCPN project. See LICENSE for details.
OpenCPN is licensed under GPL-2.0. Selkies and related components have their own licenses.
Contributions are welcome! Please open an issue or pull request on the GitHub repository.
For issues with this Docker image, open an issue on GitHub. For OpenCPN-specific questions, refer to the OpenCPN documentation or OpenCPN forums.