deployship
Docs
Project Setup

Project Setup

Creating a Project

  1. Go to your Dashboard and click New Project
  2. Select the server you want to deploy to
  3. Connect your GitHub account and select a repository
  4. Select the branch to deploy (defaults to main)
  5. Set the working directory — the path on your server where the project will live (e.g. /var/www/myapp)
  6. Review the auto-detected deploy strategy and commands (see below)
  7. Optionally add environment variables
  8. Click Deploy to trigger your first deployment

Port Assignment

DeployShip automatically assigns an internal port to each project. You do not need to configure this manually. The assigned port is used by PM2 to run your application and by Caddy to route traffic to it.

Your application must read this port from the PORT environment variable at startup. DeployShip injects PORT automatically — you do not need to add it to your environment variables.

Node.js example:

const port = process.env.PORT || 3000;
app.listen(port);

Python example:

port = int(os.environ.get('PORT', 8000))

If your application does not read PORT from the environment, DeployShip will detect this after deployment and show a warning in the deploy log.


Was this page helpful?