FAQ
1. Cursor connection problem but VSCode can connect
Cursor Since the plugin version synchronization with VSCode is slow, outdated versions may cause connection problems.
Solution: Manually install the Devbox plugin. Install Remote-SSH in the Cursor extension market. Note that the current version should be v0.113.x. (Note that this version must be installed in Cursor. If you download Remote-SSH from the webpage and then import it into Cursor, there is a high probability that the versions do not correspond and lead to incompatibility.)
- Download the vsix file of the Devbox plugin from the VSCode plugin market.
Open the Cursor's extension window.
Drag the downloaded file into the extension window.
- Install Remote-SSH v0.113.x in Cursor.
2. Cursor and VSCode cannot connect
First, understand the principle of the Devbox plugin: add remote environment information by modifying the ssh config file, and connect to the remote environment through the Remote-SSH plugin. The plugin first writes the following line of code in ~/.ssh/config
(some older versions may write other similar content):
Include ~/.ssh/sealos/devbox_config
This line of code imports the contents of the file ~/.ssh/sealos/devbox_config
into the current file. And devbox_config
contains normal SSH configuration content, for example:
Host usw.sailos.io_ns-rqtny6y6_devbox1234
HostName usw.sailos.io
User devbox
Port 40911
IdentityFile ~/.ssh/sealos/usw.sailos.io_ns-rqtny6y6_devbox1234
IdentitiesOnly yes
StrictHostKeyChecking no
So if there is a problem, it is most likely a plugin bug that causes errors in reading and writing files. You can feedback this to us or try to adjust the SSH file yourself.
3. Always stuck in downloading vscode-server or keep retrying
Cause: Due to some operation (such as restarting Devbox during this process), the download cursor is suspended, and re-downloading causes conflicts.
Solution:
- Enter the web terminal and delete the
.cursor-server
folder.- Click "Terminal" in the operation button on the right side of the Devbox webpage list item.
- Enter the terminal and go to the user directory first,
cd ..
, then usels -a
to view all files and you can see.cursor-server
. - Remove
rm -rf .cursor-server
. - Just retry the connection.
- If there is no content in the newly created Devbox, you can directly delete it and rebuild it.
4. Report the following error
upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: 111
First of all, you should understand that your current environment is a development environment. The URL you are connecting to is a test URL, which is only used in the development environment. This URL corresponds to the port of the development environment. In other words, you must run the development environment, such as npm run dev
to run your program first, before you can see the content through the URL, otherwise this error will be reported.
Another possible situation is that you just need to wait for a while, maybe the network is slow.
5. Click the link Cursor and enter the cursor interface, and an error message "Failed to fetch" is reported
Try to open Cursor's extension market. If the extension market cannot be loaded normally and the error Error while fetching extensions.Failed to fetch
is reported, it is a network problem that cannot load Cursor's plug-in market. Please refer to the manual installation tutorial above to manually install the Devbox plug-in or try to change your network environment.
6. The local localhost can open the project but the public network address cannot be opened
The exposed address in the code must be changed from localhost
to 0.0.0.0
due to network reasons.
7. The Program Runs Normally in Devbox, but Fails to Run After Deployment
Before deploying, please ensure you can execute entrypoint.sh
in the terminal (this is the recommended startup script
post-deployment). If public services are required, also check that the public address is accessible.
./entrypoint.sh
If you encounter the following issue:
bash: ./entrypoint.sh: Permission denied
You can run the following command in the terminal to modify the script's permissions, and then attempt to execute the
entrypoint
script again, ensuring the outcome aligns with your expectations.
sudo chmod +x entrypoint.sh
Additionally, it is advisable to build and test the project code in Devbox before deployment. Once testing is successful, you can proceed with the deployment. This can effectively prevent errors and out-of-memory (OOM) issues during the startup phase after deployment.
8. Application Startup Fails When Listening on Port 80
When using Devbox, the default user for local editors (such as VSCode, Cursor, etc.) is devbox
. Ports in the range of
1-100 are restricted to the root user. If you need to use these ports, please run your application with root privileges.
For example, in the Go Devbox, you can execute the following command:
sudo go run main.go
Alternatively, you could change your application's port.
9. How to Change the Default User to Root in Devbox
If you want to connect to Devbox as the root user when opening a local editor, please follow these steps. First, ensure
your Devbox can connect properly using the default configuration. Open the file ~/.ssh/sealos/devbox_config
on your
local machine. If you are uncertain about the file's location, please refer to Question 2.
Locate the configuration that you wish to modify to use the root user, for example:
Host usw.sailos.io_ns-rqtny6y6_devbox1234
HostName usw.sailos.io
User devbox
Port 40911
IdentityFile ~/.ssh/sealos/usw.sailos.io_ns-rqtny6y6_devbox1234
IdentitiesOnly yes
StrictHostKeyChecking no
Change the User
value to root, as follows:
Host usw.sailos.io_ns-rqtny6y6_devbox1234
HostName usw.sailos.io
User root
Port 40911
IdentityFile ~/.ssh/sealos/usw.sailos.io_ns-rqtny6y6_devbox1234
IdentitiesOnly yes
StrictHostKeyChecking no
After saving the changes, exit the local editor connected to Devbox and then reopen the editor. You should now be connected to Devbox as the root user.