{"record":{"id":"616f58e11a2417b2","repo":"Dokploy/dokploy","slug":"not-found-616f58","errorCode":"NOT_FOUND","errorMessage":"No servers available, Please subscribe to a plan","messagePattern":"No servers available, Please subscribe to a plan","errorType":"exception","errorClass":"TRPCError","httpStatus":404,"severity":"error","filePath":"apps/dokploy/server/api/routers/project.ts","lineNumber":79,"sourceCode":"\tmariadb,\n\tmongo,\n\tmysql,\n\tpostgres,\n\tprojects,\n\tredis,\n} from \"@/server/db/schema\";\n\nexport const projectRouter = createTRPCRouter({\n\tcreate: protectedProcedure\n\t\t.input(apiCreateProject)\n\t\t.mutation(async ({ ctx, input }) => {\n\t\t\ttry {\n\t\t\t\tawait checkProjectAccess(ctx, \"create\");\n\n\t\t\t\tconst admin = await findUserById(ctx.user.ownerId);\n\n\t\t\t\tif (admin.serversQuantity === 0 && IS_CLOUD) {\n\t\t\t\t\tthrow new TRPCError({\n\t\t\t\t\t\tcode: \"NOT_FOUND\",\n\t\t\t\t\t\tmessage: \"No servers available, Please subscribe to a plan\",\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst project = await createProject(\n\t\t\t\t\tinput,\n\t\t\t\t\tctx.session.activeOrganizationId,\n\t\t\t\t);\n\t\t\t\tawait addNewProject(ctx, project.project.projectId);\n\n\t\t\t\tawait addNewEnvironment(ctx, project?.environment?.environmentId || \"\");\n\n\t\t\t\tawait audit(ctx, {\n\t\t\t\t\taction: \"create\",\n\t\t\t\t\tresourceType: \"project\",\n\t\t\t\t\tresourceId: project.project.projectId,\n\t\t\t\t\tresourceName: project.project.name,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/server/api/routers/project.ts#L61-L97","documentation":"Cloud-only gate in project.create: the account owner's serversQuantity is 0 and IS_CLOUD is true, so there is no server quota to place the project on. Dokploy Cloud requires an active plan with at least one server slot before creating projects.","triggerScenarios":"Calling project.create on Dokploy Cloud when the billing plan has no server allocation (serversQuantity === 0).","commonSituations":"New cloud account before subscribing; plan expired or downgraded to free tier with zero servers.","solutions":["Subscribe to a Dokploy Cloud plan that includes at least one server","If self-hosted, this check is skipped (IS_CLOUD false) — verify your build/flags if it fires unexpectedly","After subscribing, retry project creation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (isCloud) {\n  const admin = await api.user.me.query();\n  if (admin.serversQuantity === 0) throw new Error('Subscribe to a plan first');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["On cloud, verify plan quota before scripting bulk project creation"],"tags":["dokploy","billing","cloud","quota","project"],"backgroundTag":"plan-quota-exceeded","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}