Using wireguard to display a table like structure for stored prisma sqlite db.

Hey All,

Uploaded Remix app to shared 256mb instance. Right now, the app works fine and as expected. I have installed wireguard and activated.

command like these are also working fine
dig +noall +answer _apps.internal txt

Would like to add/update/delete the sqlite prisma db through my local machine? Please guide in how to proceed ahead.

Please let me know if I am missing anything.


You should be able to run fly ssh console -C "sqlite3 /path/to/database.db" and get a sqlite3 shell. .schema will show you all the tables, you can read here for other commands: Command Line Shell For SQLite

If this is a Remix Indie stack project, you can run fly ssh console -C database-cli. If it’s a custom Docker Image, you can add this to your Dockerfile to create the same command:

RUN echo "#!/bin/sh\nset -x\nsqlite3 /path/to/database.db" > /usr/local/bin/database-cli && chmod +x /usr/local/bin/database-cli

Thank You for replying.

Both commands work Awesomely and I can edit db with sql commands.

Is their any way if I can do the same operation using prisma studio which basically provides a UI to update the underlying DB. prisma studioruns https://localhost:5555 on remote and I have wireguard configured on local machine for remote fly server. Any way if I could connect both of them and manage db through my local machine using an UI?

local Url → wireguard middleware → remote machine localhost:5555 for managing the DB.

Hope it’s clear. Please let me know if any more is needed.

1 Like