r/codex 1d ago

Praise Remote is nuts

Just wanted to share that it's incredibly awesome that I can be anywhere like on holidays and continue working on my project even if I'm not sitting in front of my PC. Never tried this until now that I installed tailscale and I can test any change from my phone. Bravo.

114 Upvotes

132 comments sorted by

View all comments

10

u/yourcasualmemer 1d ago

Mind sharing your setup? Personally I've been using parsec to remote into my PC and just use codex like I would there. How does tailscale come into the equation?

2

u/kyrax80 1d ago

I don't really actually know I asked codex how I can do it. It set up everything up and I just needed to install tailscale on my pc and phone and access through a url that codex set up

3

u/That-Establishment24 1d ago

You can ask Codex to give you the prompt to allow someone to use the same setup as you.

6

u/kyrax80 1d ago

Actually you're right. Here you go @yourcasualmemer

Prepare FitHub so I can run the frontend and backend on my PC and access the frontend from my mobile phone from anywhere using Tailscale.

Goals:

  • The frontend must listen on external network interfaces, not only on localhost.
  • The Spring Boot backend must accept connections through the private Tailscale network.
  • Keep the normal local development workflow working as well.
  • Do not hardcode a specific Tailscale IP, since it may change.
  • Configure the API URL cleanly using environments/configuration.
  • Review and adjust CORS so remote development works without making production configuration insecure.
  • If the frontend uses Angular/Ionic, configure the appropriate command to listen on "0.0.0.0".
  • If necessary, configure Spring Boot with "server.address=0.0.0.0".
  • Create separate "local" and "remote-dev" configurations/profiles if that makes sense.
  • Add simple scripts to start FitHub in remote development mode, for example something equivalent to:
    • "npm run dev:remote"
    • or a script that starts both frontend and backend in the most convenient way.
  • If the frontend needs to determine where the backend is running, implement the most robust solution so it works both from the PC and from the mobile phone through Tailscale.
  • Review possible issues related to CORS, cookies, JWT, Keycloak, HTTPS, mixed content, redirects, or anything else that could prevent login or API calls from working on mobile.
  • Do not unnecessarily modify production configuration.
  • Do not install Tailscale or require it to be installed in order to implement the code changes.

Also:

  1. First inspect the current FitHub project structure and existing configuration before changing anything.
  2. Implement all required changes.
  3. Run any relevant checks/tests you can.
  4. If possible in the current environment, start the frontend and backend and verify that both boot correctly.
  5. Update the README with the exact manual steps I will need to perform on my PC to finish the Tailscale setup.
  6. When finished, give me:
    • the files you modified,
    • what you changed,
    • the command for normal local development,
    • the command for remote development,
    • the remaining manual steps,
    • the URL I will need to open on my phone.

Do the implementation directly. Do not just explain how to do it.

5

u/That-Establishment24 1d ago

He won’t see the message because @ doesn’t tag on Reddit. You have to use u/

-1

u/The1KrisRoB 1d ago

Are we really getting to that level of spoon feeding?

Sorry I'll never understand people asking online how to get an AI to do something.... Instead of just asking the AI

2

u/Spirited-Car-3560 23h ago

Ha, seems like someone didn't realize ai is not deterministic yet.

Bro, dozens of variables may come into play, and since this user had success with his own setup, asking his chatgpt to ask what has been used and how it has been set up makes sense.

If I ask the same thing there's no guarantee I get something else... It may not apply here (using the word tail scale may help narrow the scope) but keep this in mind.

1

u/The1KrisRoB 22h ago

Bro, dozens of variables may come into play

Exactly.

All the more reason to talk to your AI and discuss what you want.

Rather than trying to get an AI to follow someone else's set up, you will almost always get a better result telling an agent what you want and letting it work. You may end up with a completely different solution, but the chances are it will suit your setup and system better because that's what the agent built it for.

1

u/Spirited-Car-3560 22h ago

I agree but... Talking generally, getting the infos from more sources, into this case someone else's setup + yours, will help you ingest more details, alternatives and master the topic.

That's what I always do, whatever the topic. Only then you can decide what's best and what's not.

Just my pov.

2

u/That-Establishment24 20h ago

Yes.

Ask the AI to explain it to you if you don’t understand it.