Manage projects and environments
This guide creates a project for a product, adds a staging environment copied from production, and wires staging to its own servers and database. Read Projects, environments and services for the concepts.
Create a project
Section titled “Create a project”- On the Projects dashboard, click + New.
- Enter a name (and optionally a description). The project is created with a
productionenvironment. - Open it and add services with + Create.
curl -X POST https://falak.example.com/api/v1/projects \ -H "Authorization: Bearer $FALAK_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" \ -d '{"name": "Shop", "description": "Storefront and admin"}'Add a staging environment
Section titled “Add a staging environment”- In the canvas top bar, open the environment switcher and choose New environment.
- Name it
stagingand choose Duplicate from: production. - Falak copies every site: configuration, deploy script, Laravel toggles, shared paths and variables, at the same position and with the same service names. Databases are not copied, servers are not assigned, and push-to-deploy is off.
- Create the staging database with the same service name as in production (for example
shop-db). References like${{ shop-db.DATABASE_URL }}now resolve to the staging database. - For each site: Settings → Servers, pick staging servers; Settings → Source, pick the staging branch and turn push-to-deploy on if you want it.
- Deploy.
curl -X POST https://falak.example.com/api/v1/projects/01j…/environments \ -H "Authorization: Bearer $FALAK_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" \ -d '{"name": "staging", "from_environment_id": "01j…"}'The response includes warnings[] for anything that could not be copied. Duplicating needs projects.manage and sites.create.
Move between environments
Section titled “Move between environments”Use the environment switcher in the top bar. The canvas remembers positions per environment. Deep links include the environment slug: /projects/{project}/{environment}.
Rename and delete
Section titled “Rename and delete”- Rename a project or environment in Project settings. Renaming an environment changes its slug.
- Delete an environment when it is empty and not the production environment.
- Delete a project when it is empty and not the Default project.
Delete services first (each service panel → Settings → Danger). Deleting a site removes it from its servers.
Next steps
Section titled “Next steps”Variable referencesHow references resolve per environment.
Projects APIAutomate projects and environments.