3 ms·
What is the best method for using the UI with a remote server that only has SSH access? The database is too large to rsync locally and seems risky to start open
by pheeney 2y ago
What is the best method for using the UI with a remote server that only has SSH access? The database is too large to rsync locally and seems risky to start opening ports?
- hfmuehleisen 2y agoSSH port forwarding?
- pheeney 2y agoIt looks like the port is configurable, so that should make it easier to avoid conflicts but I wonder how the performance would be impacted.
- pheeney 2y agoI was able to get it working and it seemed fast enough. However I don't have any local databases of similar size to compare to. ssh -F ssh.config -L 4213:localhost:4213 dev 'DUCKDB_HTTPPORT=4213 ~/.duckdb/cli/latest/duckdb -ui'
- drakythe 2y ago> Support for the UI is implemented in a DuckDB extension. The extension embeds a localhost HTTP server, which serves the UI browser application, and also exposes an API for communication with DuckDB. In this way, the UI leverages the native DuckDB instance from which it was started, enabling full access to your local memory, compute, and file system. Given the above I'm not sure it supports SSH functionality? Since it exposes an API though there is probably a way to access it, but the easiest solution is probably the one you don't want, which is to open the expected port and just hit it up in a browser. You could open it only to your (office/VPN) IP address, that way at least you're only exposing the port to yourself.
- pheeney 2y agoMy ip is dynamic so it seems I would need to wrap it in a script that would handle opening and closing. I didn’t see any authentication built into the UI. Seems like a great local tool but harder to get right in production.
- drakythe 2y agoTrue, but then again it is called a "local UI". And re-reading a bit it does appear to support remote data warehouses, as it has Mother Duck integration, and that is what Mother Duck is. Someone will probably add an interface to make this kind of thing possible for privately hosted DBs. The question is will it be dynamic via SSH tunnel or is it exclusively API driven? And does it depend on the closed source (I think?) Mother Duck authentication system.