Access the fly server but not via terminal

I would like to access the server but like it was my computer, so I can see prisma studio, etc.

If your question is that you want to be able to see the display/desktop of the machine:
I dont think its possible to remote-VM into it. If you try to fly ssh terminal into it, you cant run firefox (or other GUI apps). You could try to set up something like Kasm Workspaces, which is what I am trying to do atm.

Maybe I didnt explain myself.

On my desktop when i Run npx prisma studio, i can edit and add data on my database without using sql commands.

I thought it was possible using a proxy

You’re looking for the flyctl proxy command: flyctl proxy · Fly Docs

What do this proxy do? I can access desktop? or what is used for

Fly.io VMs do not run graphical desktops - our virtualisation software firecracker doesn’t support it.

npx prisma studio runs a server on a HTTP port. You can use flyctl proxy to forward that HTTP port from your Fly.io VM to your local computer, so you can access prisma studio as if it was running on your local computer.

I tried, but keeps opening my local prisma studio

after this, I open a new terminal tab and run npx prisma studio, and opens the local one.

Ah, I see. You need to run this command in the second terminal tab to launch a prisma studio on your VM:

fly ssh console -a avo-fly -C "npx prisma studio --hostname 0.0.0.0 --browser none"

and this flyctl proxy command:

fly proxy -a avo-fly 5555:15555

It won’t automatically open prisma studio in your browser, but you can manually browse http://localhost:15555 to access the remote prisma studio.

fly proxy -a avo-fly 5555:15555 didnt work, page stuck on loading and running

fly ssh console -a avo-fly -C "npx prisma studio --hostname 0.0.0.0 --browser none"

give me this

Update available 0.0.503 -> 0.0.520.
Run "fly version update" to upgrade.
Connecting to fdaa:0:c395:a7b:96:4:b929:2... complete
fly proxy -a avo-fly 5555:15555
Need to install the following packages:
  prisma@4.12.0
Ok to proceed? (y) fly proxy -a avo-fly 5555:15555
npm notice
npm notice New major version of npm available! 8.19.4 -> 9.6.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.4
npm notice Run npm install -g npm@9.6.4 to update!
npm notice
npm ERR! canceled

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2023-04-14T16_38_24_633Z-debug-0.log
Error ssh shell: Process exited with status 1

You need to run the fly ssh console and fly proxy commands in different terminal tabs.

At the “Ok to proceed?” prompt, type y.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.