Introduction
The Serverpod Cloud CLI provides all you need to create, manage and deploy your Serverpod projects.
Run the following to install the CLI:
dart pub global activate serverpod_cloud_cli
If you haven't created a Serverpod project yet, visit the get started guide in the Serverpod framework docs on how to do that.
Once you have a Serverpod project, go the server directory (e.g ./myproject/myproject_server
) and run the following command:
scloud project create <project-name> --enable-db
If you created a Serverpod Mini project, which doesn't need a database, then pass the --no-enable-db
flag instead.
Creating the cloud project from the server directory automatically links the project, which means that all subsequent commands run from this directory will target the linked project by default. Projects can also be linked manually with the scloud project link
command.
If the project requires any environment variables or secrets, they can be added with the env
and secret
commands. Once the project is ready to be deployed, run the following command:
scloud deploy
To follow the progress of the deployment, use the status deploy
command:
scloud status deploy
That's it, you have now deployed your Serverpod app! 🚀
For more information on the different commands, see the commands section in the side menu. For instance, to view the service's domains or to add your own custom domains, see the domain
command.