I’ve been trying to set up a Cursor Cloud agent for 2 days now. Every time the environment gets set up and I go to save the environment, I get a 504 Gateway Timeout. How can I resolve this? Is this a known issue?
Steps to Reproduce
Attempt to set up a Cursor Cloud agent using the Cursor Dashboard. Click the “Start Setup Agent” button, and wait for the environment to finish setting up. Attempt to save the environment.
hey @salehk and @Pk_code, thanks for sticking with this, the 504 on save matches a known backend issue on snapshot-and-save-environment we’re tracking in this thread; if you can drop the x-vercel-id from the failed request and whether you hit Save to Team or Personal team will be able to figure this out, also, check if the issue you got isn’t the one that got fixed in the thread some days ago already, happy to figure his out together
Hi Tom, I got my cloud environments working by setting up an environments.json, Dockerfile and CLOUD.md file setup in my .cursor directory, that seemed to fix the issue and I am able to use Cloud agents reliably.
Leaving this as a note for anyone who comes across this issue. Have an Agent set up these files above in the .cursor directory in the repo. Once you push the changes Cursor should automatically pick it up
@salehk glad it’s working, and thanks for coming back to post the fix - that’s the most reliable setup.
For anyone else hitting the 504 on save (@Pk_code ): the interactive “set up, then save” flow snapshots a live setup machine, and if that machine goes idle before you save, the snapshot step can time out - that’s the 504. Defining the environment declaratively avoids it: commit a .cursor/environment.json that points at a Dockerfile, and the environment builds fresh from that Dockerfile when the agent starts, so there’s no live snapshot to time out. A repo-level .cursor/environment.json also takes priority over saved snapshots.