Troubleshooting Deployments

This article contains a collection of common pitfalls when deploying your app on Codesphere.

December 14, 2023 2 Min Read
Troubleshooting Deployments
Troubleshooting Deployments

Codesphere

From everyone in the Codesphere Team:)

Table of Contents

Our goal is to make deploying your apps super simple. For many frameworks everything will work straightforward & out of the box, as outlined in our Speedrun: Deploying an app doc. Sometimes you might encounter issues while deploying apps for the first time - we have compiled typical errors and the respective solutions here. If you cannot find a solution to your problem here, feel free to reach out to our support, we'll try to help you as soon as possible!

Issues Solution
Forgot to Deploy To deploy an app in Codesphere, run your app from the Codesphere IDE's terminal just as you would from your local IDE or create and run a CI pipeline. For example, when using Node.js, the command to start your server would typically be something like npm start or npm run start:production.
Incorrect Host or Port Codesphere apps must be deployed to host 0.0.0.0 and port 3000. Many web frameworks will not deploy here by default. For some frameworks we already have docs with more details.
Installed packages are not persistent across restarts Each workspace plan comes with some allocated storage. It is important that it is linked to a specific directory, /home/user/app - everything installed in this or below this directory is persistent. Other directories have limited sizes and get wiped each restart. Not all frameworks install in the current working directory automatically. If yours doesn't, please refer to the official framework documentation and configure the path accordingly.
Permission denied Codesphere does not allow full root access due to security reasons. You can install OS level packages via Nix which will give you a similar experience and flexibility. You can learn more about how to use Nix
Standby when unused / free workspace unable to start on domain visit Your workspace will turn off after 60 minutes of inactivity. It will try to reboot automatically on visiting the domain or opening the IDE. That only works if there is a valid & running CI pipeline defined. If your workspace is stuck in the reboot loop, first check the CI pipeline for run errors.
App requires more than one port, i.e. server and frontend While opening multiple ports is nice when testing stuff on localhost, it is not a valid approach for internet facing domains - these are always required to be served on a single port. When working with such setup, it makes sense to configure the different parts to be served by different workspaces and domains (i.e. backend.yourdomain.com).
GitHub Repositories no longer visible in the create workspace modal For security reasons GitHub periodically invalidates access tokens. When this happens you might have to re-grant access to your repositories.

We will continue to add common problems here, if you think something is missing, feel free to reach out to our support via email or on our discord.

About the Author

Troubleshooting Deployments

Codesphere

From everyone in the Codesphere Team:)

We are building the next generation of Cloud, combining Infrastructure and IDE in one place, enabling a seamless DevEx and eliminating the need for DevOps specialists.

More Posts

Monitoring & Alerting

Monitoring & Alerting

Learn how to access Codesphere's built in resource monitoring and check the uptime of your applications.

Path based routing

Path based routing

Learn how to connect multiple independent applications to a single domain by associating different paths with distinct workspaces

Staging Environments

Staging Environments

Learn how to use Codesphere's Domains to improve your release process.