# Ployter documentation Source: https://ployter.com/en/docs/ # Introduction > What Ployter is, how it works with your cloud, and the concepts you see across the panel. Ployter is a deploy panel that runs on **your** infrastructure. You connect your AWS or DigitalOcean account (or add a server you already have), and the panel creates the machines, ships your applications from GitHub or Docker images, and takes care of domains, HTTPS, backups, logs and metrics. The machines, databases and buckets live in your account and are billed by your provider. ## How it works Ployter has three parts: - **Your cloud**: the AWS or DigitalOcean account you connect. The panel creates servers, networks, firewalls, managed databases, caches and buckets in it. On AWS and DigitalOcean it also creates load balancers, so a service can run on several servers. - **The agent**: a container installed on each server. It receives the panel's commands (build, deploy, restart, terminal, files, backups) and sends metrics and logs. The agent connects outward, to the panel API: you don't need to open any port for it. - **The panel**: where you and your team organize projects, run deploys and keep track of everything. There is also an [API with tokens](https://ployter.com/en/docs/team/security/) and a [CLI](https://ployter.com/en/docs/cli/cli/). On each server, services run in Docker containers. The build comes from the repository's `Dockerfile` or, without one, from Railpack's automatic detection (Node, PHP, Python and others). See [Build: Dockerfile, Railpack and image](https://ployter.com/en/docs/services/builds/). > [!NOTE] > The panel never holds your machines: it holds access to them. If you remove an integration, whatever was already created stays in your account. ## Concepts ### Team Everything in the panel belongs to a team: projects, servers, integrations and members. Your team is created along with your account, and you can invite people with different roles (owner, admin, developer, viewer). See [Teams, members and roles](https://ployter.com/en/docs/team/members/). ### Integration Access to an external account: - **Cloud providers**: [AWS](https://ployter.com/en/docs/integrations/aws/) and [DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/), where the panel creates servers and resources. - **[GitHub](https://ployter.com/en/docs/integrations/github/)**, **[GitLab](https://ployter.com/en/docs/integrations/gitlab/)** and **[Bitbucket](https://ployter.com/en/docs/integrations/bitbucket/)**: access to clone private repositories and turn on deploy on every push. - **[Cloudflare](https://ployter.com/en/docs/integrations/cloudflare/)**: so the panel can point your domains' DNS when you tell it to. ### Server A machine where services run. The panel can create it in your cloud, or it can be a [machine of your own](https://ployter.com/en/docs/integrations/own-server/) (VPS, droplet, EC2) where you run an install command. See [Servers](https://ployter.com/en/docs/servers/servers/). ### Project Groups the services of one system, for example the store: the front end, the API, the worker and the database. Services in a project reach each other by name on an internal network. See [Projects and services](https://ployter.com/en/docs/services/projects-and-services/). ### Service An application that runs in a container on a server. The source can be a GitHub repository, a Docker image (MySQL, Redis, n8n...) or a ready-made template. Each service has deploys, variables, domains, volumes, logs and metrics. ### Managed resource A database, cache or bucket created by the cloud's managed service instead of in a container: RDS, Aurora, ElastiCache and S3 on AWS; managed databases and Spaces on DigitalOcean. See [Managed cloud databases](https://ployter.com/en/docs/databases/managed/) and [Buckets](https://ployter.com/en/docs/databases/buckets/). ![Panel overview with projects and servers](https://ployter.com/assets/docs/en/intro-home.webp) ## Which cloud to use All three clouds work for servers, network and firewall. Managed databases, cache and buckets, replicas and autoscaling exist on AWS and DigitalOcean: | | AWS | DigitalOcean | Hetzner | |---|---|---|---| | Servers, networks and firewall | Yes | Yes | Yes | | Managed databases, cache and buckets | Yes | Yes | No: the database runs as a service | | Load balancer, replicas and autoscaling | Yes | Yes: one load balancer per service with replicas | No: each service runs on a single server | | Connection | CloudFormation link (role) or IAM key | OAuth or API token | Project token | Vultr and Linode (Akamai) work like Hetzner: servers, network and firewall, connected with a token, with no managed database or load balancer. Your own server works like Hetzner: one server per service, and the machine's firewall is up to you. ## Next steps - Follow the [First deploy](https://ployter.com/en/docs/getting-started/quickstart/), from sign-up to a live app with a domain. - Connect [AWS](https://ployter.com/en/docs/integrations/aws/), [DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/), [Hetzner](https://ployter.com/en/docs/integrations/hetzner/), [Vultr](https://ployter.com/en/docs/integrations/vultr/) or [Linode](https://ployter.com/en/docs/integrations/linode/), or [use your own server](https://ployter.com/en/docs/integrations/own-server/). --- # First deploy > From sign-up to a live app with a domain and HTTPS, step by step. This guide takes you from sign-up to a GitHub application running on a server in your cloud, with a domain and HTTPS. The example uses an AWS account, the project **loja** and the service **web** (Next.js, from the repository `github.com/acme/loja`). With DigitalOcean or your own server, the path is the same; only step 2 changes. Prefer to be guided? Open **Home → Get started**. The screen lists the steps of this guide in order, checks off on its own what you've already done and opens each step right there: connect the cloud, create the server, connect GitHub, create the service and follow the first deploy. Until your first app is live, the **Overview** shows a shortcut to it. ![Get started screen with the five steps](https://ployter.com/assets/docs/en/get-started.webp) ## 1. Create your account 1. Open the sign-up screen and fill in your name, email and password. Click **Create account**. 2. Open the confirmation email and click the link. 3. Sign in to the panel with your email and password. Your team is created along with your account, and you are its owner. Later you can invite other people in **Team → Members** (see [Teams, members and roles](https://ployter.com/en/docs/team/members/)). > [!NOTE] > If sign-up shows **Sign-up closed**, new accounts join by invitation only. Ask whoever manages the team for an invitation. ## 2. Connect your cloud Open **Integrations → Cloud providers** and click **Connect AWS**, or **Other clouds** for DigitalOcean, Hetzner, Vultr and Linode. It takes about a minute: - AWS: you open a link that creates a stack in your account's CloudFormation and paste the `RoleArn` back into the panel. See [Connect AWS](https://ployter.com/en/docs/integrations/aws/). - DigitalOcean: you generate an API token and paste it into the panel. See [Connect DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/). - Hetzner, Vultr and Linode: you paste a token (or API key) from the account. See [Hetzner](https://ployter.com/en/docs/integrations/hetzner/), [Vultr](https://ployter.com/en/docs/integrations/vultr/) and [Linode](https://ployter.com/en/docs/integrations/linode/). Prefer a machine you already have? Skip this step and see [Use your own server](https://ployter.com/en/docs/integrations/own-server/). ## 3. Create a server 1. Open **Servers** and click **New server**. 2. In **Where to create**, pick the connected account (for example, **AWS Produção**). 3. Enter a **Name**, such as `app-1`. 4. Pick the **Region** (for example, São Paulo, `sa-east-1`) and the **Machine size** (for example, `t3.small`). 5. In **Network**, keep the **Panel automatic network**. It is created with the first server in each region. 6. Turn on **Static IP** if the server will have domains: the IP doesn't change if the machine is stopped and started. 7. Click **Create server**. The machine is created and the agent installs itself. Within 1 to 3 minutes the server shows as **Online**. See [Servers](https://ployter.com/en/docs/servers/servers/) for details. ![New server form on AWS](https://ployter.com/assets/docs/en/quickstart-new-server.webp) ## 4. Connect GitHub (private repository) A public repository works without a connection. For a private repository, or to turn on deploy on every push, connect GitHub: 1. Open **Integrations → GitHub** and click **Connect GitHub**. 2. In GitHub, pick the account or organization and the repositories, and click **Install & Authorize**. 3. You come back to the panel with the connection ready (for example, **GitHub acme**). Prefer a personal token? The step-by-step guide is in [Connect GitHub](https://ployter.com/en/docs/integrations/github/). Is your code on GitLab or Bitbucket? See [Connect GitLab](https://ployter.com/en/docs/integrations/gitlab/) or [Connect Bitbucket](https://ployter.com/en/docs/integrations/bitbucket/). ## 5. Create the project 1. Open **Projects** and click **New project**. 2. In **Name**, type `loja`. The **Identifier** comes from the name if you leave it blank. It goes into the container and network names, and it can't change later. 3. Click **Create project**. ## 6. Create the service and deploy 1. In the project, click **New service**. 2. In **What will run**, pick **Git repository**. 3. Set the **Name** to `web` and pick the **Server** `app-1`. 4. In **Repository**, pick `acme/loja` from the list (or use **Paste a public repository URL**). Pick the **Branch**. 5. If you pasted the URL of a private repository, pick the connection under **Credential**. When you pick from the list, it comes along. 6. In **Port**, enter the port your application listens on, for example `3000`. It is required for domains and the health check. 7. Keep **Run the first deploy now** checked and click **Create service**. ![New service from GitHub](https://ployter.com/assets/docs/en/quickstart-new-service.webp) The deploy shows up in the service's **Deploys** tab, with the build log in real time. Without a `Dockerfile` in the repository, Railpack detects the language and builds the image by itself. See [Build: Dockerfile, Railpack and image](https://ployter.com/en/docs/services/builds/) and [Deploys, rollback and release command](https://ployter.com/en/docs/services/deployments/). Need environment variables? Add them in the **Variables** tab before the deploy, or add them afterward and deploy again. See [Variables and shared variables](https://ployter.com/en/docs/services/variables/). ## 7. Add the domain 1. In the service, open the **Network** tab. 2. Type the domain, for example `loja.com.br`, and click **Add**. Keep the option to issue the HTTPS certificate on the server (Let's Encrypt) checked. 3. Point the domain's DNS to the server: - **With Cloudflare connected**: the domain gets a **Point here** button. Click it, review and confirm with **Point**. See [Connect Cloudflare](https://ployter.com/en/docs/integrations/cloudflare/). - **With another DNS provider**: create an **A** record with the domain name pointing to the server's public IP. The IP appears on the server screen. 4. Run a deploy: a new domain takes effect from the next deploy. Once DNS points to it, the server requests the certificate from Let's Encrypt and renews it by itself. The **HTTPS active** badge appears next to the domain. > [!TIP] > Want to test before touching DNS? Click **Generate automatic domain**. The panel creates a `.ployter.app` address that already points to the server. More details in [Domains and HTTPS](https://ployter.com/en/docs/networking/domains/). ## Next steps - Add a database: **New service → MySQL** creates a container with a volume and a generated password. For production, see [Managed cloud databases](https://ployter.com/en/docs/databases/managed/). - Turn on scheduled backups in [Backups and restore](https://ployter.com/en/docs/databases/backups/). - Keep track of [Logs, metrics and requests](https://ployter.com/en/docs/observability/monitoring/). --- # Connect AWS > How to give the panel access to your AWS account, through the CloudFormation link or an IAM key, and how to remove that access. To create servers, networks, databases, buckets and load balancers in your AWS account, the panel needs access to it. There are two ways: **via link** (recommended), which creates an IAM role in your account with one click in CloudFormation, or **with an access key** from an IAM user. Everything the panel creates stays in your account and is billed by AWS. ## Before you start - In the panel, you need the **Manage providers** permission. By default, only the team owner has it. - In AWS, sign in with a user that can create CloudFormation stacks and IAM resources (roles and policies). An account administrator works. - Pick the right account: if you serve clients, you can connect each client's AWS account. Each connection shows up as a separate provider. ## Which method to use | | Via link (recommended) | Access key | |---|---|---| | What the panel keeps | A role ARN and a connection identifier (ExternalId) | An IAM user's Access key ID and Secret access key | | Key that can leak | None | Yes: it's a permanent key | | Who can use the role | Only the platform's account, and only with this connection's ExternalId | Anyone who has the key | | Connection pooling (RDS Proxy) | Yes | No | | How to remove | Delete the stack in CloudFormation | Deactivate the key in IAM | ## Connect via link (recommended) The link opens the AWS console straight on the CloudFormation stack creation screen, with the template and parameters filled in. You just confirm, and the panel connects on its own when the stack finishes. 1. In the panel, open **Integrations → Cloud providers** and click **Connect AWS**. 2. Keep the **Via link (recommended)** tab selected. 3. Fill in the **Name** (for example, `AWS Produção`) and pick the **Default region**. 4. Click **Open AWS**. A new tab opens the AWS console on **CloudFormation → Quick create stack**. If it asks you to sign in, use the account you're connecting. 5. In AWS, check the region in the top-right corner, scroll to the bottom of the page and check the box that starts with *"I acknowledge that AWS CloudFormation might create IAM resources"*. 6. Click **Create stack**. 7. Go back to the panel and keep the modal open. It shows *Waiting for the stack to finish on AWS*. 8. In 1 to 2 minutes the stack reaches **CREATE_COMPLETE** and notifies the panel. The panel checks the access, the modal closes on its own and the provider shows up in the list with the account number. You don't need to copy anything. To check, the panel assumes the role and tests the EC2 permission, without creating anything. If you close the modal earlier, the connection is still created: reload the page after a few minutes. ![Connect AWS modal waiting for the stack to finish](https://ployter.com/assets/docs/en/aws-auto-waiting.webp) ### If the panel doesn't connect on its own The stack's notice may not arrive, for example when the account blocks Lambda functions. In that case, connect by pasting the RoleArn: 1. In the modal, click **Didn't connect? Paste the RoleArn**. If the panel already tried and failed, the field shows up on its own, with the reason. 2. In AWS, open the stack's **Outputs** tab and copy the **RoleArn** value. It has this format: `arn:aws:iam::123456789012:role/infra/...`. 3. Paste the value into the **Paste the RoleArn** field and click **Connect**. ![Connect AWS modal on the Via link tab](https://ployter.com/assets/docs/en/aws-connect-modal.webp) > [!WARNING] > The link is valid for 24 hours and works for a single connection. If you click **Open again**, the panel generates a new link with a different identifier. In that case, create the stack from the **most recent** link. A stack from an older link doesn't connect, and its RoleArn doesn't work with the new link. ### Default region The default region is the one preselected when you create a server or a database in this account. You can create in any of the available regions, not just the default one: | Region | Code | |---|---| | N. Virginia | `us-east-1` | | Ohio | `us-east-2` | | Oregon | `us-west-2` | | São Paulo | `sa-east-1` | | Ireland | `eu-west-1` | | Frankfurt | `eu-central-1` | The link opens CloudFormation in the chosen default region. The role belongs to IAM, which is global: it works in every region, no matter where the stack was created. ### What the stack creates The stack creates only IAM resources. No machine is created at this point and the stack costs nothing. - **Panel role** (path `/infra/`): the role the panel uses. Only the platform's AWS account can assume it, and only with the ExternalId generated for your connection. Without that identifier, not even someone who finds out the ARN can use it. Each session lasts at most 1 hour. - **Notice function** (`InfraNotifyFunction`, Lambda): runs once when the stack finishes and sends the panel the role ARN and the connection identifier. It has no access to anything in the account besides its own logs. It reports success to CloudFormation even if the panel doesn't answer, so the stack never gets stuck because of it. - **RDS Proxy role** (`infra-rds-proxy-...`): used by the connection pools the panel creates. It can only read the `infra-*` secrets in Secrets Manager. - **Bucket permissions boundary** (`infra-bucket-boundary-...`): the permissions limit for the IAM users the panel creates to hand out each bucket's key. These users never get more than S3 access to the `infra-*` buckets, even if their own policy is broader. The role's permissions cover only what the panel does: | Group | What it allows | |---|---| | EC2 | Create and destroy instances, security groups and static IPs (Elastic IP), and tag them | | Network | Create and remove VPCs, subnets, Internet Gateways and route tables | | Databases and cache | Create, modify, reboot and remove RDS instances, Aurora clusters and ElastiCache groups, with snapshots, parameter groups, replicas and logs | | Connection pools | Create and modify RDS Proxy and its `infra-*` secrets | | Buckets | Create, configure and empty `infra-*` buckets in S3, and the `/infra/` IAM users for bucket keys | | Load balancers and certificates | Create and modify Application Load Balancers and request certificates in ACM | | Read | The Ubuntu image published by Canonical (SSM), CloudWatch metrics | ### What the panel creates later in your account As you use it, the panel creates the following in your account, always with the panel's names and tags: - **Servers**: an EC2 instance with Ubuntu 24.04, a gp3 disk, IMDSv2 required and its own security group (ports 80 and 443 open; 22 only if you provide an SSH key pair). With **Static IP**, also an Elastic IP. See [Servers](https://ployter.com/en/docs/servers/servers/). - **Network**: one VPC per region (`10.80.0.0/16`), with 2 public subnets, 2 private ones, an Internet Gateway and two security groups. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). - **Managed resources**: RDS and Aurora databases, ElastiCache, S3 buckets and RDS Proxy pools, when you create them. See [Managed cloud databases](https://ployter.com/en/docs/databases/managed/). - **Load balancer**: one Application Load Balancer per project, when a service with a domain gets replicas. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ## Connect with an access key Use this method if your organization doesn't allow creating CloudFormation stacks. The panel stores the key encrypted, but it's still a permanent key: prefer the link whenever you can. ### 1. Create the panel policy 1. In the AWS console, open **IAM → Policies** and click **Create policy**. 2. Switch the editor to **JSON** and paste the contents of `infra-iam-policy.json`, further down this page. 3. Click **Next**, name it `infra-iam-policy` and click **Create policy**. ### 2. Create the bucket permissions boundary You only need this if you'll create buckets. The panel looks for a policy whose name starts with `infra-bucket-boundary`. 1. In **IAM → Policies**, click **Create policy** again. 2. In the **JSON** editor, paste: ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": [ "arn:aws:s3:::infra-*", "arn:aws:s3:::infra-*/*" ] } ] } ``` 3. Name it `infra-bucket-boundary` and click **Create policy**. ### 3. Create the user and key 1. Open **IAM → Users** and click **Create user**. Give it a name, such as `ployter-painel`. Don't check console access. 2. In **Set permissions**, pick **Attach policies directly**, check `infra-iam-policy` and finish creating the user. 3. Open the user, go to **Security credentials** and click **Create access key**. 4. Pick the **Third-party service** use case and finish. 5. Copy the **Access key ID** and the **Secret access key**. The secret is shown only once. ### 4. Paste the key into the panel 1. Open **Integrations → Cloud providers** and click **Connect AWS**. 2. Open the **Access key** tab. 3. Fill in **Name** and **Default region**. 4. Paste the **Access key ID** (starts with `AKIA`) and the **Secret access key**. 5. Click **Connect**. ![Connect AWS modal on the Access key tab](https://ployter.com/assets/docs/en/aws-connect-keys.webp) > [!NOTE] > With a key connection, database connection pooling (RDS Proxy) doesn't work: it depends on the role that only the link's stack creates. ### Contents of infra-iam-policy.json This policy has the same permissions as the link's role, minus the connection pool ones: ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "InfraEc2", "Effect": "Allow", "Action": [ "ec2:RunInstances", "ec2:TerminateInstances", "ec2:DescribeInstances", "ec2:CreateSecurityGroup", "ec2:DeleteSecurityGroup", "ec2:DescribeSecurityGroups", "ec2:AuthorizeSecurityGroupIngress", "ec2:AllocateAddress", "ec2:AssociateAddress", "ec2:DisassociateAddress", "ec2:ReleaseAddress", "ec2:DescribeAddresses", "ec2:CreateTags", "ec2:RevokeSecurityGroupIngress" ], "Resource": "*" }, { "Sid": "InfraNetwork", "Effect": "Allow", "Action": [ "ec2:CreateVpc", "ec2:DeleteVpc", "ec2:DescribeVpcs", "ec2:ModifyVpcAttribute", "ec2:CreateSubnet", "ec2:DeleteSubnet", "ec2:DescribeSubnets", "ec2:ModifySubnetAttribute", "ec2:DescribeAvailabilityZones", "ec2:CreateInternetGateway", "ec2:DeleteInternetGateway", "ec2:AttachInternetGateway", "ec2:DetachInternetGateway", "ec2:DescribeInternetGateways", "ec2:CreateRouteTable", "ec2:DeleteRouteTable", "ec2:DescribeRouteTables", "ec2:CreateRoute", "ec2:AssociateRouteTable", "ec2:DisassociateRouteTable" ], "Resource": "*" }, { "Sid": "InfraManagedDatabases", "Effect": "Allow", "Action": [ "rds:CreateDBInstance", "rds:DeleteDBInstance", "rds:DescribeDBInstances", "rds:ModifyDBInstance", "rds:CreateDBSubnetGroup", "rds:DeleteDBSubnetGroup", "rds:DescribeDBSubnetGroups", "rds:AddTagsToResource", "rds:ListTagsForResource", "rds:CreateDBSnapshot", "rds:DeleteDBSnapshot", "rds:DescribeDBSnapshots", "rds:RestoreDBInstanceFromDBSnapshot", "rds:CreateDBParameterGroup", "rds:DeleteDBParameterGroup", "rds:ModifyDBParameterGroup", "rds:ResetDBParameterGroup", "rds:DescribeDBParameterGroups", "rds:DescribeDBParameters", "rds:DescribeEngineDefaultParameters", "rds:RebootDBInstance", "rds:CopyDBParameterGroup", "rds:CreateDBInstanceReadReplica", "rds:PromoteReadReplica", "rds:FailoverDBCluster", "rds:DescribeDBLogFiles", "rds:DownloadDBLogFilePortion", "rds:CreateDBCluster", "rds:DeleteDBCluster", "rds:DescribeDBClusters", "rds:ModifyDBCluster", "rds:RestoreDBClusterFromSnapshot", "rds:CreateDBClusterSnapshot", "rds:DeleteDBClusterSnapshot", "rds:DescribeDBClusterSnapshots", "rds:CreateDBClusterParameterGroup", "rds:DeleteDBClusterParameterGroup", "rds:ModifyDBClusterParameterGroup", "rds:ResetDBClusterParameterGroup", "rds:DescribeDBClusterParameterGroups", "rds:DescribeDBClusterParameters", "rds:DescribeEngineDefaultClusterParameters", "rds:DescribeDBEngineVersions", "rds:DescribePendingMaintenanceActions", "rds:ApplyPendingMaintenanceAction", "elasticache:CreateReplicationGroup", "elasticache:DeleteReplicationGroup", "elasticache:DescribeReplicationGroups", "elasticache:ModifyReplicationGroup", "elasticache:CreateCacheSubnetGroup", "elasticache:DeleteCacheSubnetGroup", "elasticache:DescribeCacheSubnetGroups", "elasticache:DescribeCacheClusters", "elasticache:AddTagsToResource", "elasticache:CreateSnapshot", "elasticache:DeleteSnapshot", "elasticache:DescribeSnapshots", "elasticache:CreateCacheParameterGroup", "elasticache:DeleteCacheParameterGroup", "elasticache:ModifyCacheParameterGroup", "elasticache:ResetCacheParameterGroup", "elasticache:DescribeCacheParameterGroups", "elasticache:DescribeCacheParameters", "elasticache:DescribeEngineDefaultParameters" ], "Resource": "*" }, { "Sid": "InfraServiceLinkedRoles", "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "*", "Condition": { "StringEquals": { "iam:AWSServiceName": [ "rds.amazonaws.com", "elasticache.amazonaws.com", "elasticloadbalancing.amazonaws.com" ] } } }, { "Sid": "InfraEncryptionDefaultKeys", "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:CreateGrant" ], "Resource": "*", "Condition": { "StringLike": { "kms:ViaService": [ "rds.*.amazonaws.com", "elasticache.*.amazonaws.com" ] } } }, { "Sid": "InfraUbuntuImage", "Effect": "Allow", "Action": "ssm:GetParameter", "Resource": "arn:aws:ssm:*::parameter/aws/service/canonical/*" }, { "Sid": "InfraMetrics", "Effect": "Allow", "Action": "cloudwatch:GetMetricData", "Resource": "*" }, { "Sid": "InfraBuckets", "Effect": "Allow", "Action": [ "s3:CreateBucket", "s3:DeleteBucket", "s3:ListBucket", "s3:ListBucketVersions", "s3:PutBucketTagging", "s3:PutBucketVersioning", "s3:PutBucketCORS", "s3:GetLifecycleConfiguration", "s3:PutLifecycleConfiguration", "s3:PutBucketPolicy", "s3:DeleteBucketPolicy", "s3:PutBucketPublicAccessBlock", "s3:DeleteObject", "s3:DeleteObjectVersion" ], "Resource": [ "arn:aws:s3:::infra-*", "arn:aws:s3:::infra-*/*" ] }, { "Sid": "InfraBucketUsersCreate", "Effect": "Allow", "Action": [ "iam:CreateUser", "iam:PutUserPolicy" ], "Resource": "arn:aws:iam::*:user/infra/*", "Condition": { "StringLike": { "iam:PermissionsBoundary": "arn:aws:iam::*:policy/*infra-bucket-boundary*" } } }, { "Sid": "InfraBucketUsersManage", "Effect": "Allow", "Action": [ "iam:GetUser", "iam:TagUser", "iam:DeleteUser", "iam:DeleteUserPolicy", "iam:CreateAccessKey", "iam:DeleteAccessKey", "iam:ListAccessKeys" ], "Resource": "arn:aws:iam::*:user/infra/*" }, { "Sid": "InfraFindBoundary", "Effect": "Allow", "Action": "iam:ListPolicies", "Resource": "*" }, { "Sid": "InfraLoadBalancers", "Effect": "Allow", "Action": [ "elasticloadbalancing:CreateLoadBalancer", "elasticloadbalancing:DeleteLoadBalancer", "elasticloadbalancing:DescribeLoadBalancers", "elasticloadbalancing:CreateListener", "elasticloadbalancing:DeleteListener", "elasticloadbalancing:ModifyListener", "elasticloadbalancing:DescribeListeners", "elasticloadbalancing:AddListenerCertificates", "elasticloadbalancing:RemoveListenerCertificates", "elasticloadbalancing:DescribeListenerCertificates", "elasticloadbalancing:CreateRule", "elasticloadbalancing:DeleteRule", "elasticloadbalancing:ModifyRule", "elasticloadbalancing:DescribeRules", "elasticloadbalancing:CreateTargetGroup", "elasticloadbalancing:DeleteTargetGroup", "elasticloadbalancing:ModifyTargetGroup", "elasticloadbalancing:ModifyTargetGroupAttributes", "elasticloadbalancing:DescribeTargetGroups", "elasticloadbalancing:RegisterTargets", "elasticloadbalancing:DeregisterTargets", "elasticloadbalancing:DescribeTargetHealth", "elasticloadbalancing:AddTags", "ec2:DescribeSubnets", "ec2:DescribeVpcs", "ec2:DescribeInternetGateways", "ec2:DescribeAccountAttributes" ], "Resource": "*" }, { "Sid": "InfraCertificates", "Effect": "Allow", "Action": [ "acm:RequestCertificate", "acm:DescribeCertificate", "acm:DeleteCertificate", "acm:AddTagsToCertificate" ], "Resource": "*" } ] } ``` ## After connecting The account shows up as a card in **Integrations → Cloud providers**, with: - **Account**: the AWS account number. - **Access**: **Role (link)** in green, or **Key AKIA...** in yellow, as a reminder that a permanent key exists. - **Default region** and the number of **Servers**. - **Networks**: the VPCs the panel created or started using. The network is created automatically with the first server in each region. ![Connected AWS provider card](https://ployter.com/assets/docs/en/aws-provider-card.webp) In the card's **⋮** menu: - **Edit**: changes the name and default region. - **Change access**: replaces the credential without losing the servers. Use it to move from a key to the link, or to recreate the stack. - **Remove**: removes the provider from the panel (see below). If you have another team with integrations and you own both, the **Import from another team** button copies the provider without redoing the connection. ## Update permissions When the panel gains a new feature, the role may need new permissions. In that case, an operation fails with a message like *"The credential doesn't have permission for this operation. If the account was connected via link, update the stack with the new template"*. To update a link connection: 1. On the provider card, open **⋮ → Change access**. 2. On the **Via link (recommended)** tab, click **Open AWS** and create the new stack, with the current template. 3. Go back to the panel and wait: when the new stack finishes, the access is replaced on its own. If it isn't, paste the new RoleArn and click **Change access**. 4. In CloudFormation, delete the old stack. For a key connection, edit the `infra-iam-policy` policy in IAM and paste the updated contents from this page. ## Remove access 1. First delete the servers in this account. If there are servers, the panel warns: *"There are N server(s) in this account. Delete the servers first."* 2. Remove the networks from the card (trash icon next to each network). A network can only be removed when it has no servers, managed databases or load balancer in it. 3. Open **⋮ → Remove** and confirm. The panel forgets the access to the account. 4. In AWS, actually revoke the access: - **Via link**: open **CloudFormation → Stacks**, select the panel's access stack (its name has `-access-` followed by six characters) and click **Delete**. The role and policies go with it. - **With a key**: open **IAM → Users**, pick the user, go to **Security credentials** and deactivate (**Deactivate**) or delete the key. > [!WARNING] > Don't delete the stack before removing the servers and resources through the panel. Without the role, the panel loses access, and what it created stays in your account, billing, until you delete it by hand. ## Common problems | Message | What to do | |---|---| | *The stack reported back, but the access was not accepted* | The role wasn't valid yet or the stack was changed. Paste the RoleArn from the **Outputs** tab into the field that shows up. If it keeps failing, delete the stack and connect again. | | *The panel is already connecting this account on its own* | The stack already reported back and the panel is checking the access. Wait a few seconds. | | *AWS refused to assume the role: check the pasted ARN and whether the stack finished creating* | Wait for the **CREATE_COMPLETE** status and check that the RoleArn comes from the stack created by the most recent link. | | *Connection link expired or already used* | The link is older than 24 hours or was already used. Click **Open again** and create a new stack. | | *Invalid Access Key ID* or *Incorrect Secret Access Key* | Check the copied key. The secret is shown only once: if you lost it, create another key in IAM. | | *The credential doesn't have permission for this operation* | Update the permissions, as in the **Update permissions** section above. | | *The account reached the region's VPC limit* | AWS allows 5 VPCs per region by default. Use an existing VPC or request an increase in **Service Quotas**. | --- # Connect DigitalOcean > How to connect DigitalOcean in one click (OAuth) or with an API token, which scopes the token needs and what differs from AWS. With DigitalOcean connected, the panel creates droplets, networks (VPC), firewalls, managed databases and Spaces buckets in your account. You connect with the **Connect with DigitalOcean** button, which authorizes the panel without creating a token, or with a personal API token. The access is stored encrypted in the panel. Everything the panel creates is billed by DigitalOcean. ## Before you start - In the panel, you need the **Manage providers** permission. By default, only the team owner has it. - In DigitalOcean, switch to the team where the resources will be created. The token works for the team it was generated in. ## Limits compared to AWS > [!NOTE] > On DigitalOcean, replicas, load balancer and autoscaling work like on AWS, with one difference: each service with replicas has its own load balancer, with a fixed IP, and the HTTPS certificate is issued by the panel (Let's Encrypt). Databases, cache and buckets work normally. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). | | DigitalOcean | AWS | |---|---|---| | Servers, network and firewall | Yes | Yes | | Managed databases and cache | Yes | Yes | | Buckets | Spaces | S3 | | Load balancer, replicas and autoscaling | Yes, one load balancer per service with replicas | Yes, one load balancer per project | | Server disk | Comes with the droplet size | You choose it in GB | ## Connect with DigitalOcean (recommended) 1. Open **Integrations → Cloud providers** and click **Other clouds → DigitalOcean**. 2. Keep the **Connect with DigitalOcean (recommended)** tab selected. 3. Fill in the **Name** (for example, `DigitalOcean Production`) and pick the **Default region**. 4. Click **Connect with DigitalOcean**. The page goes to DigitalOcean; sign in if asked. 5. Pick the team where the resources will be created and click **Authorize Application**. 6. DigitalOcean sends you back to the panel, which checks the access and shows the provider in the list with the **OAuth** badge and the team name. The OAuth access lasts 30 days and the panel renews it on its own before it expires. It shows up on DigitalOcean under **Settings → Applications & API → Authorized Applications**, where you can revoke it. ![Connect DigitalOcean modal on the OAuth tab](https://ployter.com/assets/docs/en/do-oauth-modal.webp) > [!NOTE] > The button only shows up when DigitalOcean OAuth is configured in the panel. Without it, use the token, as in the steps below. ## Or connect with a token ## 1. Generate the token 1. In the DigitalOcean dashboard, open **API → Tokens** (direct link: https://cloud.digitalocean.com/account/api/tokens). 2. Click **Generate New Token**. 3. Give it a name, for example `infra-painel`. 4. In **Expiration**, pick **No expiry**. With an expiration date, the panel loses access when the token expires. 5. In **Scopes**, pick **Full Access**. 6. Click **Generate Token** and copy the token. It starts with `dop_v1_` and is shown only once. ### Custom scopes If you'd rather not grant full access, pick **Custom Scopes** and check exactly: | Scope | Permissions | |---|---| | `account` | read | | `droplet` | create, read, update, delete | | `firewall` | create, read, update, delete | | `vpc` | create, read, update, delete | | `reserved_ip` | create, read, update, delete | | `tag` | create, read, update, delete | | `database` | create, read, update, delete | | `spaces_key` | create, read, update, delete | | `load_balancer` | create, read, update, delete | | `certificate` | create, read, delete | | `database:view_credentials` | to read the database password | | `ssh_key` | read | > [!TIP] > Missing a scope? The operation that needs it fails with a DigitalOcean message. Generate a new token with the scope and use **Change token** on the provider card. ## 2. Paste the token into the panel 1. Open **Integrations → Cloud providers** and click **Other clouds → DigitalOcean**. 2. Fill in the **Name** (for example, `DigitalOcean Produção`). 3. Pick the **Default region**. It's the one preselected when you create servers and databases; you can use others later. 4. Paste the token into the **Paste the token** step field. 5. Click **Connect**. The panel tests the token against the DigitalOcean API before saving. If it's rejected, you see *"Credential rejected"* with the reason. ![Connect DigitalOcean modal](https://ployter.com/assets/docs/en/do-connect-modal.webp) ### Available regions | Region | Code | |---|---| | New York 1 | `nyc1` | | New York 3 | `nyc3` | | San Francisco | `sfo3` | | Toronto | `tor1` | | Atlanta | `atl1` | | Amsterdam | `ams3` | | London | `lon1` | | Frankfurt | `fra1` | | Singapore | `sgp1` | | Bangalore | `blr1` | | Sydney | `syd1` | ## What the panel creates in your account - **Server**: an Ubuntu 24.04 droplet with its own firewall, attached to the droplet by tag. The firewall opens 80 and 443; 22 only if you provide an SSH key when creating it. With **Static IP**, also a Reserved IP. See [Servers](https://ployter.com/en/docs/servers/servers/). - **Network**: one VPC per region and a network firewall that lets servers on the same network talk to each other. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). - **Databases and cache**: managed clusters inside the VPC, accepting only the network's servers. See [Managed cloud databases](https://ployter.com/en/docs/databases/managed/). - **Buckets**: a Spaces bucket with its own key, with access only to it. To create, configure and delete the bucket, the panel creates a temporary Spaces key and deletes it at the end. See [Buckets](https://ployter.com/en/docs/databases/buckets/). - **Load balancer**: one load balancer per service with replicas, with the HTTPS certificate the panel issues, and a firewall that opens port 20000 on the droplets only to it. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ## After connecting The account shows up as a card in **Integrations → Cloud providers**, with the **Access** (**Token** with the start and end of the token), the **Default region**, the number of **Servers** and the **Networks**. ![Connected DigitalOcean provider card](https://ployter.com/assets/docs/en/do-provider-card.webp) In the card's **⋮** menu: - **Edit**: changes the name and default region. - **Change access**: opens the **Change token** modal, to paste a new token without losing the servers. - **Remove**: removes the provider from the panel. ## Remove access 1. First delete the servers in this account. If there are servers, the panel won't let you remove it. 2. Remove the networks from the card (trash icon next to each network). The VPC and network firewall the panel created are deleted from the account. 3. Open **⋮ → Remove** and confirm. 4. **OAuth**: the panel revokes the access on DigitalOcean on its own (if another team has a copy of the connection, only the last removal revokes it). **Token**: the token is still valid in DigitalOcean; delete it in **API → Tokens**, in the token's **More → Delete** menu. > [!WARNING] > Deleting the token before removing the servers through the panel leaves droplets, firewalls and IPs in your account, billing, with no way for the panel to delete them. --- # Connect Hetzner > How to connect a Hetzner Cloud project with a token, what the dashboard creates in it and what changes compared to AWS and DigitalOcean. With Hetzner connected, the dashboard creates servers, the private network and firewalls in a Hetzner Cloud project. The connection uses a project token, stored encrypted in the dashboard. Everything the dashboard creates is billed by Hetzner. ## Before you start - In the dashboard, you need the **Manage providers** permission. By default, only the team owner has it. - On Hetzner, a token works for one project only. Create or pick the project where the servers will live. To use another project, connect another Hetzner account in the dashboard. ## Limits compared to AWS and DigitalOcean > [!NOTE] > On Hetzner the dashboard creates only servers, network and firewall. There is no load balancer in the dashboard (each service runs on a single server, with no replicas or autoscaling), and Hetzner has no managed database, cache or bucket: the database runs as a service on the server. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). | | Hetzner | DigitalOcean | AWS | |---|---|---|---| | Servers, network and firewall | Yes | Yes | Yes | | Managed databases and cache | No | Yes | Yes | | Buckets | No | Spaces | S3 | | Load balancer, replicas and autoscaling | No | Yes | Yes | | Server disk | Comes with the type | Comes with the size | You pick it in GB | ## 1. Create the token 1. In the [Hetzner console](https://console.hetzner.com/projects), open the project. 2. Go to **Security → API tokens** and click **Generate API token**. 3. Give it a name, for example `ployter`. 4. Under **Permissions**, pick **Read & Write**. A read-only token is refused when you connect. 5. Click **Generate API token** and copy the token. It is shown only once. ## 2. Paste the token in the dashboard 1. Open **Integrations → Cloud providers** and click **Other clouds → Hetzner**. 2. Fill in the **Name** (for example, `Hetzner Production`). 3. Pick the **Default region**. It comes selected when you create servers; you can use others later. 4. Paste the token in the **Paste the token** step. 5. Click **Connect**. The dashboard checks the token on Hetzner before saving: it reads the project and creates and deletes an empty firewall, to be sure the token can create resources. If it is refused, *"Credential rejected"* shows up with the reason. ![Connect Hetzner modal](https://ployter.com/assets/docs/en/hetzner-connect-modal.webp) ### Available locations | Location | Code | |---|---| | Falkenstein, Germany | `fsn1` | | Nuremberg, Germany | `nbg1` | | Helsinki, Finland | `hel1` | | Ashburn, USA | `ash` | | Hillsboro, USA | `hil` | | Singapore | `sin` | ### Server types The disk comes with the type. The dashboard shows only x86 types (the ARM CAX types are left out, because the agent image is x86): - **CX** (cost-optimized): `cx23`, `cx33`, `cx43`, `cx53`. Available only in Germany and Finland; in other locations the form does not show them. - **CPX** (regular performance): `cpx22` to `cpx62`, in every location. - **CCX** (dedicated CPU): `ccx13` to `ccx43`, in every location. ## What the dashboard creates in the project - **Server**: Ubuntu 24.04 with its own firewall. The firewall opens 80 and 443; 22 only if you enter an SSH key when creating it (the name, fingerprint or number of the key added under **Security → SSH keys**). The Hetzner public IP does not change when the server restarts or is powered off, so there is no separate static IP. See [Servers](https://ployter.com/en/docs/servers/servers/). - **Network**: a private network with a subnet in the location's zone (Germany and Finland share the same zone). Servers in the network talk over their private IP. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). Everything the dashboard creates gets the `managed-by` label, so you can spot it in the console. ## Costs Hetzner bills in euros, and the dashboard's **Costs** screen adds up in dollars. So a Hetzner server shows up without a list price, with the euro value in the notice. Open the server and enter the **Monthly cost (US$)** to include it. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## After connecting The account shows up as a card in **Integrations → Cloud providers**, with the **Access** (**Token** with the start and end of the token), the **Default region**, the number of **Servers**, the **No load balancer: one server per service** notice and the **Networks**. ![Connected Hetzner provider card](https://ployter.com/assets/docs/en/hetzner-provider-card.webp) In the card's **⋮** menu: - **Edit**: changes the name and default region. - **Change access**: opens the **Change token** modal, to paste a new token without losing the servers. - **Remove**: takes the provider out of the dashboard. ## Remove access 1. Delete the servers of this account first. With servers, the dashboard does not let you remove it. 2. Remove the networks from the card (trash icon next to each network). The private network created by the dashboard is deleted from the project; a network that already existed stays. 3. Open **⋮ → Remove** and confirm. 4. The token is still valid on Hetzner. Delete it under **Security → API tokens**. > [!WARNING] > Deleting the token before removing the servers through the dashboard leaves servers and firewalls in the project, billing you, and the dashboard can no longer delete them. --- # Connect Vultr > How to connect a Vultr account with the API key, allow access by IP, what the dashboard creates in the account and the limits compared with AWS. With Vultr connected, the dashboard creates servers, the private network (VPC) and firewalls in your Vultr account. The connection uses the account's API key, stored encrypted in the dashboard. Everything the dashboard creates is billed by Vultr. ## Before you start - In the dashboard, you need the **Manage providers** permission. By default, only the team owner has it. - At Vultr, the API key has IP access control. The dashboard calls the Vultr API from the Ployter API server, so that IP must be allowed. ## Limits compared with AWS > [!NOTE] > On Vultr the dashboard creates only servers, network and firewall. There is no load balancer in the dashboard (each service runs on a single server, with no replicas or autoscaling) and no database, cache or bucket managed by the dashboard: the database runs as a service on the server. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). | | Vultr | AWS | |---|---|---| | Servers, network and firewall | Yes | Yes | | Managed databases, cache and buckets | No | Yes | | Load balancer, replicas and autoscaling | No | Yes | | Server disk | Comes with the plan | You choose in GB | ## 1. Enable the API and copy the key 1. In the [Vultr dashboard](https://my.vultr.com/settings/#settingsapi), go to **Account → API**. 2. Click **Enable API** if the API is not active yet. 3. Under **Access Control**, add the outbound IP of the Ployter API, or choose **Allow all IPv4**. Otherwise Vultr rejects the calls and the dashboard shows *"Vultr rejected the panel API's IP"*. 4. Copy the key under **Personal Access Token**. > [!TIP] > A sub-account key (**Users**) also works, as long as the user has access to servers, firewall and network. ## 2. Paste the key in the dashboard 1. Open **Integrations → Cloud providers** and click **Other clouds → Vultr**. 2. Fill in the **Name** (for example, `Vultr Production`). 3. Choose the **Default region**. It is the one selected when creating servers; you can use others later. 4. Paste the key in the **Paste the API key** step. 5. Click **Connect**. The dashboard checks the key on Vultr before saving: it reads the account and creates and deletes an empty firewall group, to be sure the key can create resources. If it is refused, *"Credential rejected"* shows up with the reason. ![Connect Vultr modal](https://ployter.com/assets/docs/en/vultr-connect-modal.webp) ### Available locations The list has the Vultr locations with general-purpose servers, including **São Paulo** (`sao`), **Santiago** (`scl`), **Mexico City** (`mex`), **New Jersey** (`ewr`), **Miami** (`mia`), **Frankfurt** (`fra`), **London** (`lhr`), **Tokyo** (`nrt`) and **Singapore** (`sgp`). The form shows each one's name and code. ### Plans The disk comes with the plan: - **Cloud Compute** (`vc2-*`): from `vc2-1c-1gb` to `vc2-8c-32gb`, in every location. - **High Performance** (`vhp-*-amd`): AMD with NVMe. Not available in every location; if the plan is missing in the chosen location, the server is not created and the dashboard says *"This plan does not exist in this Vultr location"*. ## What the dashboard creates in the account - **Server**: Ubuntu 24.04 with its own firewall group. The group opens 80 and 443 (IPv4 and IPv6); 22 only if you enter an SSH key when creating it (the name of the key registered under **Account → SSH Keys**). The public IPv4 stays with the server for as long as it exists. See [Servers](https://ployter.com/en/docs/servers/servers/). - **Network**: a VPC in the location, with a free `10.x.0.0/20` range in the account. Servers on the network talk over private IPs. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). What the dashboard creates carries the dashboard prefix in its description and the dashboard tag, so you can spot it in the Vultr dashboard. ## Costs The server price comes from the Vultr price list, in dollars, and goes straight into the **Costs** screen. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## After connecting The account shows up as a card in **Integrations → Cloud providers**, with the **Access** (**Token** with the start and end of the key), the **Default region**, the number of **Servers**, the **No load balancer: one server per service** notice and the **Networks**. ![Connected Vultr provider card](https://ployter.com/assets/docs/en/vultr-provider-card.webp) In the card's **⋮** menu: - **Edit**: changes the name and the default region. - **Change access**: opens the modal to paste a new key without losing the servers. Use it when you regenerate the key at Vultr. - **Remove**: takes the provider out of the dashboard. ## Remove access 1. Delete the servers in this account first. With servers, the dashboard does not let you remove it. 2. Remove the networks from the card (trash icon next to each network). The VPC created by the dashboard is deleted from the account; a VPC that already existed stays. 3. Open **⋮ → Remove** and confirm. 4. The key stays valid at Vultr. Regenerate it under **Account → API** to invalidate the old one. > [!WARNING] > Changing the key at Vultr before removing the servers through the dashboard leaves servers and firewalls in the account, billing, with no way for the dashboard to delete them. --- # Connect Linode > How to connect a Linode (Akamai Cloud) account with a personal token, what the dashboard creates in the account and the limits compared with AWS. With Linode connected, the dashboard creates servers (Linodes), the private network (VPC) and firewalls in your Linode account, now Akamai Cloud. The connection uses a personal token, stored encrypted in the dashboard. Everything the dashboard creates is billed by Linode. ## Before you start - In the dashboard, you need the **Manage providers** permission. By default, only the team owner has it. - The agent is installed through the Linode Metadata service. Locations without it won't work: the dashboard refuses the server before creating anything and says *"has no Metadata service"*. ## Limits compared with AWS > [!NOTE] > On Linode the dashboard creates only servers, network and firewall. There is no load balancer in the dashboard (each service runs on a single server, with no replicas or autoscaling) and no database, cache or bucket managed by the dashboard: the database runs as a service on the server. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). | | Linode | AWS | |---|---|---| | Servers, network and firewall | Yes | Yes | | Managed databases, cache and buckets | No | Yes | | Load balancer, replicas and autoscaling | No | Yes | | Server disk | Comes with the type | You choose in GB | ## 1. Create the token 1. In [Cloud Manager](https://cloud.linode.com/profile/tokens), go to **My Profile → API Tokens**. 2. Click **Create a Personal Access Token**. 3. Give it a name, for example `ployter`. 4. Under **Expiry**, choose **Never**, or note the date to replace the token before it expires. 5. Set **Read/Write** on **Linodes**, **Firewalls** and **VPCs**. The rest can stay **None**. 6. Click **Create Token** and copy the token. It is shown only once. ## 2. Paste the token in the dashboard 1. Open **Integrations → Cloud providers** and click **Other clouds → Linode**. 2. Fill in the **Name** (for example, `Linode Production`). 3. Choose the **Default region**. It is the one selected when creating servers; you can use others later. 4. Paste the token in the **Paste the token** step. 5. Click **Connect**. The dashboard checks the token on Linode before saving: it reads the profile and creates and deletes an empty firewall, to be sure the token can create resources. If it is refused, *"Credential rejected"* shows up with the reason. ![Connect Linode modal](https://ployter.com/assets/docs/en/linode-connect-modal.webp) ### Available locations The list has the Linode compute locations, including **São Paulo** (`br-gru`), **Newark** (`us-east`), **Miami** (`us-mia`), **Frankfurt** (`eu-central`), **London** (`eu-west`), **Tokyo** (`ap-northeast`) and **Singapore** (`ap-south`). The form shows each one's name and code. ### Server types The disk comes with the type: - **Shared CPU**: `g6-nanode-1` and `g6-standard-1` to `g6-standard-8`. - **Dedicated CPU**: `g6-dedicated-2` to `g6-dedicated-8`. ## What the dashboard creates in the account - **Server**: Ubuntu 24.04 with its own Cloud Firewall, which blocks inbound traffic by default. It opens 80 and 443; 22 only if you enter an SSH key when creating it (the name of the key registered under **My Profile → SSH Keys**). The public IPv4 stays with the server for as long as it exists. See [Servers](https://ployter.com/en/docs/servers/servers/). - **Network**: a VPC in the location, with a free `10.x.0.0/24` subnet in the account. The server gets an interface on the subnet, and its firewall allows all traffic coming from it, so servers on the network talk over private IPs on every port. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). What the dashboard creates carries the dashboard prefix in its name and the dashboard tag, so you can spot it in Cloud Manager. ## Costs The server price comes from the Linode price list, in dollars, including the specific price of locations like São Paulo and Jakarta, and goes straight into the **Costs** screen. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## After connecting The account shows up as a card in **Integrations → Cloud providers**, with the **Access** (**Token** with the start and end of the token), the **Default region**, the number of **Servers**, the **No load balancer: one server per service** notice and the **Networks**. ![Connected Linode provider card](https://ployter.com/assets/docs/en/linode-provider-card.webp) In the card's **⋮** menu: - **Edit**: changes the name and the default region. - **Change access**: opens the modal to paste a new token without losing the servers. Use it before the token expires. - **Remove**: takes the provider out of the dashboard. ## Remove access 1. Delete the servers in this account first. With servers, the dashboard does not let you remove it. 2. Remove the networks from the card (trash icon next to each network). The VPC created by the dashboard is deleted from the account; a VPC that already existed stays. 3. Open **⋮ → Remove** and confirm. 4. The token stays valid at Linode. Revoke it under **My Profile → API Tokens**. > [!WARNING] > Revoking the token before removing the servers through the dashboard leaves servers and firewalls in the account, billing, with no way for the dashboard to delete them. --- # Use your own server > How to add a machine you already have, what the install command does and how to keep the agent up to date. You don't need to connect a cloud to use the panel. A machine you already have (a VPS, a droplet, an EC2 instance or a physical server) can be added directly in **Servers**. You run a command on it, the agent is installed, and the machine starts receiving deploys like any other server. ## Requirements - **Operating system**: Ubuntu or Debian. - **Architecture**: x86_64 (amd64). The agent image is x86; ARM machines aren't supported. - **Root access**: the command runs with `sudo`. - **Ports 80 and 443** open to the internet, if you'll use domains. HTTPS is issued by Let's Encrypt, which needs to reach the machine on port 80. - **Outbound internet access**: the agent connects to the panel API over HTTPS and Docker pulls images. No inbound port needs to be opened for the agent. > [!TIP] > Use a dedicated machine. The agent manages the machine's Docker containers, and the server terminal gives root access. ## Add the server 1. Open **Servers** and click **New server**. 2. In **Where to create**, pick **My own server**. 3. Enter a **Name**, for example `app-1`. 4. Click **Add**. The panel shows the install command, with a token unique to this server. ![Install command for your own server](https://ployter.com/assets/docs/en/own-server-install-command.webp) > [!WARNING] > The token is shown only now. Copy the command before closing. Lost it? Generate another on the server screen, in **Actions → New install command**. ## Run the command SSH into the machine and run the copied command as root. It has this format: ```bash curl -fsSL https://api.ployter.com/agent/install.sh | sudo bash -s -- https://api.ployter.com ``` The address and token come filled in on the command the panel shows. Always use the command copied from the panel. Within 1 to 2 minutes the server shows as **Online**. Until the agent connects, the server screen shows **The agent has not connected yet**. ## What the command does The install script: 1. Installs Docker, if it isn't on the machine yet. 2. Sets up Docker log rotation (10 MB per file, 5 files) in `/etc/docker/daemon.json`, so a verbose service doesn't fill the disk. If this file already exists, it isn't changed: the script only warns you. 3. Creates swap if the machine has less than 8 GB of RAM and no swap yet: 4 GB, or 2 GB if the disk has less than 30 GB free. Swap keeps a heavy build from taking down another service for lack of memory. 4. Sets `vm.overcommit_memory = 1`, so Redis can save in the background with little free memory. 5. Starts the `infra-agent` container, with automatic restart. The agent runs with: - access to the Docker socket, to create and stop the services' containers; - the machine's root mounted read-only, to measure the disk; - host networking, to see the real IP and hostname; - high memory priority, so the system kills another process before it when memory runs out. Running the command again is safe: it replaces the agent container with the current version. ## What the agent does Once connected, the agent: - builds (Dockerfile or Railpack) and deploys the services; - routes domains and issues HTTPS certificates; - sends machine and container metrics, logs and requests; - opens the terminal, volume files and SFTP when you ask; - runs backups and scheduled tasks. The connection always goes from inside out, from the machine to the panel API. If the network drops, the agent reconnects by itself. If the panel loses contact, the server shows as **Offline**, and the services keep running. ## Firewall On your own server, the panel doesn't control the machine's firewall or your provider's: - Open ports 80 and 443 for domains. - If you turn on a public port on a service (for example, a database reachable from outside) or SFTP, open that port yourself. On machines the panel creates on AWS or DigitalOcean, this is automatic. See [Private network and firewall](https://ployter.com/en/docs/servers/networking/). ## Update the agent When a new agent version comes out, the server screen shows **Agent v... available** with the **Update agent** button. In **Servers**, a notice lists the outdated servers and offers **Update the N agents** at once. The update replaces the agent container with the new image and waits for it to connect to the API. If the new agent doesn't connect within 90 seconds, the old one runs again. Services stay up during the switch. If the platform has automatic updates turned on, the list shows **Automatic update is on**, and agents update themselves when a new version comes out. > [!NOTE] > Very old agents (below v0.4.0) don't update through the panel. The screen shows *"This version does not update itself yet: update it once directly on the server"*. Generate a new command in **Actions → New install command** and run it on the machine. ## Replace the token In **Actions → New install command**, click **Generate new token**. The current token stops working immediately: the agent disconnects and only comes back after you run the new command on the server. Services keep running; only the panel loses contact until then. ## Remove the server In **Actions → Delete server**, the server is removed from the panel and the agent is disconnected. The machine stays on, with whatever containers are on it: shut it down or delete it at your provider. Before that, move or delete the server's services; while it has services, the panel won't let you delete it. ## Limits Like Hetzner, Vultr and Linode, your own server has no panel load balancer: each service runs on a single server. Replicas and autoscaling need servers on AWS or DigitalOcean. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). --- # Connect GitHub > How to connect GitHub with the GitHub App, in a few clicks, or with a personal token, for private repositories, deploy on every push and previews. The panel uses the GitHub connection to clone private repositories, deploy on every push and comment on pull requests with the preview address. Public repositories work without a connection for manual deploys. ## Two ways to connect | | GitHub App (recommended) | Personal token | |---|---|---| | How you connect | Click **Connect GitHub**, pick the repositories in GitHub and come back connected | Create a token in GitHub and paste it into the panel | | Repositories | Only the ones you pick in the installation | The ones the token can see | | Deploy on every push | Already on through the App, with no webhook per repository | The panel creates a webhook in each repository | | Expiration | The panel generates a 1-hour access each time it's used: nothing to expire | The token expires on the date you picked | | PR comment | Shows up as `ployter[bot]` | Shows up as your account | Use a token only if your organization doesn't allow installing apps. ## Connect with the GitHub App (recommended) In the panel, you need the **Manage GitHub credentials** permission. By default, owners and admins have it. 1. In the panel, open **Integrations → GitHub** and click **Connect GitHub**. 2. GitHub opens and asks where to install the App: on your account or on an organization where you're an admin. 3. Pick **All repositories** or **Only select repositories** and check the repositories the panel will use. 4. Click **Install** (or **Install & Authorize**). GitHub asks you to authorize Ployter to confirm who you are: click **Authorize**. 5. GitHub sends you back to the panel, and the connection shows up in the list with the **App** badge, the account name and the number of services using it. Before saving, the panel checks that the installation belongs to the account that came back from GitHub. No token is stored: for each clone, repository listing or comment, the panel generates an access that lasts 1 hour and only sees the repositories you picked. ![GitHub screen in the panel with a GitHub App connection](https://ployter.com/assets/docs/en/github-app-list.webp) ### Organizations If you're not an admin of the organization, GitHub sends an installation request to its admins. The panel shows **Request sent**. When an admin approves it in GitHub, click **Connect GitHub** again and pick the organization. ### More than one team The same installation can be used in several teams in the panel. Open the other team and click **Connect GitHub**: on the account where the App is already installed, GitHub opens the installation settings. Click **Save** and you're back in the panel, connected. If you manage GitHub in both teams, there's a shorter path: on the other team's **GitHub** page, the **Use a connection from another team** card lists the accounts already connected in your teams. Click **Use here** and you're done, without going through GitHub. ![Use a connection from another team card on the GitHub page](https://ployter.com/assets/docs/en/github-reuse.webp) The repositories you picked apply to every team that uses the installation. To keep them separate, use different GitHub accounts or organizations. ## Change repositories or uninstall In the **Integrations → GitHub** list, click the connection's link icon (**Manage on GitHub**). It opens the installation page in GitHub, where you: - add or remove repositories in **Repository access** and click **Save** (the panel's list updates by itself); - uninstall the App in **Uninstall**. The connection is removed from the panel in every team that used it. ## Connect with a personal token GitHub has two kinds of personal token. Both work: | | Classic | Fine-grained | |---|---|---| | Where to create | https://github.com/settings/tokens | https://github.com/settings/personal-access-tokens | | Reach | Every repository your account can access | Only the repositories you choose | | Permissions | `repo` and `admin:repo_hook` scopes | **Contents** (read), **Metadata** (read) and **Webhooks** (read and write) | | Starts with | `ghp_` | `github_pat_` | ### Classic token 1. In GitHub, open **Settings → Developer settings → Personal access tokens → Tokens (classic)**. 2. Click **Generate new token → Generate new token (classic)**. 3. In **Note**, enter a name, for example `ployter`. 4. In **Expiration**, pick the duration. When the token expires, the panel stops cloning until you replace it. 5. Check the scopes: - `repo` (access to repositories, including private ones); - `admin:repo_hook` (create and remove the deploy-on-push webhook). 6. Click **Generate token** and copy the token. It is shown only once. > [!NOTE] > If the organization uses SSO (SAML), authorize the token for it: in the token list, click **Configure SSO** next to the token and **Authorize** for the organization. ### Fine-grained token 1. In GitHub, open **Settings → Developer settings → Personal access tokens → Fine-grained tokens**. 2. Click **Generate new token**. 3. Enter a name and pick the duration in **Expiration**. 4. In **Resource owner**, pick your account or the organization that owns the repositories. Some organizations require an admin's approval before the token works. 5. In **Repository access**, pick **Only select repositories** and check the repositories the panel will use (or **All repositories**). 6. In **Permissions → Repository permissions**, set: - **Contents**: Read-only; - **Metadata**: Read-only (already selected); - **Webhooks**: Read and write; - **Pull requests**: Read and write, for the preview comment. 7. Click **Generate token** and copy the token. ### Add the token 1. In the panel, open **Integrations → GitHub** and click **Use a token** (or **New credential**, if the GitHub App isn't available). 2. Enter a **Name** (for example, `GitHub Acme`). 3. Paste the **Token**. 4. Click **Save**. The panel checks the token with GitHub before saving and stores it encrypted. ![GitHub credentials screen with the New credential modal](https://ployter.com/assets/docs/en/github-new-credential.webp) ## Use the connection in a service When you create a service with the **GitHub** source: 1. In **Repository**, use **Pick from the list**. The list shows each connection's repositories, grouped, tagged **private** or **public**. 2. In **GitHub credential**, pick the connection. **None (public repository)** only works for a public repository. On an existing service, change it in **Settings → Source → Credential**. See [Projects and services](https://ployter.com/en/docs/services/projects-and-services/). ## Deploy on every push With **Deploy on every push** turned on in the service (in **Settings → Source**), each push to a branch deploys every service with deploy on every push that uses that repository and branch. Tag pushes and deleted branches are ignored. GitHub's calls are signed, and the panel rejects calls without the right signature. - **GitHub App:** there's nothing to configure. The App already receives the **push** and **pull_request** events from every repository in the installation. - **Token:** the panel creates a webhook in the repository by itself, which shows up in the repository's **Settings → Webhooks** in GitHub. In **Recent Deliveries** you see each call and the panel's response. When no service uses the repository with deploy on every push or previews anymore, the panel removes the webhook. > [!WARNING] > With a token that lacks webhook permission, manual deploys work, but deploy on every push isn't turned on automatically. The service shows a warning like *"Automatic deploy: could not create the webhook on acme/loja (the token doesn't have webhook permission (admin:repo_hook))"*. Fix the token or move the service to a GitHub App connection. If you move a service from a token to the GitHub App, the repository's old webhook may still be there. The panel ignores the repeated call, so the deploy happens only once. If you want, delete the old webhook in **Settings → Webhooks**. ## Replace the token This applies only to token connections. When the token expires or is revoked, cloning fails with *"GitHub rejected the token (invalid or expired). Replace it in Integrations › GitHub."* 1. Generate a new token in GitHub, with the same permissions. 2. In **Integrations → GitHub**, click the credential's pencil (**Edit credential**). 3. Paste the new token and click **Save**. Leave the field blank to keep the current one. Services that use the credential switch to the new token, with no other change. GitHub App connections have no token to replace. ## Remove the connection Click the connection's trash icon and confirm with **Remove**. Services that used it are left without it: a private repository stops cloning until you pick another connection in the service. The modal tells you how many services are affected. - **GitHub App:** the connection is removed only from this team; the App stays installed in GitHub. To remove access for good, uninstall it in **Manage on GitHub**. - **Token:** webhooks already created in the repositories stay there. To delete them, open **Settings → Webhooks** in the GitHub repository. Also revoke the token in GitHub if it's no longer used. ## Copy from another team If you own another team that already has connections, click **Import from another team**. Both GitHub App and token connections are copied. The other owners of the source team get an email about the copy. --- # Connect GitLab > How to connect GitLab by signing in, in a few clicks, or with an access token (also for self-hosted GitLab), for private projects, deploy on every push and merge request previews. The panel uses the GitLab connection to clone private projects, deploy on every push and comment on merge requests with the preview address. Public gitlab.com projects work without a connection for manual deploys. ## Two ways to connect | | GitLab login (recommended) | Access token | |---|---|---| | How it connects | Click **Connect with GitLab**, authorize and come back connected | Create a token in GitLab and paste it in the panel | | Where | gitlab.com | gitlab.com or your own GitLab (self-hosted) | | Projects | The ones your account can push to | The ones the token can see | | Validity | The panel renews access by itself | The token expires when you chose | | Merge request comment | Shows up as your account | Shows up as the token's account (or bot) | Either way, deploy on every push and previews use a webhook on each project, created by the panel. ![GitLab page in the panel with one login connection and one token connection](https://ployter.com/assets/docs/en/gitlab-page.webp) ## Connect by signing in (gitlab.com) You need the **Manage GitHub and GitLab connections** permission in the panel. By default, owners and admins have it. 1. In the panel, open **Integrations → GitLab** and click **Connect with GitLab**. 2. Sign in to GitLab, if you aren't signed in yet. 3. GitLab shows Ployter's access request (`api` scope). Click **Authorize**. 4. You come back to the panel and the connection shows up in the list with the **Login** badge and the account name. GitLab access lasts 2 hours, and the panel renews it by itself when needed. Connecting the same account again only updates the existing connection. To revoke Ployter's access for good, revoke it in **Preferences → Applications** in GitLab. Removing the connection in the panel doesn't revoke the authorization there. > [!NOTE] > A login connection isn't copied to other teams by **Import from another team**. In each team, click **Connect with GitLab**. ## Connect with an access token Use a token for your own GitLab, for a group token (which doesn't depend on one person's account) or if you'd rather not authorize the login. 1. In GitLab, open **Preferences → Access tokens** and create a token with the `api` scope. Instead of a personal token, you can create a group or project token, under the group's or project's **Settings → Access tokens**. 2. In the panel, open **Integrations → GitLab** and click **Use a token**. 3. Give it a name, paste the token and, for your own GitLab, fill in the **GitLab address** (for example, `https://git.yourcompany.com`). For gitlab.com, leave it empty. 4. Click **Save**. The panel checks the token with GitLab before saving and stores it encrypted. ![New GitLab token modal with the address of a self-hosted GitLab](https://ployter.com/assets/docs/en/gitlab-token-modal.webp) The role on the project decides what works: | Role | What works | |---|---| | Developer | Listing, cloning and manual deploys | | Maintainer | Everything, including the webhook for deploy on every push and previews | To replace an expired token, click the connection's pencil and paste the new one. ## Use the connection in a service 1. In the project, click **New service** and pick **Git repository**. 2. Under **Repository**, the list shows each connection's projects, GitHub and GitLab, grouped by account. Pick the project: the default branch is already selected. 3. Check the branch and the folder (in a monorepo) and click **Create service**. ![Repository list with one GitHub connection and one GitLab connection](https://ployter.com/assets/docs/en/gitlab-repo-picker.webp) Groups and subgroups show up in the path, for example `acme/backend/pagamentos`. For a public gitlab.com project, use **Paste a public repository URL** and paste the address, without a connection. A project on your own GitLab needs a connection with its address: the panel only accepts that address together with the credential. ## Deploy on every push With **Automatic deploy** on in the service, the panel creates a webhook on the GitLab project (push and merge request events). Each push to the service's branch deploys that commit. Tag pushes and deleted branches are ignored. The webhook is removed by itself when no service uses the project with automatic deploy or previews anymore. > [!WARNING] > Without the Maintainer role, GitLab doesn't let the panel create the webhook. The service is saved with a warning, and manual deploys keep working. ## Merge request previews Under the service's **Settings → Merge request previews**, each merge request to the service's branch brings up a copy with the MR code, at its own address. The panel comments on the MR with the link and edits the same comment on every push. The preview goes away when the MR is closed or merged. A draft merge request only gets a preview when it leaves draft. Merge requests from forks don't get a preview, because outside code would run with the service's variables. See [Previews](https://ployter.com/en/docs/services/previews/). ## Remove the connection In the list, click the connection's trash icon. Services that used it are left without a credential: a private project stops cloning until you pick another one. Webhooks already created stay in GitLab; incoming pushes are ignored. --- # Connect Bitbucket > How to connect Bitbucket Cloud by signing in, in a few clicks, or with an Atlassian API token, for private repositories, deploy on every push and pull request previews. The panel uses the Bitbucket connection to clone private repositories, deploy on every push and comment on pull requests with the preview address. Public repositories work without a connection for manual deploys. ## Two ways to connect | | Bitbucket login (recommended) | API token | |---|---|---| | How it connects | Click **Connect with Bitbucket**, authorize and come back connected | Create a token in your Atlassian account and paste it in the panel | | Repositories | The ones in your account's workspaces | The ones the token can see | | Validity | The panel renews access by itself | The token expires when you chose | | Pull request comment | Shows up as your account | Shows up as the token's account | Either way, deploy on every push and previews use a webhook on each repository, created by the panel. ![Bitbucket page in the panel with one login connection and one token connection](https://ployter.com/assets/docs/en/bitbucket-page.webp) ## Connect by signing in You need the **Manage GitHub, GitLab and Bitbucket connections** permission in the panel. By default, owners and admins have it. 1. In the panel, open **Integrations → Bitbucket** and click **Connect with Bitbucket**. 2. Sign in to Bitbucket, if you aren't signed in yet. 3. Bitbucket shows the permissions Ployter asks for. Click **Grant access**. 4. You come back to the panel and the connection shows up in the list with the **Login** badge and the account name. Bitbucket access lasts 2 hours, and the panel renews it by itself when needed. If the connection goes unused for 3 months, Bitbucket asks for the login again: click **Connect with Bitbucket** and the same connection is updated. To revoke Ployter's access for good, revoke it in **Personal settings → App authorizations** in Bitbucket. > [!NOTE] > A login connection isn't copied to other teams by **Import from another team**. In each team, click **Connect with Bitbucket**. ## Connect with an API token Bitbucket no longer accepts app passwords. Use an Atlassian account API token instead: 1. Open [id.atlassian.com](https://id.atlassian.com/manage-profile/security/api-tokens), under **Account settings → Security → API tokens**, and click **Create API token with scopes**. 2. Pick **Bitbucket** and check the scopes `read:user:bitbucket`, `read:repository:bitbucket`, `read:pullrequest:bitbucket`, `write:pullrequest:bitbucket`, `read:webhook:bitbucket` and `write:webhook:bitbucket`. 3. In the panel, open **Integrations → Bitbucket** and click **Use a token**. 4. Give it a name, paste the token and click **Save**. The panel checks the token with Bitbucket before saving and stores it encrypted. ![New Bitbucket token modal](https://ployter.com/assets/docs/en/bitbucket-token-modal.webp) For the panel to create the webhook, the account must be a repository admin. Without that (or without the webhook scopes), manual deploys work, but deploy on every push isn't turned on by itself. To replace an expired token, click the connection's pencil and paste the new one. ## Use the connection in a service 1. In the project, click **New service** and pick **Git repository**. 2. Under **Repository**, the list shows each connection's repositories, grouped by account. Pick the repository: the main branch is already selected. 3. Check the branch and the folder (in a monorepo) and click **Create service**. ![Repository list with GitHub, GitLab and Bitbucket connections](https://ployter.com/assets/docs/en/gitlab-repo-picker.webp) For a public repository, use **Paste a public repository URL** and paste the address (`https://bitbucket.org/workspace/repository`), without a connection. ## Deploy on every push With **Automatic deploy** on in the service, the panel creates a webhook on the repository (push and pull requests). Each push to the service's branch deploys that commit. Tag pushes and deleted branches are ignored. The webhook is signed, and the panel rejects calls without the right signature. The webhook is removed by itself when no service uses the repository with automatic deploy or previews anymore. > [!NOTE] > Cloning from Bitbucket needs agent v0.26.0 or later on the server. With an older agent, the panel asks you to update it in **Servers › Update agent**. ## Pull request previews Under the service's **Settings → PR previews**, each pull request to the service's branch brings up a copy with the PR code, at its own address. The panel comments on the PR with the link and edits the same comment on every push. The preview goes away when the PR is merged or declined. A draft pull request only gets a preview when it leaves draft. Pull requests from forks don't get a preview, because outside code would run with the service's variables. See [Previews](https://ployter.com/en/docs/services/previews/). ## Remove the connection In the list, click the connection's trash icon. Services that used it are left without a credential: a private repository stops cloning until you pick another one. Webhooks already created stay in Bitbucket; incoming pushes are ignored. --- # Connect Cloudflare > How to create the Cloudflare token, connect the account and point your domains' DNS from the panel, with undo. With a Cloudflare account connected, each of your services' domains gets a **Point here** button: the panel switches the DNS record to the server (or to the load balancer) and keeps what was there before, so you can undo it. Nothing changes on its own: adding a domain in the panel doesn't touch DNS. The panel only changes Cloudflare when you click **Point**. ## Before you start - To connect and remove accounts, you need the **Manage DNS accounts** permission. By default, owners and admins have it. - To point a domain, you need the service's **Manage domains** permission. - The domain must be a zone in your Cloudflare account (using Cloudflare's nameservers). ## 1. Create the token in Cloudflare ### Shortcut: prefilled token In the panel, under **Integrations → Cloudflare**, click **Create the token on Cloudflare** (in the **How to generate the token** card or in the **Connect account** modal). Cloudflare opens token creation with the three permissions below already selected and **All zones**. Check them, click **Continue to summary → Create Token** and copy the token. ![How to generate the token card with the Create the token on Cloudflare button](https://ployter.com/assets/docs/en/cf-quick.webp) If a permission shows up empty, reload the Cloudflare page or build the token by hand, as below. ### Build the token by hand The panel shows these steps in **Integrations → Cloudflare**, in the **How to generate the token** card. Use the card's selector to see the screen names in English, Portuguese or Spanish, matching your Cloudflare language. The names below are from Cloudflare in English. 1. In Cloudflare, open **My Profile → API Tokens → Create Token** (direct link: https://dash.cloudflare.com/profile/api-tokens). 2. Use the **Edit zone DNS** template (**Use template** button). 3. In **Permissions**, keep these three rows. You add the last two with **+ Add more**: | Type | Item | Access | |---|---|---| | Zone | DNS | Edit | | Zone | Zone | Read | | Zone | Zone Settings | Read | The last one lets the panel read the zone's SSL mode and warn you when it would take the site down. 4. In **Zone Resources**, pick **Include · All zones**, or only the domains the panel may change. A domain left out here doesn't show up in the panel. 5. Click **Continue to summary → Create Token** and copy the token. It is shown only once. | Cloudflare in Portuguese | Cloudflare in Spanish | |---|---| | Meu perfil → Tokens de API → Criar token | Mi perfil → Tokens de API → Crear token | | Modelo **Editar DNS da zona** (**Usar modelo**) | Plantilla **Editar DNS de zona** (**Usar plantilla**) | | Zona · DNS · Editar | Zona · DNS · Editar | | Zona · Zona · Ler | Zona · Zona · Leer | | Zona · Configurações da zona · Ler | Zona · Configuración de zona · Leer | | Recursos da zona: Incluir · Todas as zonas | Recursos de zona: Incluir · Todas las zonas | | Continuar para o resumo → Criar token | Continuar con el resumen → Crear token | ## 2. Connect the account in the panel 1. Open **Integrations → Cloudflare** and click **Connect account**. 2. Enter a **Name** (for example, `Cloudflare Acme`). 3. Paste the **API token**. 4. Click **Save**. Before saving, the panel checks with Cloudflare that the token sees at least one domain and can read DNS. Then it shows how many domains are visible. The token is stored encrypted. ![Cloudflare screen with the How to generate the token card and the Connect account modal](https://ployter.com/assets/docs/en/cloudflare-connect-account.webp) In the list, each account's **Domains** button shows the zones the token can see, and the **Pointed domains** column counts how many domains the panel pointed through it. You can connect more than one account; the panel uses the account that holds the domain's zone. > [!TIP] > Added a new domain in Cloudflare and it doesn't show up? If the token isn't set to **All zones**, edit the token in Cloudflare and include the new zone. Each account's domain list is cached for 5 minutes. ## Point a domain 1. In the service, open the **Network** tab and add the domain, if you haven't yet. See [Domains and HTTPS](https://ployter.com/en/docs/networking/domains/). 2. Below the domain you see its state in Cloudflare: - **Points here**, with the **proxy** or **DNS only** tag; - **Points elsewhere:**, with the current record (for example, `A 203.0.113.10`); - **No record on Cloudflare.**; - **Cloudflare: domain is not in the connected accounts.**, when no token can see the zone. 3. Click **Point here**. 4. The modal shows **Now** (the current records) and **Becomes** (the new record). Choose whether you want the **Cloudflare proxy (orange cloud)**. 5. Click **Point**. ![Point domain modal with the Cloudflare proxy](https://ployter.com/assets/docs/en/cloudflare-point-modal.webp) ### What the panel does when pointing - Deletes the **A**, **AAAA** and **CNAME** records with the exact domain name. Records of other types (MX, TXT and similar) stay as they are. - Keeps the deleted records, for **Undo**. - Creates the new record: - **A** with the server's public IP, when the service runs on a single server; - **CNAME** to the project's load balancer, when the service has replicas on AWS. In that case, the panel also creates the CNAME AWS uses to validate the certificate, always without proxy; - **A** with the IP of the service's load balancer, when the service has replicas on DigitalOcean. In that case, the panel also creates the `_acme-challenge` CNAME the panel uses to issue the certificate, always without proxy. - If creation fails halfway, the panel recreates the old records. With the proxy, the change takes effect in seconds. Without it, anyone who has the old address cached may take a few minutes to see it. > [!NOTE] > If the domain isn't live on the server yet (a deploy is missing), the modal warns you: if you point now, the site returns an error until the deploy. ### Turn the proxy on or off Once the domain is pointed, the same place shows **Turn on proxy** or **Turn off proxy**. The button opens the same modal, with the proxy in the new position. ## Undo Click **Undo** next to the domain and confirm. The panel deletes the record it created and recreates the previous records. If there was no record before, the panel's record is simply removed. **Undo** stays available while the Cloudflare account is connected. Pointing again doesn't lose the original record: the panel always keeps what was there before the first time. ## SSL mode and proxy With the proxy on, Cloudflare serves the visitor's HTTPS and connects to your server. The zone's SSL mode (in Cloudflare, **SSL/TLS → Overview**) decides how it does that, and the panel checks this mode before pointing: | Zone mode | What happens | |---|---| | **Full** | Recommended. Works with or without HTTPS turned on at the server, with no downtime during the switch. | | **Full (strict)** | Works, but until the server's certificate is issued (seconds to minutes) the site shows a 526 error. With the domain's HTTPS turned off on the server, Cloudflare refuses the connection: use **Full**. | | **Flexible** | Blocked when the server's HTTPS is on: Cloudflare arrives over HTTP, the server redirects to HTTPS and the site goes into a redirect loop. Switch to **Full**. | | **Off** | Blocked with proxy. Set it to **Full**. | Without the **Zone Settings: Read** permission, the panel can't read the mode and doesn't warn you. > [!TIP] > When Cloudflare with proxy handles SSL, you can turn off the domain's HTTPS on the server (by unchecking the Let's Encrypt certificate option when adding the domain). With **Full** mode, the site stays on HTTPS for visitors. ### With replicas With replicas, the load balancer only answers HTTPS after the certificate is issued (the AWS one or, on DigitalOcean, the Let's Encrypt one the panel issues). Until then, point **without the proxy**: the panel blocks the proxy during this phase. Once the certificate is issued, turn on the proxy with **Turn on proxy**. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ### IP filter with proxy With the proxy on, the server sees Cloudflare's IP, not the visitor's. That's why the IP filter in **Access through domains** blocks everyone. In that case, use the password only. See [Private access and public ports](https://ployter.com/en/docs/networking/access/). ## Remove the account Click the account's trash icon in **Integrations → Cloudflare** and confirm with **Remove**. The account leaves the panel. Records already in Cloudflare stay there; only **Undo** for the pointed domains goes away. To cut access completely, delete the token in Cloudflare, in **My Profile → API Tokens**. To replace the token without removing the account, click the pencil (**Edit account**), paste the new token and save. Leave the field blank to keep the current one. --- # Servers > How to create servers on AWS and DigitalOcean, track usage, adjust builds and swap, update the agent and delete them. Servers are the machines where services run. You can create one in your AWS, DigitalOcean, Hetzner, Vultr or Linode account directly from the panel, or add a machine you already have. In every case, an agent installed on the machine receives deploys and sends metrics and logs. ## Before you start - To create in the cloud, first connect [AWS](https://ployter.com/en/docs/integrations/aws/), [DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/), [Hetzner](https://ployter.com/en/docs/integrations/hetzner/), [Vultr](https://ployter.com/en/docs/integrations/vultr/) or [Linode](https://ployter.com/en/docs/integrations/linode/). For a machine of your own, see [Use your own server](https://ployter.com/en/docs/integrations/own-server/). - Permissions: **Add servers** (by default, owners and admins), **Remove servers** and **Server terminal** (by default, owner only). - The team's plan limits the number of servers (`servers` limit). Cloud-created servers, your own servers and servers created by autoscaling all count. ## Create a server in the cloud 1. Open **Servers** and click **New server**. 2. In **Where to create**, pick the cloud account. Each connected provider shows up as an option, with the account number. 3. Enter a **Name**, for example `app-1`. 4. Pick the **Region**. The provider's default region comes preselected. 5. Pick the **Machine size** (tables below). 6. On AWS, enter the **Disk (GB)**, from 20 to 2000 (default: 40). On DigitalOcean, Hetzner, Vultr and Linode, the disk comes with the machine size. 7. Pick the **Network** (see [Network](https://ployter.com/en/docs/servers/servers/#rede)). 8. Turn on **Static IP** if the server will have domains. The IP doesn't change if the machine is stopped and started, and DNS points to it. 9. Optional: in **Advanced**, enter an **SSH key pair** (AWS, the name of a key pair already created in the region) or an **SSH key** (DigitalOcean and Hetzner, the name or fingerprint of a registered key; Vultr and Linode, the key name). Without it, port 22 stays closed. You don't need it to use the panel. 10. Click **Create server**. ![New server form with an AWS account](https://ployter.com/assets/docs/en/servers-create-cloud.webp) The panel creates the machine with Ubuntu 24.04 and installs the agent on first boot. It takes 1 to 3 minutes, and the screen refreshes by itself. If the region's network is also being created, add 1 minute. > [!NOTE] > On Hetzner, Vultr and Linode, each service runs on a single server: replicas and autoscaling, which need the load balancer, are on AWS and DigitalOcean. The form tells you this when you pick one of these accounts. On Hetzner, the CX types only show up in the Germany and Finland locations. ### Sizes on AWS | Type | vCPU | Memory | Suggested use | |---|---|---|---| | `t3.small` | 2 | 2 GB | Testing; building small projects | | `t3.medium` | 2 | 4 GB | A few light services | | `t3.large` | 2 | 8 GB | A complete site (Nest + Vue + Redis) | | `t3.xlarge` | 4 | 16 GB | Several sites | | `t3.2xlarge` | 8 | 32 GB | Several sites with headroom | | `m6i.large` | 2 | 8 GB | Steady CPU (no burst credits) | | `m6i.xlarge` | 4 | 16 GB | Steady CPU | | `m6i.2xlarge` | 8 | 32 GB | Steady CPU | | `m6i.4xlarge` | 16 | 64 GB | Steady CPU | | `c6i.xlarge` | 4 | 8 GB | More CPU per GB (heavy APIs) | | `c6i.2xlarge` | 8 | 16 GB | More CPU per GB | | `r6i.xlarge` | 4 | 32 GB | More memory (Redis, cache) | ARM types (Graviton, such as `t4g` and `m7g`) aren't supported for servers: the agent image is x86. ### Sizes on DigitalOcean | Type | vCPU | Memory | Disk | Suggested use | |---|---|---|---|---| | `s-1vcpu-2gb` | 1 | 2 GB | 50 GB | Testing; building small projects | | `s-2vcpu-2gb` | 2 | 2 GB | 60 GB | A few light services | | `s-2vcpu-4gb` | 2 | 4 GB | 80 GB | A complete site (Nest + Vue + Redis) | | `s-4vcpu-8gb` | 4 | 8 GB | 160 GB | Several sites | | `s-8vcpu-16gb` | 8 | 16 GB | 320 GB | Several sites with headroom | | `g-2vcpu-8gb` | 2 | 8 GB | 25 GB | Dedicated CPU | | `g-4vcpu-16gb` | 4 | 16 GB | 50 GB | Dedicated CPU | | `c-2` | 2 | 4 GB | 25 GB | Dedicated CPU, more CPU per GB (heavy APIs) | | `c-4` | 4 | 8 GB | 50 GB | Dedicated CPU, more CPU per GB | | `m-2vcpu-16gb` | 2 | 16 GB | 50 GB | More memory (Redis, cache) | ### Network The **Network** field has three kinds of option: - **Panel automatic network**: the default. The panel creates one network per account and region with the first server, and later servers in the same region join it. - **Panel networks**: networks the panel already created or started using in that account and region. - **Account VPCs** (AWS): a VPC that already exists in your account. The panel starts using it: it gets the panel's firewalls, and nothing else in it changes. The VPC needs a public subnet. Servers on the same network talk over the private network, and managed databases and cache join it. Details in [Private network and firewall](https://ployter.com/en/docs/servers/networking/). ### What is created in your account | | AWS | DigitalOcean | |---|---|---| | Machine | EC2 instance, gp3 disk, IMDSv2 required | Droplet | | Server firewall | Its own security group | Its own firewall, attached by tag | | Static IP | Elastic IP | Reserved IP | The server firewall opens 80 and 443 to the internet, and 22 only with an SSH key. No port is opened for the agent: it connects outward. If creation fails halfway, the panel deletes what it had already created, so nothing is left billing. ## Add a machine of your own In **Where to create**, pick **My own server**, enter a name and click **Add**. The panel shows the install command, which you run on the machine as root. The full walkthrough is in [Use your own server](https://ployter.com/en/docs/integrations/own-server/). ## Server list The **Servers** screen shows each machine with its status, provider, memory and disk usage, number of services and the last time the agent was seen. Servers created by autoscaling have the **Autoscaling** tag and are deleted when the replica goes away. | Status | Meaning | |---|---| | **Creating** | The machine is being created and the agent installed (1 to 3 minutes). | | **Waiting** | Own server added; the install command still needs to run. | | **Online** | The agent is connected. | | **Offline** | No contact with the agent. The machine may be off or without network. Services that were running keep running. | | **Error** | The machine couldn't be created. The screen shows why. | ## Server screen Click a server to see: - **CPU** (with the machine load), **Memory** (with swap), **Disk** and **Containers**. - **Usage over time**: a CPU, memory and disk chart. - The list of the machine's Docker **Containers**, tagged **panel**, or **external** for what the panel didn't create. - **Details**: provider, region, network, type, public IP, private IP, provider ID, static IP, agent version and connection. - **Services** running on the server, including replicas. The **public IP** is the address you point your domains' DNS to. ![Detail screen for server app-1](https://ployter.com/assets/docs/en/servers-detail.webp) ### Actions The **Actions** menu has: - **Rename**. - **Concurrent builds**: how many deploys can build at once on this server (1, 2, 3, 4, 6 or 8). The others wait in line. More concurrent builds finish sooner, but use more memory: on a small server, **1 at a time** avoids taking down what's live. - **New install command**: own servers only. Generates a new token and disconnects the current agent until you run the new command. - **Delete server**. ### Swap If the server has no swap, the screen shows the **Server without swap** notice. Without swap, a build that needs more memory than the server has can make the system kill another service, even the database. Pick the size (1, 2, 4 or 8 GB) and click **Enable swap**. Swap uses part of the disk as extra memory. The install command already creates swap on machines with less than 8 GB of RAM. ### Terminal The **Terminal** button opens a root shell on the machine, in the browser. It appears when the server is online and you have the **Server terminal** permission. - You can stop containers, delete volumes and read every service's data. Panel services are managed by the agent: manual changes to them may be undone on the next deploy. - **Ctrl+Shift+C** copies the selection. - The terminal closes by itself after 30 minutes without typing. - Who opened it, when and from where is logged. What you type isn't recorded. For a shell inside a service's container, use the service terminal. See [Terminal](https://ployter.com/en/docs/services/terminal/). ## Update the agent When a new agent version is available, the server screen shows **Agent v... available** and the **Update agent** button. In the list, a notice counts the outdated servers and offers **Update the N agents**. The bulk update goes through one server at a time and stops at the first one that fails, showing the error. The switch takes a few seconds and doesn't take services down. If the new agent doesn't connect, the old one comes back. Details in [Use your own server](https://ployter.com/en/docs/integrations/own-server/#atualizar-o-agente). ## Delete a server 1. Move or delete the server's services. While it has services, the panel won't let you delete it. 2. Open **Actions → Delete server**. 3. Confirm. What happens depends on where the server is: - **In the cloud**: the machine is destroyed at the provider, along with the disk, static IP and firewall the panel created. There's no undo. - **Own server**: the server is removed from the panel and the agent is disconnected. The machine stays on: shut it down or delete it at your provider. > [!TIP] > If creation failed (**Error** status), delete the server to clean up whatever was created at the provider. --- # Private network and firewall > How the panel sets up the private network and firewalls on AWS, DigitalOcean, Hetzner, Vultr and Linode, how to use an existing VPC and how to remove a network. On AWS, DigitalOcean, Hetzner, Vultr and Linode, the panel puts servers and managed databases in a private network (VPC) in your account and takes care of the firewalls. Servers on the same network talk over private IPs, and managed databases only accept connections from those servers. You don't need to configure anything for this to work. ## How the network is created Each network belongs to one cloud account and one region. When you create the first server in a region, keep the **Panel automatic network** option in the **Network** field: the panel creates the network along with it, named after the provider and region (for example, `AWS Produção sa-east-1`). The next servers and databases in that account and region join the same network. Creating the network adds about 1 minute to the first server. If it fails (for example, due to a missing permission that has since been fixed), the next server tries again. ### On AWS The panel network has: - a VPC with the `10.80.0.0/16` range, away from the default VPC's `172.31.0.0/16`; - two public subnets (`10.80.0.0/20` and `10.80.16.0/20`), one in each zone, for servers; - two private subnets (`10.80.128.0/20` and `10.80.144.0/20`), with no route to the internet, for databases and cache; - an Internet Gateway and the public subnets' route table; - two security groups: the **servers** one, where servers on the network see each other on all ports, and the **resources** one, which accepts TCP only from the network's servers. There's no NAT Gateway: it bills by the hour, and nothing in the private subnets needs to reach the internet. Servers sit in the public subnets, spread across both zones. > [!NOTE] > AWS allows 5 VPCs per region by default. If the account is already at the limit, use an existing VPC or request an increase in **Service Quotas**. ### On DigitalOcean The panel network has: - a VPC in the region, with a range chosen by DigitalOcean (it can't overlap another VPC in the account); - a network firewall, attached by tag, where servers on the network see each other on all TCP and UDP ports. Managed databases and caches join the VPC and accept servers with the network's tag as a trusted source. ### On Hetzner The panel network has: - a private network with a free `10.x.0.0/16` range in the project; - a `/24` subnet in the location's zone (Germany and Finland share a zone; Ashburn, Hillsboro and Singapore each have their own). The Hetzner firewall only filters the public IP: over the private network, servers already talk on every port, with no network firewall. An account network that has no subnet in the zone yet gets one when it is used. ### On Vultr The panel network is a VPC in the location, with a free `10.x.0.0/20` range in the account. The Vultr firewall only filters the public IP: over the VPC, servers already talk on every port. ### On Linode The panel network is a VPC in the location, with a free `10.x.0.0/24` subnet in the account. An account VPC with no subnet gets one when it is used. The Linode firewall also filters the VPC interface, so each server's firewall allows all traffic coming from the subnet. ## Use an existing VPC If you already have a VPC with other systems, you can put the panel's servers in it: 1. In **Servers → New server**, pick the account and region. 2. In the **Network** field, pick the VPC under the **Account VPCs** group. 3. Finish creating the server. The panel starts using the VPC: it gets the panel's firewalls, and nothing else in it changes. On AWS, the VPC needs at least one public subnet, with a `0.0.0.0/0` route to an Internet Gateway, because servers need to reach the internet. VPCs without a public subnet show up disabled, tagged **no public subnet**. ## Firewall for each server Besides the network firewall, each server the panel creates has its own firewall (a security group on AWS, a tag-attached firewall on DigitalOcean, a firewall attached to the server on Hetzner, a firewall group on Vultr, a Cloud Firewall on Linode): | Port | Who can reach it | |---|---| | 80 and 443 | Any IP, for domains and HTTPS | | 22 | Any IP, only if you provided an SSH key when creating the server | | A service's public port | The IPs allowed on the service, or any IP | | A service's SFTP port | The IPs allowed for SFTP | | A service's private access port | Only the private network range | The last three rows come from the services' settings. When you change a service's public access, SFTP or private access, the panel adjusts the cloud firewall right away. Ports 22, 80 and 443 are never touched by these rules. Outbound internet access is open: the agent connects to the API and Docker pulls images. To set up public ports and private access, see [Private access and public ports](https://ployter.com/en/docs/networking/access/). For SFTP, see [Volumes, files and SFTP](https://ployter.com/en/docs/services/volumes-and-files/). > [!WARNING] > On your own server, the panel doesn't control any firewall. Open ports 80 and 443 yourself, plus any public and SFTP ports you turn on for services. See [Use your own server](https://ployter.com/en/docs/integrations/own-server/#firewall). ## View networks Networks show up in **Integrations → Cloud providers**, on each account's card, in the **Networks** section. Each row shows: - the name and region; - **created by the dashboard** or **existing VPC**; - the IP range; - how many servers and databases are in it; - the state: **Creating...**, **Removing...** or the error message. ![Provider card with the Networks section](https://ployter.com/assets/docs/en/networking-provider-networks.webp) On each server's screen, **Details** shows the network and the **Private IP**. Older servers, created before networks existed, show **Account default VPC**. ## Remove a network 1. First delete the network's servers. The trash icon only appears on a network with no servers. 2. Also delete the network's managed databases. If the project has a load balancer, wait for it to go away by itself: that happens when no service with replicas and a domain uses the network anymore. 3. Click the trash icon next to the network (**Remove network**). 4. For a network created by the panel, type the network name to confirm and click **Remove**. What leaves your account: - **Panel network on AWS**: the VPC, subnets, gateway and firewalls the panel created. - **Panel network on DigitalOcean**: the VPC and the network firewall. - **Panel network on Hetzner**: the private network. - **Panel network on Vultr or Linode**: the VPC. - **Existing VPC**: only the panel's firewalls. The VPC stays in the account, unchanged. ![Remove network confirmation](https://ployter.com/assets/docs/en/networking-remove-network.webp) --- # Projects and services > How to organize a system into a project and services, create each service and understand the service screen. A **project** groups the services of a system: the front end, the API, the worker, Redis, the database. Each **service** is a container that runs on one of your servers, with code from GitHub or a ready-made Docker image. Services in the same project see each other by name, on an internal network of their own. ## Create a project 1. In the menu, open **Projects → All projects** and click **New project**. 2. Give it a name (for example, `loja`). 3. In **Identifier**, leave it blank to generate one from the name, or type one (e.g. `loja`). It goes into the container and network names, and it can't change later. 4. Click **Create project**. Each project gets its own internal network, called `infra-` (in the example, `infra-loja`). It shows in the project header. > [!NOTE] > The number of projects depends on your plan (the `projects` limit). See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## Create a service Inside the project, click **New service**. In **What will run**, choose the type: | Option | What it creates | | --- | --- | | **Git repository** | A service built from a GitHub, GitLab or Bitbucket repository (Node, PHP, Python, Go...). See [Build](https://ployter.com/en/docs/services/builds/). | | **Ready-made apps** | An app that is already configured, with a volume and generated passwords: WordPress, Ghost, n8n, Uptime Kuma, Metabase, Gitea, Vaultwarden, Mailpit, MongoDB, RabbitMQ, MySQL. | | **Docker image** | Any public image. The search uses Docker Hub and suggests volumes for the image's data folders. | | **HTML site** | Caddy serving static files, with a volume at `/usr/share/caddy`. You upload the files in the **Files** tab. | | **PHP site** | PHP 8.3 + Apache, with a volume at `/app`, no build. | | **Redis**, **MySQL**, **PostgreSQL**, **MongoDB** | A database in a container with a volume and a generated password. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). | Then fill in: - **Name**: the panel shows the internal address the other services will use (e.g. `api:3000`). - **Server**: where the service runs. **Choose later** leaves the service without a server (it won't deploy until you pick one in **Settings**). - **Repository**, **Branch** and **Folder (monorepo)**, for repository services. With GitHub, GitLab or Bitbucket connected, you pick the repository from a list, grouped by account. Without one, use **Paste a public repository URL**. - **Port**: the port your application listens on (e.g. `3000`). It is required for domains and the health check. Check **Run the first deploy now** to start the service right away, and click **Create service**. ![New service modal with the GitHub option selected and the acme/loja repository](https://ployter.com/assets/docs/en/projects-and-services-create-modal.webp) > [!TIP] > To link a private repository or deploy on every push, first connect [GitHub](https://ployter.com/en/docs/integrations/github/), [GitLab](https://ployter.com/en/docs/integrations/gitlab/) or [Bitbucket](https://ployter.com/en/docs/integrations/bitbucket/). ## The project screen The project screen shows one card per service, with its status, domains, server and the cost estimate for the month. Below them are the project's managed databases and buckets. ![loja project with the web, api, worker and mysql services](https://ployter.com/assets/docs/en/projects-and-services-project-view.webp) At the top you find: - **New service**, **Database or bucket** and **Database manager**. - The **⋮** menu with **Rename**, **Save as template** and **Delete project**. When one or more services have saved changes that are not live yet, a bar shows the number of pending services and the **Deploy all** button. ## The service screen Click a service to open its screen. The header shows: - The status (live, deploying, stopped, failed, crashed). - The stack detected in the build (e.g. Next.js) and whether the build uses a Dockerfile. - The repository and branch, or the image. - The server, or the number of replicas. - The cost estimate for the month, for people who can see costs. - The internal address, for example `api:3000`. The header buttons: - **Deploy**: runs a new deploy. It is disabled while the service has no server. - **Restart**: restarts the live container, with no build and without changing variables. - **Stop**: removes the container and takes the service offline. Volumes and configuration stay. To bring it back, run a deploy. ![web service screen with the header and tabs](https://ployter.com/assets/docs/en/projects-and-services-service-header.webp) The tabs depend on the service type and on your role in the team: | Tab | What it's for | | --- | --- | | **Deploys** | History, build logs and rollback. See [Deploys](https://ployter.com/en/docs/services/deployments/). | | **Logs**, **Metrics**, **Requests** | See [Logs, metrics and requests](https://ployter.com/en/docs/observability/monitoring/). | | **Variables** | See [Variables](https://ployter.com/en/docs/services/variables/). | | **Network** | Domains, maintenance and access. See [Domains and HTTPS](https://ployter.com/en/docs/networking/domains/) and [Private access and public ports](https://ployter.com/en/docs/networking/access/). | | **Volumes** and **Files** | See [Volumes, files and SFTP](https://ployter.com/en/docs/services/volumes-and-files/). | | **Processes** and **Commands & cron** | See [Processes, scheduled jobs and commands](https://ployter.com/en/docs/services/processes-and-cron/). | | **Terminal** | See [Terminal](https://ployter.com/en/docs/services/terminal/). | | **File Manager** | The container's configuration files (php.ini, Nginx, Caddyfile). See [Service settings](https://ployter.com/en/docs/services/settings/#php-e-arquivos-de-configuracao). | | **Database** and **Backups** | Only for databases in a container. See [Databases as a service](https://ployter.com/en/docs/databases/databases/) and [Backups](https://ployter.com/en/docs/databases/backups/). | | **Settings** | See [Service settings](https://ployter.com/en/docs/services/settings/). | ## Pending changes Almost everything you change in a service (variables, port, domains, processes, volumes) is saved and only takes effect on the next deploy. Until then, the service screen shows the **Apply 1 change** bar (or **Apply N changes**). Click **Details** to see what changed and **Deploy** to apply it. ## How services talk to each other On the project's internal network, each service answers by its internal name (the service identifier). The API reaches the database at `mysql:3306` and Redis at `redis:6379`, without exposing anything to the internet. To avoid typing addresses and passwords by hand, use references in variables, such as `${{mysql.MYSQL_URL}}`. See [Variables](https://ployter.com/en/docs/services/variables/#referencias-entre-servicos). > [!NOTE] > The internal network exists inside each server. Services in the same project on different servers can't see each other through it. To connect servers, see [Private network and firewall](https://ployter.com/en/docs/servers/networking/) and [Private access](https://ployter.com/en/docs/networking/access/#acesso-privado). ## Rename and delete a project - **Rename**: in the **⋮** menu, click **Rename**. The identifier doesn't change. - **Delete**: in the **⋮** menu, click **Delete project**. First, stop all services and delete the managed databases and buckets (they live in your cloud account and keep billing). The project, services, variables, domains and deploy history are removed from the panel. Volumes with data stay on the servers. --- # Build: Dockerfile, Railpack and image > How Ployter produces your service's image, from GitHub or from a ready-made Docker image. Every service runs a Docker image. It comes from one of these paths: a build of your GitHub repository (automatic with Railpack, or with your Dockerfile) or a ready-made image from a registry. The build runs on the service's own server, and the image stays in the local Docker, with no registry in between. ## Choose the source Open the service, go to **Settings** and, under **Source**, choose **GitHub** or **Image**. ![Source and Deploy section in the web service's Settings tab](https://ployter.com/assets/docs/en/builds-settings-source.webp) ### GitHub | Field | What it is | | --- | --- | | **Repository** | The repository URL, e.g. `https://github.com/acme/loja`. | | **Branch** | The branch that goes live, e.g. `main`. | | **Credential** | The GitHub credential used to clone. **None (public)** only works for public repositories. | | **Folder (monorepo)** | The service's folder inside the repository, e.g. `apps/api`. Blank means the root. | | **Deploy on every push** | Turns on automatic deploys when there is a push to the branch. | With **Deploy on every push** turned on, each push to the branch triggers a deploy. With the GitHub App, this works with nothing to configure. With a token, the panel creates the webhook in the repository for you, and the token needs webhook permission: the `admin:repo_hook` scope on a classic token, or **Webhooks: Read and write** on a fine-grained one. See [Connect GitHub](https://ployter.com/en/docs/integrations/github/). > [!NOTE] > If the panel can't create the webhook (token without permission, repository from another account), it shows a warning when you save. Manual deploys keep working. ### Image Enter the image with its tag, e.g. `redis:7-alpine` or `mysql:8.4`. On every deploy the server pulls the image again. > [!NOTE] > The panel doesn't store registry logins: the image must be public. ## Automatic build (Railpack) With **Automatic (Railpack)**, the server analyzes the code and builds the image on its own. Railpack recognizes the language and framework (Node, PHP, Python, Ruby, Go and others) and decides the install, build and start command. In the **Deploy** section of the **Settings** tab, under **Image build**, you can replace each phase with your own script: - **Install**: blank means automatic (e.g. `npm install`, `composer install`). Filled in, it runs your script, one command per line. - **Build**: blank means automatic (e.g. `npm run build`). Filled in, it runs your script. - **Start**: blank uses the detected command. Fill it in to change it, e.g. `node dist/main.js`. After the first build, each blank phase shows what the automatic build runs, under **Automatic runs:**. Some details of the automatic build: - **Node**: the build gets more memory than Node's default: up to 60% of the server's memory, capped at what is free, between 1 GB and 8 GB, so large Next.js, Vite or TypeScript builds don't die with "heap out of memory". If you set `NODE_OPTIONS` in the variables, yours wins. - **PHP**: the extensions required by the `composer.json` dependencies are added automatically. For others, use the `RAILPACK_PHP_EXTENSIONS` variable (e.g. `gd,intl`). - **Variables**: the service's variables are passed to the build. This is needed for variables read at build time, such as `NEXT_PUBLIC_*` in Next.js. > [!TIP] > If the repository has a `Dockerfile` and the build is set to automatic, the panel warns you in **Settings** and in the build log. To use it, choose **Dockerfile**. ## Build with a Dockerfile Choose **Dockerfile** under **Image build** and fill in: - **Dockerfile path**: relative to the service's folder (or to the **Folder (monorepo)**). Default: `Dockerfile`. - **Start**: blank uses the Dockerfile's `CMD`. Filled in, it runs with `/bin/sh -c` in place of the image's `ENTRYPOINT`/`CMD`. The service's variables reach the build in two ways: - As `ARG`, only where the Dockerfile declares an `ARG` with the same name. - As a BuildKit secret, so you can use it without leaving the value in the image. ```dockerfile FROM node:22-alpine WORKDIR /app # As ARG: the value is available in this stage ARG NEXT_PUBLIC_API_URL COPY package*.json ./ # As secret: the value is not written to any layer RUN --mount=type=secret,id=NPM_TOKEN \ NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) npm ci COPY . . RUN npm run build CMD ["npm", "start"] ``` ## Shared build When several services use the same repository (for example, several sites with the same code and different variables), one of them can run the build and the others deploy the same image. 1. Open the service that will **use** the image and go to **Settings**. 2. In the **Shared build** card, under **Use the build from**, choose the service that runs the build. 3. Click **Save**. From then on: - A push to the repository doesn't build the follower service. It deploys together with the source service, after that service's build goes live. - The follower's **Deploy** button runs its own build, for that service only, with the latest commit in the repository. It stays on that version until the next build of the source service, which updates it again. Meanwhile, the card shows that the service is on its own build. - Redeploying, rolling back or changing variables on the source service doesn't touch the followers: only a new build of the source updates them all. - Each service keeps its own variables. > [!NOTE] > Shared builds only work between services on the same server, and aren't available for services with replicas. ## Upload the local folder with the CLI To deploy code from your machine without going through GitHub, run `ployter up` in the project folder. The CLI compresses the folder (without `node_modules`, `.git` and whatever `.gitignore` excludes) and the server builds it as if it came from the repository. ```bash npx @ployter/cli up --project loja --service web ``` The package can be up to 300 MB compressed. If it is larger, check your `.gitignore` or create a `.ployterignore`. This only applies to services with a build (GitHub source) that don't use another service's build. See [CLI](https://ployter.com/en/docs/cli/cli/). ## Build queue on the server Builds compete for the server's memory. Each server has a limit of concurrent builds (the default is 1). Deploys over the limit stay **Queued**, with the reason on the deploy card, and run in the order they arrived. A new request for the same service replaces the one still waiting in the queue. Before each build, if disk space is low, the server clears the build cache. The next build is a little slower, but it doesn't fail for lack of space. ## When the build fails The deploy shows as **Failed** in the **Deploys** tab. Click **View logs** to see the full build output. The panel highlights the BuildKit error line at the top of the deploy. If AI diagnosis is available, the diagnosis button appears next to the error message. See [AI diagnosis](https://ployter.com/en/docs/observability/ai-diagnosis/). --- # Deploys, rollback and release command > How a deploy works and how to follow it, cancel it, roll back to an earlier version and run migrations before the switch. Each deploy builds a new image and replaces the service's container. There's no cache to clear and no process to reload: what is live is always a whole image. The **Deploys** tab shows the deploy in progress, what is live and the history. ## Run a deploy A deploy starts in one of these ways: - The **Deploy** button at the top of the service screen. - A push to the service's branch, with **Deploy on every push** turned on. See [Build](https://ployter.com/en/docs/services/builds/#github). - The **Deploy** button in the pending changes bar, or **Deploy all** on the project screen. - The CLI: `ployter deploy` or `ployter up`. See [CLI](https://ployter.com/en/docs/cli/cli/). The service needs a server. Without one, the **Deploy** button is disabled and the screen asks you to choose one in **Settings**. ### Schedule a deploy To deploy later (for example, outside peak hours), click the calendar button next to **Deploy**. Pick the date and time, or one of the shortcuts (**In 1 hour**, **Tonight at 11 PM**, **Tomorrow at 3 AM**), and click **Schedule**. ![Schedule deploy window with one deploy waiting](https://ployter.com/assets/docs/en/deploy-schedule.webp) At the set time, the panel deploys the latest version of the branch, like the **Deploy** button, on behalf of whoever scheduled it. In the history, it shows as **Scheduled**. A dot on the calendar button shows there's a deploy waiting; you can **Cancel** it in the same window. - You can schedule from 1 minute to 30 days ahead, with up to 5 schedules waiting per service. - If whoever scheduled it leaves the team or loses the deploy permission, the schedule doesn't run and shows as **Didn't run**, with the reason. ## The deploy steps The deploy follows the order shown in **Settings → Deploy**: 1. **Image build**: clones the repository at the pushed commit (or the latest on the branch) and builds the image. For a service with a ready-made image, the server only pulls the image. 2. **Before switching versions**: runs the release command (migrations or your script), if there is one. 3. **Version switch**: starts the new container, waits for it to be up and only then removes the old one. Extra processes (queues, workers) start with the new version too. Being up means: - With a **Health check** configured: the path (e.g. `/health`) responds successfully on the service's port. The server waits up to 2 minutes. - Without a health check: the container keeps running for a few seconds without crashing. If the new container doesn't come up, the deploy fails and the previous version stays live. > [!WARNING] > A service with a volume, or with a public or private port published on the server, stops the old version before starting the new one. In those cases the deploy has a few seconds of downtime. ## Follow a deploy In the **Deploys** tab, each deploy shows in a card with its status, who triggered it, the commit and the duration. Click **View logs** to open the live log. ![Deploys tab of the web service with a deploy in progress and the history](https://ployter.com/assets/docs/en/deployments-tab.webp) The possible statuses: | Status | Meaning | | --- | --- | | **Queued** | Waiting for the server (build limit) or for another deploy of the same service. The reason shows on the card. | | **Building** | Cloning and building the image. | | **Deploying** | Running the release and starting the container. | | **Active** | It is the live version. | | **Failed** | The build, the release or the health check failed. The error shows at the top of the log. | | **Cancelled** | Cancelled by someone or replaced in the queue by a newer request. | | **Replaced** | It was live and was replaced by a newer deploy. | | **Crashed** | The live version crashed and the server is trying to start it again. | | **Stopped** | The service was stopped. Run a deploy to bring it back. | ![Modal for deploy #128 with the build log](https://ployter.com/assets/docs/en/deployments-log-modal.webp) When a deploy fails and AI diagnosis is available, the modal shows the diagnosis button next to the error. See [AI diagnosis](https://ployter.com/en/docs/observability/ai-diagnosis/). ## Cancel a deploy While the deploy is **Queued**, **Building** or **Deploying**, the card shows **Cancel** (or **Remove from queue**). In the log modal, use **Cancel deploy**. The server stops the build, the download, the release or the health check and undoes whatever was started. Once the version switch starts, you can no longer cancel. > [!NOTE] > A deploy of a service with replicas can't be cancelled midway, because each server is at a different step. ## Rollback: go back to an earlier version 1. In the **Deploys** tab, open **History**. 2. On the deploy you want back, open the **More actions** menu and click **Roll back to this version**. 3. Confirm with **Roll back**. A rollback starts that deploy's image again, with no build. You can only roll back to a deploy that actually went live. > [!WARNING] > A rollback uses the **current** variables and domains. The history doesn't keep a copy of the variables. Images built on the server take up disk space. The server keeps the 5 most recent images of each service. For versions older than that, run a new deploy of the commit. Services with a ready-made image (Docker Hub) can roll back to any version, because the server pulls the image again. ### Automatic rollback On by default for every service, under **Settings → Automatic rollback**. The panel goes back on its own to the last version that was working in two cases: - **The deploy took the service down.** A service with a volume or public port stops the old version before starting the new one. If the new one fails the health check, nothing is left running: the panel starts the previous version again. - **The new version went down right after.** It passed the health check but went down twice (error or out of memory) in the first 10 minutes. For other services, a failed deploy takes nothing down: the previous version stays up until the new one passes the health check. The automatic rollback shows up in the deploy history with the origin **Automatic rollback** and in **Metrics → Events**. Whoever gets deploy notices receives an email with the reason. It never chains: if the previous version also fails, the panel stops and lets you know. ![Automatic rollback option in the service settings](https://ployter.com/assets/docs/en/auto-rollback-setting.webp) ## Restart with the current variables On the deploy card, the **More actions** menu has **Restart**. It starts that deploy's image again with the current variables, port and domains, in seconds and with no build. Use it to: - Apply new variables without waiting for a build. - Retry a deploy that failed after the build (database down, wrong variable). - Start a crashed version again. > [!NOTE] > The **Restart** button at the top of the screen is different: it only restarts the live container, with the same variables. > [!TIP] > Variables read at build time (such as `NEXT_PUBLIC_*` in Next.js) are baked into the image. To change them, run a full **Deploy**. ## Release command (migrations) The release command runs with the new image, in a separate container, before the switch. If it fails, the deploy is cancelled and nothing changes on the live version. 1. Open **Settings** and go to **Before switching versions**. 2. Choose an option: - **Nothing**: runs nothing. - **Migrations**: runs the migrations command for the framework detected in the build. - **Custom script**: runs your script, one command per line. 3. Click **Save**. It applies from the next deploy. With **Migrations**, the command depends on the framework: | Framework | Command | | --- | --- | | Laravel | `php artisan migrate --force` | | Symfony | `php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration` | | Django | `python manage.py migrate --noinput` | | Rails | `bundle exec rails db:migrate` | | AdonisJS | `node ace migration:run --force` | | Phoenix | `mix ecto.migrate` | For other frameworks (such as Prisma or TypeORM on Node), use **Custom script**. The script runs with `/bin/sh`. To stop at the first error, start with `set -e`: ```bash set -e npx prisma migrate deploy ``` ![Before switching versions section with Custom script filled in](https://ployter.com/assets/docs/en/deployments-release-script.webp) ## Deploys with replicas With the service on several servers (AWS or DigitalOcean), the deploy updates one server at a time. The card shows the progress of each replica (e.g. **Replica 1 of 2 (app-1)**). See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ## How long the history is kept Deploys stay in the history and rollback keeps working. Each deploy's log is deleted after your plan's history period (the `history_days` limit). See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). --- # Variables and shared variables > How to set environment variables, reference other services and databases, and reuse variable sets across services. The service's environment variables are stored encrypted and go into the container on each deploy. You can write fixed values, reference variables from other services in the project and attach variable sets shared by the team. ## Edit the service's variables Open the service and go to the **Variables** tab. There are two editing modes, in the corner of the **Environment variables** card: - **List**: one variable per row. To add one, type the **NAME** and the value and click **Add**. To change one, use the pencil; to delete it, the trash can. - **.env**: the whole file, in `NAME=value` format, one per line. Lines with `#` are ignored. **Save all** replaces everything: whatever is no longer in the text is removed. ```env NODE_ENV=production APP_URL=https://loja.com.br # Reference to the project database DATABASE_URL=${{mysql.MYSQL_URL}} ``` ![Variables tab of the api service in List mode](https://ployter.com/assets/docs/en/variables-list.webp) Names accept uppercase letters, numbers and `_`. Values show blurred: click to see them. > [!NOTE] > Variable changes apply from the next deploy. To apply them without a build, use **Restart** in the **More actions** menu of the live deploy. See [Restart with the current variables](https://ployter.com/en/docs/services/deployments/#reiniciar-com-as-variaveis-de-agora). ### Variables the panel sets - `PORT`: with the **Port** set in **Settings**, the container gets `PORT` with that value, unless you set `PORT` in the variables. - The variables created along with the service (for example, `MYSQL_ROOT_PASSWORD` and `MYSQL_URL` for MySQL) show in the list and can be edited. ## References between services To use a value from another service in the project, write a reference in the value. When you type `${{` in the field, the panel suggests the services and variables. | Reference | Value at deploy time | | --- | --- | | `${{NAME}}` | Another variable of the same service. | | `${{mysql.MYSQL_URL}}` | The `MYSQL_URL` variable of the `mysql` service. | | `${{redis.INFRA_HOST}}` | The internal address of the `redis` service (its internal name). | | `${{redis.INFRA_PORT}}` | The port of the `redis` service. | | `${{pg.DATABASE_URL}}` | A connection variable of the project's `pg` managed database. | The prefix is the internal name of the service (or managed database), not its display name. It shows in **Settings**, under **Internal address**. The value is built on the deploy of the service using it. If the MySQL password changes, the API's next deploy already gets the new connection URL. A reference can point to another one, up to 5 levels. In the list, references show with the **reference** tag. If the referenced service doesn't exist in the project, **service not found** shows up, and the reference becomes empty text at deploy time. > [!NOTE] > The internal network connects services on the same server. A reference to `INFRA_HOST` of a service on another server won't connect. ### Connect a database in a container to another service In the **Variables** tab of a database in a container (MySQL, PostgreSQL, Redis, MongoDB), the **Connect another service** card builds the reference for you: 1. Under **Choose the service**, select who will use the database (e.g. `api`). 2. Click **Add MYSQL_URL to it** (for PostgreSQL, `DATABASE_URL`; for Redis, `REDIS_URL`; for MongoDB, `MONGO_URL`). 3. Deploy the chosen service. ## Automatic variables (legacy link) Services linked to a managed database the old way get automatic variables at deploy time, without them showing in the list. They keep working. Under **Automatic variables (legacy link)**, the **Convert to variables** button creates the same variables in the list, referencing the database. A variable in the list with the same name wins over the automatic one. ## Shared variables Variables that repeat across several services (SMTP, API keys, Sentry) can live in a team **set**. ### Create a set 1. In the menu, open **Projects → Shared variables**. 2. Click **New set**, give it a name (e.g. `smtp`) and, if you want, a description. 3. Click **Create**. 4. On the set screen, write the variables in `NAME=value` format and click **Save**. Set variables also accept references such as `${{mysql.MYSQL_URL}}`. They are resolved on the deploy of each service that uses the set. ![smtp set screen with its variables and the services that use it](https://ployter.com/assets/docs/en/variables-set-view.webp) ### Use a set in a service 1. In the service's **Variables** tab, scroll down to **Shared variables**. 2. Choose the set in **Add set...** and click **Add**. 3. Adjust the order with **Move up** and **Move down**, and click **Save**. When the same name shows up in more than one place: - The lower set wins over the one above it. - The service's own variable wins over all sets. Under **Inherited**, the panel lists the names that come from the sets. A struck-through name is set on the service, and the service's value wins. ![Shared variables card on the api service with two sets](https://ployter.com/assets/docs/en/variables-sets-card.webp) ### Change a set in use After you save a set, the panel shows how many services use it. Click **Restart all** to start the live version of each one again, with no build, with the new variables. To delete a set, first remove it from every service that uses it. ## Who can view and edit - People with the **View variable values** permission see the values. Without it, the panel shows only the names. - People with **Edit variables** create, change and remove variables and sets. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). ## From the CLI The CLI reads and writes the variables of the service linked to the folder: ```bash ployter env # list ployter env pull .env # download to a file ployter env set APP_DEBUG=false LOG_LEVEL=info ployter env unset APP_DEBUG ``` See [CLI](https://ployter.com/en/docs/cli/cli/). --- # Processes, scheduled jobs and commands > How to run queues and workers alongside the application, schedule jobs with cron and run one-off commands with the live image. Besides the main process, which serves the domain, a service can run other commands with the same image and the same variables: processes that stay up all the time (queues, workers), scheduled jobs (cron) and one-off commands (migrations, maintenance scripts). These tabs show up on application services. A database in a container has no **Processes** or **Commands & cron** tab. ## Extra processes An extra process is one more container, with the same image and variables as the application, but with a different command and no domain. Use it for queues, workers and schedulers. ### Add a process 1. Open the service and go to the **Processes** tab. 2. Click **Add process**, or one of the suggestions for the detected framework. 3. Fill in: - **Name**: lowercase letters, numbers and hyphens (e.g. `worker`). It goes into the container name. - **Command**: runs with `/bin/sh -c`, in place of the application's start command. It must keep running; it can't exit. - **Instances**: how many copies of the process (from 1 to 20). - **CPU** and **Memory**: optional limits. 4. Click **Save**. 5. Run a deploy. Processes start from the next deploy. ![Processes tab of the api service with the worker process running](https://ployter.com/assets/docs/en/processes-and-cron-processes.webp) Suggestions the panel offers, by framework: | Framework | Processes | | --- | --- | | Laravel | `queue` (`php artisan queue:work`), `scheduler` (`php artisan schedule:work`), `horizon` | | Symfony | `messenger` | | Django | `celery`, `beat` | | Flask, FastAPI | `celery` | | Rails | `sidekiq` | | AdonisJS | `queue` | For a Node app, write your worker's command, for example `node dist/worker.js`. ### How processes follow the deploy - On each deploy, the processes start with the new version and only switch versions once they are up. It is the equivalent of "restarting the queues". - If a process crashes right after starting, the deploy is cancelled and the previous version stays. - The **On the server** column shows the real state: **running**, **restart loop** or **not running**. - A removed process keeps running until the next deploy. Each process's menu has **View logs** and **Open terminal**, which open the **Logs** and **Terminal** tabs already on that process. > [!NOTE] > With replicas, extra processes run only on the primary server. ## Run a one-off command The **Commands & cron** tab runs a command once, in a new container with the live version's image, the current variables and the project network. The command sees the database just like the application does, and it doesn't touch the container serving the site. 1. Open the service and go to the **Commands & cron** tab. 2. Under **Run command**, type the command (e.g. `npx prisma migrate status`). 3. Choose the **Max time**: up to 1 min, 5 min, 30 min or 2 h. 4. Click **Run**. The output shows live. To stop it, click **Stop**. Variable values show as `***` in the output. The service needs a live version. Without a deploy, there's no image to run. > [!TIP] > From the CLI: `ployter run "php artisan migrate --force"`. See [CLI](https://ployter.com/en/docs/cli/cli/). ## Scheduled jobs A scheduled job is a cron in the panel: at each scheduled time, the command runs in a new container, just like **Run command**. If the previous run hasn't finished yet, that time is skipped. ### Create a job 1. In the **Commands & cron** tab, under **Scheduled jobs**, click **New job**. 2. Fill in: - **Name**: e.g. `Clean carts`. - **Command**: e.g. `node dist/jobs/clean-carts.js`. - **When it runs**: pick the frequency (**Every X minutes**, **Every X hours**, **Every day**, **Weekdays**, **Once a week**, **Once a month**) and fill in the time. If you know cron, use **Custom (cron)**, with the five fields. - **Time zone**: the expression's times follow this time zone. The default is `America/Sao_Paulo`. - **Max time**: from 1 min to 24 h. - **Active**: uncheck it to create the job paused. 3. Click **Save**. Below the time, the form shows how it reads in plain language and the cron expression. In **Custom (cron)**, the five fields are minute, hour, day, month and day of the week: ```text */15 * * * * every 15 minutes 0 3 * * * every day at 03:00 30 8 * * 1 every Monday at 08:30 0 0 1 * * the 1st of every month, at midnight ``` ![New scheduled job modal set to Every day at 03:00](https://ployter.com/assets/docs/en/processes-and-cron-new-job.webp) Each job's menu has: **Run now**, **View runs**, **Pause** (or **Resume**), **Edit** and **Remove**. > [!TIP] > In Laravel, a `* * * * *` job with `php artisan schedule:run` covers the whole scheduler. Another option is the `scheduler` process in **Processes**. ## Run history The **Runs** card lists one-off commands and job runs, with status, duration and who triggered them. Filter by **All**, **One-off commands only** or by job. Click a row to see the full output, the server, the start time, the duration and the exit code. The statuses: **Queued**, **Running**, **Succeeded**, **Failed** and **Timed out**. The history keeps 14 days. ## Permissions - **Run commands and scheduled jobs** lets you run commands and create, edit and pause jobs. - **View logs** lets you see the history and the output of runs. - **Edit service configuration** lets you change extra processes. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Volumes, files and SFTP > How to keep data that survives deploys, work with files from the browser and allow SFTP access. A service's container is recreated on every deploy. Anything it writes outside a volume disappears on the next deploy. A **volume** is a folder stored on the server and mounted inside the container: database data, user uploads, the files of a site with no build. ## Add a volume 1. Open the service and go to the **Volumes** tab. 2. Type a short name (e.g. `uploads`) and the **Folder in the container** (e.g. `/app/public/uploads`). 3. Click **Add**. 4. Run a deploy. The volume applies from the next deploy. The table shows the folder in the container and the volume name on the server, in the format `infra---` (e.g. `infra-loja-web-uploads`). ![Volumes tab of the web service with a volume at /app/public/uploads](https://ployter.com/assets/docs/en/volumes-and-files-volumes.webp) When you create a database in a container, a ready-made app or an HTML/PHP site, the panel creates the right volume for you (e.g. `/var/lib/mysql` for MySQL). > [!WARNING] > A service with a volume stops the old version before starting the new one. The deploy has a few seconds of downtime. ### Remove a volume Click **Remove** on the volume's row. The service stops mounting the folder on the next deploy. Removing it here **does not delete** the data on the server. ### Volumes and replicas A service with replicas doesn't use volumes: each server would have a different copy of the data. Store files in a bucket and data in a database. See [Buckets](https://ployter.com/en/docs/databases/buckets/) and [Managed cloud databases](https://ployter.com/en/docs/databases/managed/). ## Manage files from the browser The **Files** tab shows up when the service has at least one volume. It shows only the service's volumes, and each change takes effect immediately, with no deploy. > [!NOTE] > A database in a container has no **Files** tab: changing the files of a running database corrupts the data. What you can do: - Browse the folders. With more than one volume, the root lists each volume as a folder. - **New file** and **New folder**. Use `/` in the name to create subfolders. - **Upload files** and **Upload folder**, or drag files and folders onto the list. - Open a text file in the editor and save it. The editor opens UTF-8 files up to 2 MB. - In each item's menu: **Edit**, **Open**, **Download**, **Rename**, **Copy to...**, **Move to...** and **Delete**. - On a `.zip`, **Extract here**. An uploaded `.zip` stays as is until you extract it. ![Files tab of the web service with the uploads folder open](https://ployter.com/assets/docs/en/volumes-and-files-files.webp) The list shows up to 2,000 items per folder. For larger folders, use the [Terminal](https://ployter.com/en/docs/services/terminal/) or SFTP. ### Change history Click **History** to see who created, uploaded, edited, moved or deleted each file, and who turned SFTP on or off or viewed its password. ## SFTP access SFTP opens the service's volumes to a client such as FileZilla, WinSCP or your editor. The server starts a container with SFTP, with the same volumes, on its own port (between 2201 and 2299). Uploaded files get the same owner as the application. ### Turn on SFTP 1. In the **Files** tab, click **SFTP**. 2. Under **Who can connect**, keep **Allowed IPs only** and add your IP (the **My IP** button fills it in). 3. Click **Enable SFTP**. The modal then shows the address, the **Server (host)**, the **Port**, the **Username** and the **Show password** button. ![SFTP access modal turned on, with address, port and username](https://ployter.com/assets/docs/en/volumes-and-files-sftp.webp) ### Connect with FileZilla 1. Copy the full address, in the format `sftp://user@host:port`. 2. In FileZilla, paste it into the **Host** field and enter the password. With `sftp://` in front, it uses the SFTP protocol right away. 3. Each volume shows as a folder at the root. ### Change IPs, password or turn it off - **Save IPs**: applies the new list immediately. Anyone connected is dropped. - **Generate new password**: the current password stops working immediately. - **Apply again**: starts the SFTP container again, if it is stopped. - **Disable**: closes the port. The files stay on the volume. Viewing the password is recorded in the **Files** tab history. > [!WARNING] > With **Any IP**, any address on the internet can try the password. Prefer allowing only the IPs you use. > [!NOTE] > On an AWS or DigitalOcean server, the panel opens the port in the cloud firewall only for the allowed IPs. On your own server, the panel doesn't touch the firewall: open the SFTP port in the machine's or provider's firewall. With an up-to-date agent, SFTP itself also rejects IPs outside the list. See [Use your own server](https://ployter.com/en/docs/integrations/own-server/). ### Requirements - SFTP is a plan feature (`sftp`). See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). - The service must have a volume and a server. - The server agent must be up to date. If it isn't, the modal shows the minimum version. - To delete the service, turn off SFTP first. ## Permissions The **Files** tab and SFTP require the **Manage files** permission. Volumes require **Edit service configuration**. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Terminal > How to open a shell inside the service's container from the browser, and what gets recorded. The **Terminal** tab opens a shell inside the running container, right in the browser, with no SSH. Use it to investigate a problem, check files or run a quick command. ## Open the terminal 1. Open the service and go to the **Terminal** tab. 2. The terminal connects to the application container on its own. 3. To enter an extra process (e.g. `worker`), choose **Process: worker** in the selector at the top. **Application** goes back to the main container. 4. With replicas, also choose the server in the selector. ![Terminal tab of the api service connected to the application container](https://ployter.com/assets/docs/en/terminal-tab.webp) The shell runs as the image's user. The buttons at the top: - **New session**: opens another session in place of the current one. - **Connect** and **Reconnect**: reconnect after the session ends. To copy selected text, use `Ctrl+Shift+C`. > [!WARNING] > A file changed through the terminal disappears on the next deploy, unless it is on a volume. To change configuration permanently, use the **File Manager** tab or a volume. See [Service settings](https://ployter.com/en/docs/services/settings/#php-e-arquivos-de-configuracao) and [Volumes, files and SFTP](https://ployter.com/en/docs/services/volumes-and-files/). > [!TIP] > To run a command with its output kept in the history (migrations, scripts), use **Commands → Run command** instead. It runs in a new container and doesn't touch the one serving the site. See [Processes, scheduled jobs and commands](https://ployter.com/en/docs/services/processes-and-cron/#rodar-um-comando-avulso). ## When the session closes The session ends when: - You type `exit` or close the browser tab. - 30 minutes pass without typing. - The server goes offline or the agent disconnects. - Someone removes your terminal permission. If the image has no shell (minimal images, such as `distroless` ones), the terminal doesn't open. ## Recent sessions Below the terminal, **Recent sessions** lists who opened it, where (application or process, and the server), the start time, the duration and why it ended. The panel records who opened the terminal, when and where. What is typed isn't recorded. ## Requirements - The service must be on a server and have a running container. - The server agent must be up to date. If it isn't, the tab shows the minimum version. Update it in **Servers**. See [Servers](https://ployter.com/en/docs/servers/servers/). - The tab shows up for people with the **Open terminal** permission. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). From the CLI, `ployter shell` opens the same terminal. See [CLI](https://ployter.com/en/docs/cli/cli/). The terminal for the whole server (outside the containers) is on the server screen. See [Servers](https://ployter.com/en/docs/servers/servers/). --- # Service settings > What each field in the Settings tab does, how to adjust PHP and configuration files, turn on maintenance mode and delete a service. The **Settings** tab brings together the name, the servers, the code source, the deploy steps and the container's resources. Almost everything you save here applies from the next deploy. Until you save, the footer shows **Unsaved changes · they apply from the next deploy**, and after you save, the screen shows the pending changes bar. ![Settings tab of the web service, General and Runtime sections](https://ployter.com/assets/docs/en/settings-tab.webp) ## General - **Name**: the display name. The **Internal address** (the identifier, e.g. `web`) doesn't change, because other services may use it. - **Servers**: where the service runs. Select one server to run on a single one. When you select 2 or more AWS or DigitalOcean servers, all from the same provider, the service gets replicas behind a load balancer. The first one selected is the primary. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). Rules for changing servers: - To change the server of a service running on a single server, stop the service first (**Stop** at the top). - Hetzner, Vultr and Linode servers and your own servers have no load balancer in the panel: one server per service, with no replicas or autoscaling. - A database in a container runs on a single server. For high availability, use a managed database. - With autoscaling on, it picks the servers. To pick them by hand, turn it off. > [!NOTE] > When you change servers, the automatic domain (`.ployter.app`) starts pointing to the new server on its own. An older automatic domain on `sslip.io` keeps pointing to the old IP: remove it and generate another one in the **Network** tab. ## Source and deploy The **Source** section defines where the code comes from (GitHub or image). The **Deploy** section defines what runs on each deploy, in order: image build, the command before switching versions, and the version switch. - Source and build: see [Build: Dockerfile, Railpack and image](https://ployter.com/en/docs/services/builds/). - Release command (migrations): see [Deploys, rollback and release command](https://ployter.com/en/docs/services/deployments/#comando-de-release-migrations). ## Runtime | Field | What it does | | --- | --- | | **Port** | The port your application listens on. Required for domains, health check, replicas and access. The container gets the `PORT` variable with this value. | | **Health check** | An HTTP path, e.g. `/health`. With it, the deploy only switches versions when the path responds successfully (up to 2 minutes). Without it, the deploy waits a few seconds with the container up and switches. | | **CPU limit** | In vCPU (e.g. `0.5`). Blank means no limit. | | **Memory limit** | In MB (e.g. `512`). Blank means the service can use up to 85% of the server's RAM (safety ceiling, agent 0.24.0 or later). If the application goes over the limit, only it is stopped and restarted; the other services on the server keep running. | | **Log folders** | Folders inside the container with log files, one per line. They show up in the **Logs** tab. Blank uses the framework default (e.g. `/app/storage/logs` in Laravel). | **Automatic rollback** is at the end of the deploy card, on by default. See [Automatic rollback](https://ployter.com/en/docs/services/deployments/#rollback-automatico). > [!TIP] > A simple health check keeps a broken version from going live. In Next.js or Express, create a route that responds `200` without depending on slow external services. Click **Save** to store your changes, or **Discard** to go back to what was saved. ## Other cards in the tab Below the form, depending on the service type: - **Shared build**: use the image from another service's build. See [Shared build](https://ployter.com/en/docs/services/builds/#build-compartilhado). - **PR previews**: a copy of the service for each pull request. See [Pull request previews](https://ployter.com/en/docs/services/previews/). - **Autoscaling**: see [Autoscaling](https://ployter.com/en/docs/scaling/autoscaling/). ## PHP and configuration files The **File Manager** tab shows the files of the live container: `php.ini`, Nginx, Apache, Caddyfile. It shows up on application services, for people who can open the terminal. The container is recreated on every deploy, so editing a file there works like this: 1. Open the file and edit it. When you save, the edited version is stored in the service, with the **customized** tag. 2. The change gets into the container on the next restart. Click **Restart now** in the notice that appears. 3. From then on, the customized version is written again on every deploy, restart and replica. To go back to the image's original file, open the file's menu, click **Restore original** and restart. The shortcuts at the top take you to the configuration folders of the detected stack (**PHP**, **Caddyfile**, **Nginx**, **Apache**). ### Configure PHP On PHP services, the **Configure PHP** button opens a form with the most common directives: | Field | Directive | | --- | --- | | **Memory per request** | `memory_limit` | | **Max upload size** | `upload_max_filesize` | | **Max post size** | `post_max_size` | | **Max time (s)** | `max_execution_time` | | **Time to receive data (s)** | `max_input_time` | | **Fields per form** | `max_input_vars` | | **Time zone** | `date.timezone` | | **Show errors on the page** | `display_errors` | | **Session lifetime (s)** | `session.gc_maxlifetime` | Only what you change goes into a `zz-ployter.ini` file, loaded after `php.ini`. For other directives, edit that file in the file manager. ![Configure PHP modal with upload_max_filesize changed](https://ployter.com/assets/docs/en/settings-php-modal.webp) > [!WARNING] > If **Max post size** is smaller than **Max upload size**, large files are still rejected. The form warns you. ## Maintenance mode Maintenance mode makes the service's domains show a notice page instead of the site. It turns on and off instantly, with no deploy, and the service keeps running behind it. It lives in the **Network** tab, in the **Maintenance mode** card. 1. Open the service and go to the **Network** tab. 2. In the **Maintenance mode** card, choose the page: - **Default page**: fill in **Title** and **Message**. The page is lightweight, follows the visitor's light or dark theme and reloads on its own every minute. - **Custom HTML**: the whole page, with CSS and images embedded (the site is offline). Up to 256 KB. 3. Click **Preview** to check it and **Save**. 4. Click **Turn on maintenance** and confirm with **Turn on**. ![Maintenance mode card turned on, with the link to view the site](https://ployter.com/assets/docs/en/settings-maintenance.webp) With maintenance on: - The service header shows the **Maintenance** tag. - **Link to view the site** gives you and your team an address to see the normal site for 12 hours, in the same browser. **Generate another** invalidates the current link. - To change the page, edit it and click **Save page**. - To go back, click **Turn off** and confirm. Requirements: the service must have a domain and the server agent must be up to date. From the CLI: `ployter maintenance on --title "Voltamos já" --message "Atualização em andamento"`. See [CLI](https://ployter.com/en/docs/cli/cli/). ## Stop and delete the service **Stop** (at the top of the screen) removes the container and takes the service offline, including on its domains. Volumes and configuration stay. To bring it back, run a deploy. To delete it: 1. Stop the service. 2. If SFTP is on, turn it off in the **Files** tab. 3. In **Settings**, in the **Delete service** card, click **Delete**. 4. Type the service identifier to confirm and click **Delete**. The service leaves the project along with its variables, domains and deploy history. The volumes stay on the server. ## Permissions - **Edit service configuration**: save the **Settings** tab, PHP and customized files. - **Open terminal**: see the **File Manager** tab. - **Manage domains**: turn maintenance on and off and change the page. - **Start, stop and restart services**: **Stop** and **Restart**. - **Delete services**: the **Delete service** card. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Templates > How to turn a project that already works into a template and create identical projects from it. A template stores the structure of a project: services, build and deploy settings, processes, scheduled jobs, volumes, variables, domains and managed databases. With it, you create an identical new project in a few clicks, filling in only what changes (name, domain, keys). The project you create isn't tied to the template. Use templates to repeat the same stack for several clients, or to have a staging environment identical to production. > [!NOTE] > Saving and importing your own templates is a plan feature (`custom_templates`). The **Ready-made apps** in **New service** stay available on all plans. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## Create a template from a project 1. Open a project that already works (e.g. `loja`). 2. In the **⋮** menu at the top, click **Save as template**. 3. Enter a **Template name** and, if you want, a description. 4. Click **Create template**. The panel copies the services, volumes, domains and managed databases, without the data. It then opens the template screen for you to review. ## Review the template Open **Projects → Templates** and click **Edit** on the template. The screen has these parts. ![loja template screen with the services' variables](https://ployter.com/assets/docs/en/templates-view.webp) ### Template variables These are questions asked once at the top of the form when the template is used. Create one with **Template variable**, give it a lowercase key (e.g. `dominio`) and a question. Then write `${{dominio}}` in any service value or domain, for example `https://api.${{dominio}}`. When the template is used, the panel replaces it with what was filled in. ### Variables for each service For each variable, choose under **When used** what happens in the new project: | Option | What it does | | --- | --- | | **Copy** | The same value in every project. | | **Reference** | Copies the reference as is (e.g. `${{mysql.MYSQL_URL}}`). It works in the new project, because the internal names repeat. | | **Generate** | A new random value on each use, with the number of characters you choose. Good for passwords and keys. | | **Ask** | Becomes a field in the form, with a question, a default value, **required** and **secret**. | The panel already suggests an option for each variable. References become **Reference**. Names with `PASSWORD`, `SECRET`, `TOKEN` or `KEY` become **Generate** when the value looks random, or **Ask** (secret and required) when it doesn't, such as a payment gateway key. Names ending in `URL`, `HOST` or `DOMAIN` become **Ask**. Everything else becomes **Copy**. Review them before saving. **Remove from template** removes the variable. Under **Shared variables**, you choose the team sets the service uses. If a set no longer exists, it is left out when the template is used. ### Domains Each domain can be: - **Ask when used**: a field in the form, with a question and a default value (accepts `${{dominio}}`). - **Automatic domain**: a `.ployter.app` address already pointing to the server, to test before setting up DNS. ### Managed databases Managed databases and buckets (RDS, ElastiCache, S3, DigitalOcean) are optional when the template is used. Whoever uses it picks the account and the size, because they generate cloud costs. Without them, references to the database stay empty until you create one with the same internal name. Click **Save template** to store it. ## Create a project from the template 1. Open **Projects → Templates** and click **Use** on the template. 2. Fill in the **Project name** (e.g. `Cliente X`). 3. Under **Server**, choose the project's server. All services go to it; you can change each service's server right below. 4. Answer the questions: template variables, variables set to **Ask** and domains. 5. If the template has managed databases, choose the cloud account and the size, or leave **None**. 6. If you have Cloudflare connected, check **Point the domains on Cloudflare (with proxy)**. Only domains with no record on Cloudflare are pointed; a domain that points somewhere else stays as is. 7. Click **Create and deploy**, or **Create only** to deploy later. ![New project form with the loja template](https://ployter.com/assets/docs/en/templates-use.webp) With **Create and deploy**, the project screen shows the progress. Each service starts once the ones it uses (services and databases) are live. Managed databases take 5 to 20 minutes to be ready. ## Export and import In each template's menu: - **Export JSON** downloads the template to a file, to keep or to take to another team. - **Delete** removes the template. Projects created from it stay. To bring in a template, click **Import JSON** in **Projects → Templates**. > [!WARNING] > The exported file has the fixed variable values (the ones set to **Copy**) in plain text. Store it carefully. ## Permissions - **Create, edit and delete templates** lets you save, edit, import and export. Without it, the template screen is read-only and fixed values are hidden. - Using a template requires **Create projects** and **Create services**. To deploy, **Deploy**; to point DNS, **Manage domains**; to create managed databases, **Create managed databases and caches**. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Pull request previews > How to deploy a temporary copy of the service for each pull request (GitHub) or merge request (GitLab), with its own address and a link in the PR. With previews turned on, each pull request to the service's branch deploys a copy of it with the PR's code, at its own address. The link shows up in a comment on the PR. On every push to the PR, the preview updates. When the PR closes, the preview is removed. ## Requirements - The service's source must be GitHub, GitLab or [Bitbucket](https://ployter.com/en/docs/integrations/bitbucket/). On GitLab, the card is called **Merge request previews** and the comment goes on the MR. See [Connect GitLab](https://ployter.com/en/docs/integrations/gitlab/). - The panel needs to receive the repository's `pull_request` event. With the GitHub App, this is already set up. With a token, the panel creates the webhook for you when you turn on previews, as long as the token has webhook permission. See [Connect GitHub](https://ployter.com/en/docs/integrations/github/). - For the comment with the link to show up on the PR, the credential must be able to comment on pull requests. Without that, the preview works the same, it just doesn't comment. - The service's server must have a public IP, because the preview uses an automatic domain (`.ployter.app`). ## Turn on previews 1. Open the service (e.g. `web`) and go to **Settings**. 2. In the **PR previews** card, turn on **Enable**. 3. Adjust: - **Previews at the same time**: from 1 to 20. A PR over the limit gets a comment asking you to close another one. - **Removed after how many days without a push**: from 1 to 90. 4. Under **Preview variables**, add what changes in the preview (see below). 5. Click **Save**. ![PR previews card turned on for the web service, with one preview live](https://ployter.com/assets/docs/en/previews-card.webp) ## Preview variables The preview copies the service's variables and the shared variable sets. Under **Preview variables**, you only define what changes: - **Variable**: adds a name and the value it has in the preview, for example a test database in `DATABASE_URL`. - **Don't copy**: leaves the variable out of the preview. Use it for production keys that a PR shouldn't use. ```env DATABASE_URL=${{mysql-staging.MYSQL_URL}} APP_URL=https://preview.loja.com.br ``` > [!WARNING] > Without preview variables, the copy uses the same variables as production, including the database. Point the preview to a test database. ## What goes to the preview and what doesn't Included: the service's settings (build, port, health check, limits), the variables with the preview ones on top, the variable sets and the linked databases. Not included: - Volumes: the preview starts empty. - Extra processes and scheduled jobs. - The release command (migrations). A PR doesn't change the database on its own. ## How a preview works - A PR opened (or moved out of draft) against the service's branch creates the preview and deploys the PR's latest commit. It is ready in 1 to 3 minutes. - The preview shows up in the project as a service with the PR icon, and its header shows **Preview PR #12** with the link to the PR. - Each push to the PR runs a new deploy of the preview. - The PR comment is updated on each push, without flooding the conversation. - When the PR is closed or merged, the preview is removed. It is also removed after the number of days without a push that you set. Draft PRs don't get a preview until they are ready for review. PRs from forks don't either: outside code would run with the service's variables. ## View and remove previews The **PR previews** card lists the live previews, with the link, the PR and the time of the last push. Click **Remove** to take a preview down before the PR closes. The PR stays open, and a new push deploys another preview. When you turn off previews in the card, the live ones are removed right away. --- # Domains and HTTPS > How to add a domain to a service, point the DNS, get automatic HTTPS and fix a domain that doesn't open. A domain carries internet traffic to the service's port. For a service on a single server, the server's proxy (Traefik) receives the request and requests the HTTPS certificate from Let's Encrypt, which renews on its own. For a service with replicas, the domain goes through the load balancer: on AWS, the project's, with an AWS certificate; on DigitalOcean, the service's, with a Let's Encrypt certificate issued by the panel. Domains live in the service's **Network** tab. ## Before you start - Domains are for HTTP services (site, API, panel). Databases and Redis stay on the internal network; to connect from outside, see [Private access and public ports](https://ployter.com/en/docs/networking/access/). - Set the service's **Port** in **Settings** (e.g. `3000`). The domain forwards to it. Without a port, the **Network** tab warns you and the deploy is refused. - The server needs a public IP. ## Add a domain 1. Open the service (e.g. `web`) and go to the **Network** tab. 2. Under **Domains**, type the domain (e.g. `loja.com.br` or `www.loja.com.br`) and click **Add**. 3. Keep **Issue HTTPS certificate on the server (Let's Encrypt)** checked, unless Cloudflare with proxy handles SSL (see below). 4. Point the domain's DNS to the server (next section). 5. Run a deploy. Adding or removing a domain applies from the next deploy. ![Network tab of the web service with the loja.com.br domain and the DNS card](https://ployter.com/assets/docs/en/domains-tab.webp) For several names (`loja.com.br` and `www.loja.com.br`), add each one. ## Point the DNS In the **DNS** card, the panel shows the server's IP. At your DNS provider (Registro.br, Cloudflare, GoDaddy...), create an **A** record for each domain: | Type | Name | Value | | --- | --- | --- | | A | `@` (for `loja.com.br`) | Server IP, e.g. `203.0.113.10` | | A | `www` | Server IP | A DNS change can take a few minutes to propagate everywhere. ### With Cloudflare connected With a Cloudflare account connected in **Integrations → Cloudflare**, each domain shows where it currently points on Cloudflare: - **Points here**, with the **proxy** or **DNS only** tag. - **Points elsewhere:** and the current record. - **No record on Cloudflare.** To point it: 1. Click **Point here**. 2. Check the current record and what it will become. 3. Choose whether to turn on the **Cloudflare proxy (orange cloud)**. 4. Click **Point**. The panel keeps the previous record. **Undo** restores it. Adding a domain in the panel never changes DNS on its own: only the **Point** button does. ![Point loja.com.br on Cloudflare modal](https://ployter.com/assets/docs/en/domains-cloudflare-point.webp) See how to connect the account in [Connect Cloudflare](https://ployter.com/en/docs/integrations/cloudflare/). ### HTTPS with the Cloudflare proxy With the proxy on (orange cloud), Cloudflare serves the visitor and connects to your server. The zone's SSL/TLS mode (under **SSL/TLS → Overview** on Cloudflare) must match the domain: | Mode on Cloudflare | Domain HTTPS in the panel | Result | | --- | --- | --- | | **Full** | on or off | Works. It is the simplest mode. | | **Full (strict)** | on | Works once the certificate is issued on the server. Until then, error 526. | | **Full (strict)** | off | Doesn't work: Cloudflare rejects the default certificate. | | **Flexible** | on | Redirect loop. The panel doesn't let you point with proxy. | | **Off** | any | The panel doesn't let you point with proxy. | > [!TIP] > With proxy and **Full** mode, you can turn off the domain's HTTPS in the panel. The server responds over HTTP and Cloudflare handles the visitor's certificate. ## HTTPS on the server With HTTPS on, the server requests the certificate from Let's Encrypt during the deploy and renews it on its own. Let's Encrypt checks that the domain points to the server, so point the DNS before the deploy. The tag next to each domain shows its status: | Tag | Meaning | | --- | --- | | **awaiting deploy** | New domain or HTTPS changed. It goes live on the next deploy. | | **issuing certificate...** | Let's Encrypt is checking the domain. It takes from a few seconds to a few minutes. | | **HTTPS until** (date) | Certificate issued, with its expiration date. It renews on its own. | | **certificate error** | Let's Encrypt refused it. The reason shows right below the domain. | | **no HTTPS on server** | HTTPS turned off. The domain responds over HTTP and SSL is handled by Cloudflare. | To turn it on or off, use the domain's **HTTPS** switch and run a deploy. ## Automatic domain To test before you have a domain, click **Generate automatic domain**. The panel creates an address that already resolves to the server's IP, without touching DNS, in the format `web-xxxxxx.ployter.app`. It is also good for internal panels. If the service moves to another server, the address follows it on its own. > [!NOTE] > The automatic domain has the server's IP in its name. If the service moves to another server, remove it and generate another one. ## When the domain doesn't open Click **Diagnose** on the domain. The panel checks on the server what you would check over SSH (DNS, proxy, certificate, container) and shows each item with its result. The first item with a problem is usually the cause. The diagnosis also shows the Traefik log for the domain. ![Diagnosis modal for loja.com.br with the list of checks](https://ployter.com/assets/docs/en/domains-diagnose.webp) Common causes: - The DNS still points elsewhere, or hasn't propagated yet. - The deploy after adding the domain is missing. - The **Port** in **Settings** isn't the port the application listens on. - The cloud firewall doesn't allow ports 80 and 443 (your own server, or a rule changed by hand). ## Domains with replicas With the service on 2 or more AWS or DigitalOcean servers, the domain goes through the load balancer, which splits traffic across the servers and handles HTTPS. Each domain needs two records in your DNS. The **Network** tab shows the steps for each one and checks on its own every few seconds. When both steps are done, the domain shows **HTTPS active**. ### On AWS The project load balancer is created with the first domain, takes about 3 minutes and costs about US$ 16–20/month on AWS. A new domain is added to the load balancer in moments, with no deploy. 1. **Point the domain to the load balancer**: create a **CNAME** record with the domain name and the load balancer's address. If an A or CNAME record with that name already exists, delete it first. 2. **Validate the HTTPS certificate**: create the second **CNAME** the panel shows. AWS takes 2 to 30 minutes to validate it. Don't delete this record: it also renews the certificate every year. ![DNS steps for loja.com.br with replicas](https://ployter.com/assets/docs/en/domains-replicas-setup.webp) > [!WARNING] > On Cloudflare, keep the proxy off (gray cloud, "DNS only") until step 2 is done. After that, you can turn on the orange cloud with SSL/TLS set to **Full (strict)**. > [!NOTE] > The apex domain (`loja.com.br`, without `www`) doesn't accept a CNAME in most DNS panels. Use an **ALIAS** or **ANAME** record with the same target. On Cloudflare, a CNAME works normally. ### On DigitalOcean Each service with replicas has its own load balancer, with a fixed IP. It's created with the service's first domain, takes a few minutes and costs about US$ 12/month. 1. **Point the domain to the load balancer**: create an **A** record with the IP of the service's load balancer. If an A or CNAME record with that name already exists, delete it first. 2. **Validate the HTTPS certificate**: create, only once, the **CNAME** `_acme-challenge.` the panel shows (e.g. `_acme-challenge.api.loja.com.br` to `k3x9a1b2c3.acme.ployter.app`). With it, the panel issues the Let's Encrypt certificate and renews it on its own, about 30 days before it expires. Don't delete this record. A new domain doesn't take the others down: when its CNAME shows up, a new certificate with all the domains replaces the old one, with no downtime. > [!WARNING] > On Cloudflare, create both records with the proxy off (gray cloud, "DNS only"). Once the certificate is issued, you can turn on the orange cloud with SSL/TLS set to **Full (strict)**. Hetzner, Vultr and Linode servers and your own servers have no load balancer in the panel, so they have no replicas. See [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ## Remove a domain Click **Remove** on the domain and confirm. For a service on a single server, it applies from the next deploy. The panel doesn't delete the record in your DNS. ## Permissions Adding, removing and pointing domains requires the **Manage domains** permission. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Private access and public ports > How to protect a domain with an IP filter and a password, open a TCP port to connect from outside and link services from different projects over the private network. By default, a service can only be reached in two ways: through its domains (HTTP and HTTPS) and through the project's internal network, by other services in the same project on the same server. The **Network** tab has three cards to change that: | Card | What it's for | | --- | --- | | **Access through domains** | Restrict an internal panel to a few IPs or ask for a username and password in the browser. | | **Public access (TCP)** | Connect from outside to a database, Redis or another non-HTTP service, for example with DBeaver. | | **Private access** | Let other team projects and machines on the private network connect, without exposing the service to the internet. | All three need the service's **Port** set in **Settings**, and none of them applies to services with replicas: their traffic comes in through the load balancer. ## Access through domains Use it for internal panels (database manager, admin, tools). Before the request reaches the service, the server checks the visitor's IP and/or asks for a username and password. 1. Open the service and go to the **Network** tab. 2. In the **Access through domains** card, under **Who can open it**, choose **Allowed IPs only** and add the IPs (the **My IP** button fills in yours). It accepts an IP (`203.0.113.4`) or a network (`203.0.113.0/24`). 3. To require a password, turn on **Ask for username and password**. The panel generates the username and password, which show in the card after you save. 4. Click **Save**. 5. Run a deploy. It applies from the next deploy. ![Access through domains card with one allowed IP and the password turned on](https://ployter.com/assets/docs/en/access-web.webp) To change the password, click **Generate new password**, save and run a deploy. > [!WARNING] > With Cloudflare in proxy mode (orange cloud), the server sees Cloudflare's IP, not the visitor's, and the IP filter blocks everyone. In that case, use only the password. The database manager installed with the project's **Database manager** button already uses this card when the tool has no login of its own. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). ## Public access (TCP) Opens a server port to the internet, linked to the service's port. Use it to connect from your computer to a database in a container, a Redis or another non-HTTP service. 1. Open the service (e.g. `mysql`) and go to the **Network** tab. 2. In the **Public access (TCP)** card, turn on the switch. 3. Under **Public port**, choose the port on the server (1024 or higher). The default is the same port as the service. 4. Under **Who can connect**, keep **Allowed IPs only** and add your IP with **My IP**. The **Server or service** button adds the public IP of a server or service in the panel. 5. Click **Save**. 6. Run a deploy. The card shows the **Address to connect**, for example `203.0.113.10:3306`. Use it with the database's username and password. ![Public access (TCP) card on the mysql service with one allowed IP](https://ployter.com/assets/docs/en/access-public.webp) How it works: - On an AWS or DigitalOcean server, the panel updates the cloud firewall right away, opening the port only to the IPs in the list. - The port is published on the server on the next deploy. - With a public port, the deploy stops the current version before starting the new one: a few seconds of downtime. > [!WARNING] > With **Any IP**, the port is open to the whole internet and only the service's password protects it. Use a strong password and prefer allowing specific IPs. > [!NOTE] > On your own server, the panel doesn't control the firewall: the port is open to any IP. Restrict it in your provider's firewall. See [Use your own server](https://ployter.com/en/docs/integrations/own-server/). To close it, turn off the switch. The service goes back to internal network only. ## Private access Publishes the service's port only on the server's private IP. The internet can't reach it. Use it when: - A database in one project serves sites from other projects on the same server. - Machines on the cloud's private network (another of your servers in the same VPC) need to connect. 1. Open the service and go to the **Network** tab. 2. In the **Private access** card, turn on the switch. 3. If you want, change the **Private port** (1024 or higher) and confirm. If you don't choose one, the panel uses a free port starting at 21000. 4. Run a deploy. The port is published on the next deploy. ![Private access card on the mysql service with the address and ready-to-use connections](https://ployter.com/assets/docs/en/access-private.webp) The card shows: - **Address**: the server's private IP and the port, e.g. `10.0.1.15:21000`. - **Variables**: `PRIVATE_HOST` and `PRIVATE_PORT`, to copy. - **Ready-to-use connections**: the service's connection variables (the ones ending in `_URL`) already with the private address. Paste them into the other project, for example as `DATABASE_URL`. They contain the password, so they only show for people who can see variable values. > [!TIP] > For a database serving several sites, create one user per site in the service's **Database** tab, instead of using root. Details: - On AWS and DigitalOcean, the cloud firewall opens the port only to the private network (e.g. `10.0.0.0/16`). - If the server has no private IP, only containers on the same machine can reach the address. - With a port on the machine, the deploy stops the current version before starting the new one: a few seconds of downtime. See how the private network between servers works in [Private network and firewall](https://ployter.com/en/docs/servers/networking/). ## Permissions All three cards require the **Manage domains** permission. See [Teams, members and roles](https://ployter.com/en/docs/team/members/). --- # Databases as a service > How to run MySQL, PostgreSQL, Redis and MongoDB in a container on your server, connect the other services, tune the configuration and open a manager such as phpMyAdmin. The quickest way to get a database is to run it as a project service, in a container, on the same server as the application. The panel creates the data volume, generates the password and builds the connection variable. The project's other services reach the database over the internal network, with nothing exposed to the internet. For production with high availability, backups and updates handled by the cloud, use a [managed database](https://ployter.com/en/docs/databases/managed/) (RDS, Aurora, ElastiCache or DigitalOcean managed databases). ## Container or managed | | Database as a service (container) | Managed database | | --- | --- | --- | | Where it runs | On your server, next to the application | In your AWS or DigitalOcean account | | Cost | Only the server's | Billed separately by the cloud | | Backup | Through the panel, to a project bucket ([Backups](https://ployter.com/en/docs/databases/backups/)) | The cloud's automatic backup, with snapshots | | High availability | No: runs on a single server | Multi-AZ, standby node and read replicas | | Who connects | Services on the same server, over the project network | Servers on the same network (and allowed IPs, if you want) | ## Create a database 1. Open the project and click **New service**. 2. In **What will run**, pick **MySQL**, **PostgreSQL**, **Redis** or **MongoDB**. 3. Check the name. It becomes the database's internal address (e.g. `mysql`). 4. Pick the **Server**. Use the same server as the services that will use the database. 5. Keep **Run the first deploy now** checked and click **Create service**. ![New service modal with MySQL selected](https://ployter.com/assets/docs/en/databases-create-mysql.webp) The panel creates the service with these defaults: | Database | Image | Volume | Variables created | | --- | --- | --- | --- | | MySQL | `mysql:8.4` | `/var/lib/mysql` | `MYSQL_ROOT_PASSWORD` (generated), `MYSQL_DATABASE=app`, `MYSQL_URL` | | PostgreSQL | `postgres:17-alpine` | `/var/lib/postgresql/data` | `POSTGRES_USER=postgres`, `POSTGRES_PASSWORD` (generated), `POSTGRES_DB=app`, `PGDATA`, `DATABASE_URL` | | Redis | `redis:7-alpine` | `/data` | `REDIS_URL` | | MongoDB | `mongo:8.0` | `/data/db` | `MONGO_INITDB_ROOT_USERNAME=root`, `MONGO_INITDB_ROOT_PASSWORD` (generated), `MONGO_URL` | The `app` database is created on first boot. Data lives in the volume and survives deploys. In MongoDB, the `app` database is created on the application's first write. `MONGO_URL` already points to it and ends in `?authSource=admin`, because the root user lives in the `admin` database. To use another database, replace `app` with the name you want. > [!NOTE] > Any image-based service whose name is `mysql`, `mariadb`, `percona`, `postgres`, `postgis`, `timescaledb`, `redis`, `valkey` or `mongo` is recognized as a database. It gets the **Database** and **Backups** tabs, even if you created it through the **Docker image** field. > [!WARNING] > Redis created this way has no password: only the project's services can see it. Don't turn on a public port on it. If you need a password, turn on **Require password** in the **Database** tab (see below). ## Connect other services The connection variable lives in the database service itself and uses references, built at the deploy of the service using it. For example, the database's `MYSQL_URL` is: ```text mysql://root:${{MYSQL_ROOT_PASSWORD}}@${{INFRA_HOST}}:${{INFRA_PORT}}/${{MYSQL_DATABASE}} ``` For the `api` service to use the `mysql` database, create a variable in it that points to the database's variable: ```env DATABASE_URL=${{mysql.MYSQL_URL}} ``` You can also do this from the database: 1. Open the database service and go to the **Variables** tab. 2. In the **Connect another service** card, pick the service in **Choose the service**. 3. Click **Add MYSQL_URL to it** (or `DATABASE_URL`, `REDIS_URL`, depending on the database). 4. Deploy the service that received the variable. The value follows password changes: when you change the database password, just deploy the services that use it. See more about references in [Variables](https://ployter.com/en/docs/services/variables/). > [!NOTE] > Connection over the internal network works between services on the same server. A container database runs on a single server. ## Database tab Database services have the **Database** tab, with the configuration, extra databases and users, and the connection pool. ![Database tab of a MySQL container](https://ployter.com/assets/docs/en/databases-database-tab.webp) ### Database configuration The **Database configuration** card changes parameters without you editing a file: - MySQL: goes in as a file in `/etc/mysql/conf.d`. - PostgreSQL: goes in as parameters on the `postgres` command line. - Redis: goes in as a `redis.conf` generated by the panel. - MongoDB: goes in as options on the `mongod` command line (e.g. `--wiredTigerCacheSizeGB 0.5`). In **Other parameters**, use the option name without `--`; for a `setParameter`, use `setParameter.name`. **Simple** mode shows the most used parameters, in groups (Memory, Connections, Timeouts, Logs...). **Advanced** mode shows all of them and accepts **Other parameters**. The **Calculate from size** button suggests values based on the service's memory limit. Set that limit in **Settings** to get the full suggestion. The configuration takes effect on the database's next deploy. An empty field uses the image's default. ![Database configuration of a MongoDB in a container](https://ployter.com/assets/docs/en/databases-mongo-config.webp) > [!TIP] > In MongoDB, set the **WiredTiger cache**. Without it, MongoDB reserves half the memory minus 1 GB, which squeezes the other services on the server. > [!WARNING] > A wrong value (memory above the container limit, a parameter that doesn't exist) can keep the database from starting. Since the database has a volume, the old container stops before the new one: the database is down until you fix it and deploy again. In Redis, **Require password** creates the `REDIS_PASSWORD` variable and `REDIS_URL` starts including the password. Services that use `REDIS_URL` by reference get the change on their own deploy. Container configuration needs agent v0.8.0 or newer on the server. ### Databases and users In MySQL and PostgreSQL, the **Databases and users** card lets you have more than one database on the same server and users that access only what they need: 1. In **Databases**, type the name and click **Create database**. 2. In **Users**, type the name, pick the **Database** and the access (**Full** or **Read-only**) and click **Create**. Each user becomes a variable in the database service. Another service uses that user by reference, for example `${{mysql.DB_USER_RELATORIOS_URL}}`. For existing users you can generate a new password or remove the user. In PostgreSQL, a full-access user only modifies the tables it created itself. For tables created later by another user, use **Reapply permissions**. > [!WARNING] > **Deleting** a database deletes all its tables and data. The only way to recover is restoring a backup. MongoDB doesn't have this card: a database is created when the application writes to it, so just change the name at the end of `MONGO_URL`. The panel doesn't create extra MongoDB users yet. ### Connection pool (PostgreSQL) Many replicas, workers and functions opening connections can exhaust PostgreSQL (`too many clients` error). The **Connection pool** card creates a PgBouncer in front of it: 1. Pick the **Mode**. **Per transaction (recommended)** handles many more clients. Use **Per session** only if the application depends on `SET`, `LISTEN` or session locks. 2. Adjust **Database connections** and **Pool clients**. 3. Click **Create PgBouncer**. The panel creates a new service (PgBouncer, 128 MB) on the same server, without a domain. In services, use `${{nome-do-pool.POOL_URL}}` instead of the database URL. Keep the direct URL for migrations (in Prisma, `directUrl`). MySQL has no equivalent pool: MySQL drivers already keep a pool in the application. With many replicas, raise `max_connections` in the database configuration. MongoDB doesn't need one either: the driver already keeps a pool in the application (`maxPoolSize` in the URL). With many replicas, raise **Max connections** in the database configuration. ## Container database limits - Runs on a single server. Selecting more servers would create separate databases, so the panel doesn't turn on replicas for a database service. - It doesn't have the **Files**, **Processes** and **Commands & cron** tabs. The terminal is still available, with the **Open terminal** permission. - Backups only with a bucket in the project. See [Backups and restore](https://ployter.com/en/docs/databases/backups/). ## Database manager (phpMyAdmin and others) The **Database manager** button, on the project screen, installs a web manager in one click. It becomes a project service, with an automatic domain and login, already pointing to the databases you choose. | Manager | Databases | How you sign in | | --- | --- | --- | | DbGate (recommended) | MySQL, PostgreSQL, Redis and MongoDB | Its own login, generated by the panel. Opens already connected. | | phpMyAdmin | MySQL | The database username and password. Opens already connected. | | pgAdmin | PostgreSQL | Its own login. The server is registered inside it, with the details shown by the panel. | | Redis Insight | Redis | The browser asks for a username and password. Opens already connected. | | CloudBeaver | MySQL and PostgreSQL | The browser asks for a username and password, then its own login. Connections are registered inside it. Uses 1 GB of memory. | To install: 1. Open the project and click **Database manager**. 2. In **Which manager**, pick one. 3. In **Databases it opens**, check the databases. Both container databases and the project's managed databases count. 4. Check the **Server**. With a container database, the manager runs on the database's server. With a private managed database, pick a server on the same network as the database. 5. Click **Install**. 6. Note the **Address**, **Username** and **Password** shown in **Manager ready**, and click **Deploy now**. ![Database manager modal with DbGate and the mysql database checked](https://ployter.com/assets/docs/en/databases-db-manager-modal.webp) The deploy takes 1 to 2 minutes. The HTTPS certificate is issued on first access. The address is an automatic domain (`.ployter.app`), which you can replace with your own in the manager service's **Network** tab. > [!TIP] > The manager is a service like any other: you can stop it when you're not using it, restrict access to a few IPs in the **Network** tab or delete it. See [Private access and public ports](https://ployter.com/en/docs/networking/access/). To open a managed database in the manager, your role needs the **Link databases to services** and **View password and connection details** permissions. Installing also requires **Create services**, **Manage domains** and **Edit variables**. --- # Managed cloud databases > How to create and run managed databases and caches (RDS, Aurora, ElastiCache and DigitalOcean databases) in your cloud account from the panel. A managed database is created and maintained by the cloud: backups, updates, disk and high availability are its job. Ployter creates the database in **your** AWS or DigitalOcean account, stores the connection details and hands the variables to services. The charges show up on your cloud invoice. To start quickly with no extra cost, you can also run the database in a container. See [Databases as a service](https://ployter.com/en/docs/databases/databases/). ## What you can create | Type | AWS | DigitalOcean | | --- | --- | --- | | MySQL | RDS or Aurora (MySQL 8.4 and 8.0) | Managed MySQL 8 | | PostgreSQL | RDS or Aurora (17, 16 and 15) | Managed PostgreSQL (17, 16 and 15) | | Redis | ElastiCache (Redis 7.1) | Managed Valkey 8, Redis compatible | | Bucket | S3 | Spaces | Buckets have their own page: [Buckets (S3 and Spaces)](https://ployter.com/en/docs/databases/buckets/). ## Before you start - Connect a cloud: [AWS](https://ployter.com/en/docs/integrations/aws/) or [DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/). Your own server can't create managed databases. - The plan limits how many managed databases, caches and buckets the team can have (**Managed databases, caches and buckets** limit). Read replicas count. - Your role needs the **Create managed databases and caches** permission (owner and admin, by default). ## Create a database or cache 1. Open the project and click **Database or bucket**. 2. In **Type**, pick **MySQL**, **PostgreSQL** or **Redis**. 3. Fill in the **Name** and pick the cloud **Account**. 4. Pick the **Region** and the **Network**. Create the database on the network of the servers that will use it: they connect over the private network. If there's no network in the region, the panel creates one (**Automatic network**). 5. On AWS, pick the **Format**: **RDS (instance)**, with a fixed disk and the cheapest way to start, or **Aurora**, with a disk that grows by itself, replicas that take over in seconds and a Serverless option. 6. Pick the **Size**. For Aurora Serverless, enter the **Minimum capacity (ACU)** and **Maximum capacity (ACU)**. 7. For RDS, pick the **Disk (GB)** and the **Automatic backup** (1 to 35 days). 8. Open **Advanced** if you need to change the **Version**, the **Database name**, the **Replicas** (cache), high availability, **Disk autoscaling** or **Public access**. 9. Click **Create database** (or **Create cache**). ![Managed resource modal with PostgreSQL on AWS](https://ployter.com/assets/docs/en/managed-create-modal.webp) The database takes 5 to 15 minutes to be ready. The resource screen refreshes by itself. > [!WARNING] > **Public access** can only be chosen at creation: the cloud doesn't change it later. Turn it on only if you need to connect from outside the cloud (DBeaver on your computer, a server at another provider). The cache (Redis/Valkey) never has public access. ### High availability - **AWS RDS**: **Multi-AZ (high availability)** keeps a standby copy in another zone, which takes over by itself if the primary goes down. It doubles the machine cost. - **Aurora**: after creating, add a replica. It sits in another zone and becomes the primary in seconds. - **ElastiCache**: Multi-AZ requires at least 1 replica. - **DigitalOcean**: **Standby node (high availability)**. The smallest size (1 GB) doesn't support it. ## Connect services Services use the database by reference. In a service variable, type `${{` and pick the database: the value is built at the deploy of the service using it and follows password changes, replicas and the pool. ```env DATABASE_URL=${{postgres-principal.DATABASE_URL}} ``` Variables the database provides: | Database | Variables | | --- | --- | | MySQL and PostgreSQL | `DATABASE_URL`, `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, `DB_NAME`, `DB_SSL` | | With read replicas | `DATABASE_READ_URL`, `DATABASE_READ_URLS`, `DB_READ_HOST`, `DB_READ_HOSTS` | | With a connection pool | `DATABASE_DIRECT_URL` (and `DATABASE_URL` starts pointing to the pool) | | Redis/Valkey | `REDIS_URL`, `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD`, `REDIS_TLS` | The connection is always encrypted (TLS). For Redis use `rediss://` (two "s"); with ioredis, `REDIS_URL` already handles it. In the resource's **Overview**, the **Variables** card shows each reference with a copy button, and **Used by** lists the services already using the database. ![Overview of a managed database with connection and variables](https://ployter.com/assets/docs/en/managed-overview.webp) > [!NOTE] > Older projects may have **Legacy links**: the service received the variables without them showing up in it. They keep working. **Convert to variables** creates the variables with references in the service, with the same names and values. ## Database sections The resource screen has the **Overview**, **Access**, **Replicas**, **Settings**, **Backups**, **Metrics and alerts**, **Logs** and **Maintenance** sections. Some only appear when the provider offers the feature. ### Access - **Databases and users** (MySQL and PostgreSQL): create databases and users with **Full** or **Read-only** access, as in the [container database](https://ployter.com/en/docs/databases/databases/). - **Connection pool**: see below. - Allowed IPs (databases with public access): the IPs that connect from outside the cloud. The change takes effect immediately. Prefer allowing specific IPs over opening to the whole internet. ### Connection pool The pool shares a few database connections among many clients (service replicas, workers, functions). - **AWS**: RDS Proxy, for MySQL and PostgreSQL. Pick the percentage of the database's connections it uses. It only accepts servers on the database's network and, for now, only the admin user. It takes 5 to 15 minutes and is billed separately by AWS. - **DigitalOcean**: PostgreSQL only, at no extra cost. Pick the **Mode** and the connections. With the pool, `DATABASE_URL` and `DB_*` point to it. Use `DATABASE_DIRECT_URL` for migrations and `LISTEN/NOTIFY` (in Prisma, `directUrl`). Click **Create pool** and deploy the services. ### Read replicas Replicas are read-only copies, updated from the primary within seconds. They take heavy queries (reports, listings, searches) off the primary. 1. In the **Replicas** section, click **Add replica**. 2. Pick the size and, on AWS, whether the replica will have Multi-AZ. 3. Click **Create replica**. The panel creates up to 5 replicas per database. In your code, use `DATABASE_READ_URL` only for reads (for example, Prisma's `readReplicas` extension): writing to the replica fails. A read right after a write may not find the data yet. On the replica's screen, **Promote to primary** turns off replication and it becomes an independent database. In Aurora, promotion swaps roles: the replica becomes the cluster's writer instance. > [!NOTE] > This section is about database replicas. To run your application on several servers, see [Replicas and load balancer](https://ployter.com/en/docs/scaling/replicas/). ### Settings - **Size**: changing it restarts the machine (with high availability, almost without interruption). - **Disk (GB)**: only grows. AWS accepts one disk change every 6 hours. On DigitalOcean, the disk comes with the size. - **Deletion protection**: the panel refuses to delete while it's on. On AWS it also applies in the AWS console. - **Database configuration**: database parameters. On AWS, it's a parameter group for this database only; some require a restart (**Restart now**). On DigitalOcean, it takes effect immediately. ### Metrics and alerts On AWS, the section shows CPU, memory, disk, connections and, for replicas, the lag behind the primary, from CloudWatch. In **Alerts**, set the threshold and how long each metric can stay above it. See [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/#alertas-dos-bancos-gerenciados). DigitalOcean doesn't provide metrics through its API: follow them in its dashboard. ### Logs For MySQL and PostgreSQL, the **Logs** section has three tabs: - **Slow queries**: each query that went over the time limit. **Turn on slow query log** sets a 1 s limit. - **Errors**: errors and warnings from the database server. - **Heaviest**: the queries that keep the database busiest, adding up all executions. A good starting point for creating indexes. Click **Enable collection** if it isn't on yet. On DigitalOcean PostgreSQL, only the **Heaviest** tab works. ### Maintenance - Maintenance window (day and time in UTC) and, on AWS, the **Daily backup** time. - **Version**: update for fixes or to a major version. A major version can't be rolled back (only by restoring a backup): test it on a copy first. - **Pending updates**: apply now with **Apply now** or leave them for the window. ## Change the password 1. Open the database and click **More actions → Generate new password**. 2. Confirm with **Generate**. 3. Deploy the services that use the database. The current password stops working within moments, and services lose their connection until the deploy. For the AWS cache, the old password is still accepted until the next change. DigitalOcean Valkey can't change its password through the panel. ## Delete 1. Turn off **Deletion protection**, if it's on. 2. Remove the read replicas and the pool, and turn off legacy links, if any. Also remove references to the database from the services' variables. 3. Click **More actions → Delete**. On AWS, check **Keep a final snapshot** so you can restore later. DigitalOcean doesn't keep a final snapshot: the data is lost. ## Differences between AWS and DigitalOcean | | AWS | DigitalOcean | | --- | --- | --- | | Automatic backup | You choose 1 to 35 days | Daily, 7 days (fixed) | | Manual snapshot | Yes | No | | Metrics and alerts | Yes (CloudWatch) | No | | Connection pool | RDS Proxy (MySQL and PostgreSQL) | PostgreSQL only | | Final snapshot on delete | Yes | No | | Cache | ElastiCache (Redis) | Valkey, with no backup through the API and no password change | Backups and restore are covered in [Backups and restore](https://ployter.com/en/docs/databases/backups/#bancos-gerenciados). --- # Backups and restore > How to schedule backups of container databases to a bucket, download and restore one database or all of them, and how managed database backups work. Ployter backs up databases that run in containers (MySQL, MariaDB, PostgreSQL, Redis and MongoDB created as a service) and stores the files in a bucket in your project. Managed databases use the cloud's own backup, with snapshots you can see and restore from the panel. ## How container database backups work 1. At the scheduled time, the panel sends the command to the agent on the database's server. 2. The agent generates the dump inside the database container and compresses it. 3. The file goes straight to the bucket through a signed URL. The server never receives a cloud key. In MySQL and PostgreSQL, each database becomes its own file. That way you download or restore only the database you need. In the bucket, the files look like this: ```text backups/loja/mysql/2026-10-11_060000-a1b2c3/app.sql.gz backups/loja/mysql/2026-10-11_060000-a1b2c3/relatorios.sql.gz ``` MySQL system databases (`information_schema`, `performance_schema`, `sys` and `mysql`) are left out. In PostgreSQL, the `postgres` database is only included when it's the image's main database. The backup becomes a single file (with all databases) when: - the database is Redis (a `.rdb.gz` file); - the database is MongoDB (an `.archive.gz` file, made by `mongodump --archive`); - the server's agent is older than v0.23.0; - some database has a non-standard name (letters, numbers, `_`, `$` and `-`, up to 64 characters). ## Before you start - The project needs a bucket. Create one in **Database or bucket → Bucket**. See [Buckets (S3 and Spaces)](https://ployter.com/en/docs/databases/buckets/). - The server's agent must be v0.6.0 or newer. For one file per database, v0.23.0 or newer. See [Servers](https://ployter.com/en/docs/servers/servers/). - Automatic backup depends on the plan (**Scheduled backups** feature). - Configuring and running backups requires the **Container database backups** permission. Restoring requires **Restore backup** (owner and admin, by default). ## Set up automatic backup 1. Open the database service (e.g. `mysql`) and go to the **Backups** tab. 2. Turn on **Automatic backup**. 3. Pick the **Destination bucket**. 4. Check the **Database**. The panel recognizes it from the image (MySQL / MariaDB, PostgreSQL, Redis or MongoDB). 5. Pick the **Frequency**: **Once a day**, **Every 12 hours** or **Every 6 hours**. 6. Pick the **Time** (or **Starting at**, for the shorter frequencies). The time is in your time zone, set in **Preferences**. 7. In **Keep for**, pick from 1 to 90 days. 8. Click **Save**. ![Backups tab with automatic backup configured and the backup list](https://ployter.com/assets/docs/en/backups-tab.webp) After saving, the screen shows when the next backup runs. ## Back up now Click **Back up now** in the backup list. The button only works after you save the destination bucket. Only one backup runs at a time per service. ## The backup list Each row shows **When**, **Type**, **Status** and **Size**. The types are: - **Scheduled**: made by the automatic backup. - **Manual**: made with **Back up now**. - **Before restore**: the safety backup made before each restore. For per-database backups, click **N databases** (e.g. **2 databases**) to see one file per database, each with its own status and size. ![Expanded backup with one file per database](https://ployter.com/assets/docs/en/backups-files-expanded.webp) ### Download Click **Download** on the database's row (or the backup's row, when it's a single file). The download link is valid for 10 minutes. The file is a compressed dump (`.sql.gz`, `.rdb.gz` for Redis or `.archive.gz` for MongoDB), which you can import with the database's own tools. For MongoDB: `gunzip -c file.archive.gz | mongorestore --archive`. ## Restore Restoring replaces the current data with the backup's data. First, the panel saves the current state in a safety backup of type **Before restore**, which appears in the list. If something goes wrong, you restore that backup. ### Restore one database 1. Expand the backup by clicking **N databases**. 2. On the database's row, click **Restore**. 3. Read the text and confirm. Only that database goes back to the backup's date. The other databases don't change. The safety backup keeps only the restored database. ### Restore all 1. On the backup's row, click **Restore all** (or **Restore**, if it has a single database). 2. Confirm. Every database in the file goes back to the backup's date. ![Confirmation for restoring one database](https://ployter.com/assets/docs/en/backups-restore-confirm.webp) Restore rules: - **Restore all** requires a backup that finished with every database. If any file failed, restore one database at a time. - A single-file backup (Redis, MongoDB, old agent) only restores everything together. - MongoDB backup and restore need agent v0.25.0 or later on the server. - A per-database backup needs agent v0.23.0 or newer on the server. - Only one operation per service at a time: wait for the running backup or restore to finish. - The server must be online. > [!WARNING] > With Redis, the database restarts to load the file: it's down for a few seconds. In MongoDB, each collection in the backup is dropped and recreated. Collections created after the backup stay, and the database's users and passwords don't change (the root password stays the one in the variables). ![Restore confirmation for a MongoDB](https://ployter.com/assets/docs/en/backups-mongo-restore.webp) ## Retention Every hour, the panel deletes from the bucket the backups older than the **Keep for** period. The most recent completed backup is never deleted by retention, even if it's old: it's the last copy that exists. To delete a backup earlier, click the trash icon on its row. The file is removed from the bucket and can't be recovered. > [!WARNING] > Don't move or delete files in the `backups/` folder through the bucket's file manager. The backup disappears from the service's list. ## When a backup fails The reason appears below the status, in the list. The most common: - **The service's server is offline.** - **The agent didn't respond**: the server restarted or went down during the backup. After 7 hours without a response, the backup is marked as failed. - Old agent: update it on the server screen. To get an email when a backup fails, turn on **Servers, certificates and backups** in **Notifications**. See [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/). ## Managed databases Managed databases (RDS, Aurora, ElastiCache, DigitalOcean) don't use the bucket: the backup belongs to the cloud itself. On the database screen, the **Backups** section lists backups and snapshots. - **AWS**: automatic backup for the period chosen at creation (1 to 35 days). **Create snapshot now** takes a manual snapshot, which stays until you delete it. - **DigitalOcean**: one backup a day, kept for 7 days. There's no manual snapshot. Valkey has no backup through the API. To restore, click **Restore** on the snapshot. Restoring creates a new database with the data from that moment and the same configuration. The current database stays up. It takes 10 to 30 minutes. Then point the services to the new database and deploy. When deleting a database on AWS, check **Keep a final snapshot** so you can restore it later. See [Managed cloud databases](https://ployter.com/en/docs/databases/managed/#excluir). --- # Buckets (S3 and Spaces) > How to create an S3 or Spaces bucket in your cloud, use it in services through variables, manage files from the panel and set up public read and automatic cleanup. A bucket stores files outside the servers: user uploads, site images, exports and container database backups. Ployter creates the bucket in your account (S3 on AWS, Spaces on DigitalOcean), along with a key that can only see that bucket, and hands everything to services through variables. Use a bucket whenever the service has [replicas](https://ployter.com/en/docs/scaling/replicas/): a service with replicas doesn't use volumes. ## Before you start - Connect [AWS](https://ployter.com/en/docs/integrations/aws/) or [DigitalOcean](https://ployter.com/en/docs/integrations/digitalocean/). - Buckets count toward the plan's **Managed databases, caches and buckets** limit. - Your role needs the **Create managed databases and caches** permission. ## Create a bucket 1. Open the project and click **Database or bucket**. 2. In **Type**, pick **Bucket**. 3. Fill in the **Name** (e.g. `Arquivos`) and pick the **Account**. 4. Pick the **Region**. On DigitalOcean, only regions with Spaces show up. 5. Turn on **Public read** if files should open through a direct link (images and site files). When it's off, files only open through a signed URL generated by the application. You can change this later. 6. Turn on **Versioning** if you want to keep previous versions of each file (overwritten or deleted by mistake). The cloud charges for the space versions take. 7. Click **Create bucket**. ![Managed resource modal with the Bucket type selected](https://ployter.com/assets/docs/en/buckets-create-modal.webp) The bucket is ready in seconds. - **AWS**: the panel creates an IAM user that can only access this bucket. - **DigitalOcean**: the panel creates a Spaces key that can only access this bucket. ## Use it in services Services use the bucket by reference, like databases. In a service variable, type `${{` and pick the bucket. The value is built at deploy time and follows key changes. | Variable | What it is | | --- | --- | | `S3_BUCKET` | Bucket name in the cloud | | `S3_REGION` | Region (on DigitalOcean, always `us-east-1`, the signing region) | | `S3_ENDPOINT` | S3 API address (on DigitalOcean, the region's Spaces address) | | `S3_PUBLIC_URL` | Public address of the files, only with **Public read** on | | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION` | The bucket key, under the names AWS SDKs read automatically | | `AWS_ENDPOINT_URL_S3` | DigitalOcean only: makes the SDKs go to Spaces | Example in the `api` service, with a bucket named `arquivos`: ```env S3_BUCKET=${{arquivos.S3_BUCKET}} S3_ENDPOINT=${{arquivos.S3_ENDPOINT}} AWS_ACCESS_KEY_ID=${{arquivos.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{arquivos.AWS_SECRET_ACCESS_KEY}} AWS_REGION=${{arquivos.AWS_REGION}} ``` Spaces uses the S3 API: `S3Client`, boto3 and aws-cli work when pointed at `S3_ENDPOINT`. In the bucket's **Overview**, the **Access** card shows the access details: the bucket, region, key and secret key (with **Show**). People without the **View password and connection details** permission don't see the secret key, but services get everything through variables. ## Manage files The **Files** section is a file manager for the bucket. It requires the **Manage bucket files** permission. ![Files section of a bucket with folders and files](https://ployter.com/assets/docs/en/buckets-files.webp) - **Upload files** and **Upload folder**, or drag onto the screen. Each file goes straight to the bucket, up to 5 GB. - **New folder** and **New file** (opens empty in the editor; the file is only created when you save). - Select items to **Download**, **Move to...**, **Copy to...** or **Delete**. - In each file's menu: **Open**, **Edit**, **Rename**, **Copy link** and **Details**. With **Copy link**, the panel shows the public address (if the bucket has public read) or generates a signed link valid for **1 hour**, **1 day** or **7 days (maximum)**. Generating a new bucket key invalidates signed links. In **Details**, you change the file's **Type (Content-Type)** and **Cache (Cache-Control)**. > [!WARNING] > The `backups/` folder holds the automatic backups of container databases. Deleting or moving files in it removes the backup from the service's list. See [Backups and restore](https://ployter.com/en/docs/databases/backups/). ## Settings In the **Settings** section: - **Name in the panel**: changes only the name shown in Ployter. The bucket name in the cloud doesn't change. - **Public read**: takes effect immediately. When on, `S3_PUBLIC_URL` becomes available in the variables (on the next deploy of the services using it). - **Deletion protection**: the panel refuses to delete the bucket while it's on. ### Automatic cleanup Automatic cleanup deletes the files in a folder by itself after N days. Use it for temporary folders and logs. 1. In **Automatic cleanup**, click **Rule**. 2. Enter the folder (e.g. `tmp/`) and the days (e.g. `7`). 3. Click **Save cleanup**. The provider checks once a day. Abandoned multipart uploads are removed after 7 days. > [!WARNING] > A rule without a folder applies to the whole bucket, including the `backups/` folder. ## Metrics On AWS, the **Metrics and alerts** section shows the size and number of files (including previous versions), measured by AWS once a day. The first measurement comes up to 48 hours after the bucket is created. DigitalOcean doesn't provide these metrics through its API. ## Replace the key If the key leaked: 1. Click **More actions → Generate new key** and confirm with **Generate**. 2. Deploy the services that use the bucket. The current key is deleted immediately: services lose access until the deploy. ## Delete Click **More actions → Delete**. Every file in the bucket is deleted, including previous versions and any backups stored in it. It can't be recovered. --- # Replicas and load balancer > How to run a service on several AWS or DigitalOcean servers behind a load balancer, with deploys one server at a time and HTTPS on the load balancer. With replicas, the same service runs on two or more servers. The load balancer receives traffic for the domains and spreads it across them. If a server goes down or is deploying, it leaves the rotation by itself and the others keep serving. Replicas exist on AWS and DigitalOcean: the panel creates the load balancer in your account. On Hetzner, Vultr, Linode and your own server, each service runs on a single server. ## Requirements - The plan must include **Replicas and load balancer**. - Two or more AWS or DigitalOcean servers, all from the same provider and on the same network (VPC). See [Servers](https://ployter.com/en/docs/servers/servers/) and [Private network and firewall](https://ployter.com/en/docs/servers/networking/). - The service can't have a volume: each server would have a different copy of the data. Store files in a [bucket](https://ployter.com/en/docs/databases/buckets/) and data in a [database](https://ployter.com/en/docs/databases/managed/). - The service can't have a public port. - A container database has no replicas. For database high availability, use a [managed database](https://ployter.com/en/docs/databases/managed/). - Agent v0.7.0 or newer on the servers. ## Turn on replicas 1. If the service is live, click **Stop** at the top of the service screen. While the service is running, the server list is locked. 2. Go to **Settings**. In the **General** card, under **Servers**, check two or more AWS or DigitalOcean servers from the same provider. The first one checked is the primary. 3. Click **Save**. 4. Run a deploy. 5. Follow the steps in the **Network** tab to point each domain's DNS to the load balancer. ![Service settings with two servers checked under Servers](https://ployter.com/assets/docs/en/replicas-servers.webp) With autoscaling on, it picks the servers and the list is locked. To pick by hand, turn off autoscaling. See [Autoscaling](https://ployter.com/en/docs/scaling/autoscaling/). ## AWS and DigitalOcean It works the same way on both clouds. What changes is the load balancer and how you point the domain: | | AWS | DigitalOcean | |---|---|---| | Load balancer | One per project, shared by the services with replicas | One per service with replicas, with its own fixed IP | | Domain record | `CNAME` to the load balancer's name | `A` to the load balancer's IP | | HTTPS certificate | From AWS (ACM), validated by a `CNAME` | From Let's Encrypt, issued by the panel, validated by an `_acme-challenge` `CNAME` | | How to split traffic | **One at a time**, **Least busy** and **Same server** | **One at a time** and **Same server** | | Cost | About US$ 16–20/month per project, plus traffic | About US$ 12/month per service with replicas | ## The load balancer Without a domain, the replicas run, but nothing reaches them. The load balancer estimate appears in **Costs**. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/#custos). ### Load balancer on AWS Each project has one load balancer (Application Load Balancer), shared by the services with replicas. It's created with the first domain of a service with replicas and takes about 3 minutes. When no service in the project needs it anymore, the load balancer is deleted. AWS bills it by the hour, plus traffic. HTTPS lives on the load balancer, with an AWS certificate (ACM). A new domain joins the load balancer within moments, without a deploy. ### Load balancer on DigitalOcean The DigitalOcean load balancer can't route by domain. That's why each service with replicas gets its own load balancer, with a fixed IP. It's created with the service's first domain and takes a few minutes. When the service no longer has replicas or domains, the load balancer is deleted. It costs about US$ 12/month per service with replicas. - HTTPS (port 443) is terminated at the load balancer, with the certificate the panel issues. Once there's a certificate, port 80 redirects to HTTPS. - Both reach port 20000 on the droplets, where Traefik serves them. - The load balancer's health check calls the service's **Health check**. - A firewall opens port 20000 on the droplets only to that load balancer. ## How traffic is split Under **Settings → Servers**, with two or more servers checked, pick **How to split traffic**: - **One at a time**: each request goes to the next server. This is the default. Good for APIs and apps that don't keep sessions on the server. - **Least busy**: sends to the server with the fewest requests in progress. Helps when some requests take longer than others. AWS only. - **Same server**: each visitor always stays on the same server, through a load balancer cookie. Use it for apps that keep sessions in files, like Laravel with `SESSION_DRIVER=file`. Without it, users get logged out on every page refresh. ![How to split traffic options in the service settings](https://ployter.com/assets/docs/en/replicas-balancing.webp) On DigitalOcean, **Least busy** doesn't exist: the option is disabled on the screen and traffic is split in rotation (round robin), like **One at a time**. With **Same server**, choose for how many hours a visitor sticks to the server (up to 168). Use more than the app's session length. The change applies in moments, without a deploy. > [!TIP] > The safest option is to keep sessions off the server: in Laravel, `SESSION_DRIVER=redis` or `database`. Then any server serves any visitor, and **One at a time** works. If a server goes down, nobody gets logged out. ## Point the domain to the load balancer With replicas, each domain needs two records in your DNS. The **Network** tab shows both and checks them by itself every few seconds. With [Cloudflare connected](https://ployter.com/en/docs/integrations/cloudflare/), **Point** creates both records for you. See also [Domains and HTTPS](https://ployter.com/en/docs/networking/domains/). ### DNS on AWS 1. **Point the domain to the load balancer**: create a `CNAME` record with the target shown. If an `A` or `CNAME` record with that name already exists, delete it first: it points to the old place. 2. **Validate the HTTPS certificate**: create the second `CNAME` record, which proves to AWS that you own the domain. AWS takes 2 to 30 minutes to validate. Don't delete this record: it also renews the certificate every year. ![Load balancer DNS steps in the Network tab](https://ployter.com/assets/docs/en/replicas-dns-setup.webp) On the apex domain (e.g. `loja.com.br`), most DNS dashboards don't accept `CNAME`. Use `ALIAS` or `ANAME` with the same target. On Cloudflare, `CNAME` works normally. > [!WARNING] > On Cloudflare, keep the proxy off (gray cloud, "DNS only") until step 2 finishes. With the proxy on before that, the site goes down. Afterward, you can turn on the proxy with SSL/TLS set to **Full (strict)**. ### DNS on DigitalOcean 1. **Point the domain to the load balancer**: create an `A` record with the IP of the service's load balancer, shown in the **Network** tab. If an `A` or `CNAME` record with that name already exists, delete it first: it points to the old place. 2. **Validate the HTTPS certificate**: create, only once, the `CNAME` `_acme-challenge.` with the target `.acme.` shown in the **Network** tab. For example: ```text _acme-challenge.api.loja.com.br CNAME k3x9a1b2c3.acme.ployter.app ``` With this record, the panel issues the HTTPS certificate by itself (Let's Encrypt): one certificate per service, with all of its ready domains. The panel uploads the certificate to the load balancer and renews it about 30 days before it expires. Don't delete this record: without it, the certificate doesn't renew. - **Domain added later**: the domains already live keep working. When the new one's `CNAME` shows up, a new certificate with all the domains replaces the old one, with no downtime. - **Domain removed**: the next certificate leaves it out. - **Issuing fails**: the current certificate stays on the load balancer, and the error shows on the domain. > [!WARNING] > On Cloudflare, create both records with the proxy off (gray cloud, "DNS only"). Once the certificate is issued, you can turn on the domain's proxy with SSL/TLS set to **Full (strict)**. > [!NOTE] > On a self-hosted panel, the DigitalOcean certificate needs the `AUTO_DOMAIN_ZONE` and `AUTO_DOMAIN_CLOUDFLARE_TOKEN` variables set in the API. ## How deploys work with replicas The deploy updates one server at a time, on AWS and on DigitalOcean: 1. The server leaves the load balancer and waits for open connections to finish. 2. The new version starts on it. 3. The server rejoins the load balancer when the health check passes. 4. The deploy moves on to the next server. In the deploy modal, each server shows its own progress (**Updating**, live, failed). Set up a **Health check** on the service so the load balancer knows when the new version is up. See [Service settings](https://ployter.com/en/docs/services/settings/). ## What changes in the service - **Extra processes** (queues, workers, scheduler) run only on the primary server. - **Volumes** aren't allowed. - **Metrics** show the sum of the replicas. - If a replica goes down, the others keep serving. The load balancer's health check removes the one that went down. ## Turn off replicas 1. Turn off autoscaling, if it's on. 2. In **Settings → Servers**, leave only one server checked and save. 3. Run a deploy. 4. Point the domains' DNS back to the server's IP (`A` record). The **Network** tab shows the value. On DigitalOcean, the service's load balancer is deleted when it no longer has replicas. --- # Autoscaling > How the panel scales a service's replicas up and down by CPU and requests, using servers from a pool or creating servers on AWS or DigitalOcean. Autoscaling increases and decreases the number of replicas of a service according to load. It starts from the [replicas](https://ployter.com/en/docs/scaling/replicas/) you already turned on and uses CPU and, if you want, each replica's requests per minute. A new replica starts on the version that's live and only receives traffic after the health check. Since it depends on the load balancer, autoscaling exists on AWS and DigitalOcean, with the same rules. A service on a Hetzner, Vultr or Linode server or on your own server has no autoscaling. ## Requirements - The plan must include **Autoscaling** (and **Replicas and load balancer**). - The service already runs with replicas: two or more AWS or DigitalOcean servers in **Settings → Servers**, with a deploy done. - The service has a port and a live version deployed after the current replicas. If not, run a deploy. - Servers created by autoscaling count toward the plan's **Servers** limit. ## Turn on autoscaling 1. Open the service and go to **Settings**. 2. In the **Autoscaling** card, turn on the switch. 3. Set the **Minimum** and **Maximum** number of replicas (from 2 to 10). 4. Set the **CPU target**, per replica. CPU is measured relative to 1 vCPU: 100% is one full core. 5. Optionally, set the **Requests target**, in requests per minute per replica. If blank, autoscaling decides by CPU only. 6. In **Servers that can receive a replica**, check the servers that can receive new replicas. They must be from the same provider and on the same network as the replicas. 7. If you want the panel to create servers when the pool runs out, turn on **Create servers at the provider when the group runs out** and pick the **Machine type** and **Disk**. On DigitalOcean, the type is a droplet size (e.g. `s-2vcpu-4gb`) and the disk comes with it: there's no **Disk** field. 8. Click **Save**. ![Autoscaling card with minimum, maximum, targets and pool servers](https://ployter.com/assets/docs/en/autoscaling-card.webp) > [!NOTE] > Pool servers stay on, and billing, even without a replica. Servers created by autoscaling are deleted when load drops. ## How it decides The agent measures each replica every 10 seconds. The panel evaluates the average: - **Scale up**: when the average over the last 3 minutes goes above the target. At most 2 replicas are added at a time. After scaling up, it waits 3 minutes before scaling up again. - **Scale down**: one replica at a time, when the load, divided across the remaining replicas, stays below 75% of the target for 10 minutes. After scaling up, it waits 10 minutes before scaling down. Between two scale-downs, it waits 5 minutes. With both targets set, whichever asks for more replicas wins. The number always stays between the minimum and the maximum. Example, with the **CPU target** at 70%: - 3 replicas at a 90% average: above the target, the panel scales up. - 4 replicas at 35%: divided across 3, that would be about 47%, below 52.5% (75% of the target). The panel removes one. - 4 replicas at 40%: divided across 3, that would be about 53%. The panel keeps all 4. If any replica is down or has no measurement, the panel doesn't scale down: the others may be carrying the load. ## Where new replicas come from 1. First, a free server from **Servers that can receive a replica**. 2. If the pool ran out and **Create servers at the provider when the group runs out** is on, the panel creates a server in the same region and network (VPC) as the replicas, with the chosen type (and, on AWS, the disk). It takes 3 to 5 minutes until it receives traffic (creating the server, installing the agent and, for a GitHub service, building). On AWS, ARM types (such as `t4g` and `m7g`) aren't accepted: the agent image is x86. When scaling down, the replica leaves the load balancer and waits for open connections to finish. Then the service is removed from the server, and the server is deleted if autoscaling created it. If creation fails 3 times in a row, the panel pauses server creation for 1 hour. A created server that doesn't come online within 12 minutes is deleted. ## Monitor it The **Autoscaling** card shows: - the current replicas, the **Average CPU** and the requests per replica, with each target; - when the last evaluation happened; - what's happening now (for example, **Adjusting now** or **Creating server**). In the **Metrics** tab, the **Events** panel records each replica that was added or removed. See [Logs, metrics and requests](https://ployter.com/en/docs/observability/monitoring/). To get emails, turn them on in **Notifications**: - **Autoscaling problem**: couldn't scale up, a new server didn't come up, creation paused. - **Autoscaling scaled up or down**: each replica added or removed. That can be a lot of email on a peak day. See [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/). ## Turn it off Turn off the switch in the **Autoscaling** card and click **Save**. The current replicas stay. To pick servers by hand again, use **Settings → Servers**. --- # Logs, metrics and requests > Where to see application output, CPU and memory usage, the requests arriving through the domain and each service's crash events. Each service has three tabs to follow what's happening with it: **Logs**, with the container output; **Metrics**, with CPU, memory, network, requests and events; and **Requests**, with each request arriving through the domain, live. The agent on the service's server reads everything, with nothing to install in the application. Managed databases have their own metrics and logs. See [Managed cloud databases](https://ployter.com/en/docs/databases/managed/). ## Logs The **Logs** tab shows the running container's output (stdout and stderr), read live from the server. The required permission is **View logs**. ![Logs tab of the api service with the container output](https://ployter.com/assets/docs/en/monitoring-logs.webp) In the log toolbar: - The first selector picks the source: **Application (container output)**, one of the extra **Processes** (queues, workers) or one of the **Log files** inside the container. - **N lines**: how many lines to fetch (from 100 to 5,000). - **Errors only**: in Laravel/Monolog logs, shows only error entries, with the stack trace. - **Refresh** fetches again. **Auto** refreshes by itself. - The search field filters the lines already on screen. > [!TIP] > Prefer writing logs to the container output. Log files inside the container disappear on the next deploy, unless the folder is a volume. In Laravel, use `LOG_CHANNEL=stderr`. The folders the panel reads log files from are in **Settings → Runtime**. Other logs live elsewhere: - The build and release command log is in each deploy, in the **Deploys** tab. See [Deploys, rollback and release command](https://ployter.com/en/docs/services/deployments/). - The log for commands and scheduled tasks is in the **Commands & cron** tab. See [Processes, scheduled tasks and commands](https://ployter.com/en/docs/services/processes-and-cron/). From the terminal, `ployter logs -f` follows the same log. See [CLI](https://ployter.com/en/docs/cli/cli/). ## Metrics The **Metrics** tab shows container usage, measured by the agent every 10 seconds. Pick the period at the top: **1h**, **6h** or **24h**. The screen refreshes by itself. ![Metrics tab with CPU, memory, requests and response time](https://ployter.com/assets/docs/en/monitoring-metrics.webp) The panels at the top: - **CPU**: relative to 1 vCPU. 200% is two full cores. Shows the peak and the limit, if you set one. - **Memory**: usage and the service's limit (or "no limit set"). - **Requests**: requests per minute and the total for the period. - **5xx errors**: the rate of server error responses, with the 5xx and 4xx counts. - **Response time**: p95 and average. Below, the CPU, **Memory**, **Requests per minute**, **Response time** and **Network** (received and sent) charts. With replicas, the numbers are the sum of the replicas. > [!NOTE] > Requests are counted at the server's proxy, through the service's domain. A service without a domain has no requests to measure. Request data needs agent v0.7.0 or newer. ### Events The **Events** panel records: - application crashes (stopped by itself or ran out of memory), with the last log lines (**View log**); - when it came back; - autoscaling actions (replica added or removed). When the application crashes, the top of the service screen shows **The application crashed**. The server tries to start it again, and the status recovers by itself once it's up. In that notice, **Diagnose with AI** analyzes the crash. See [AI diagnosis](https://ployter.com/en/docs/observability/ai-diagnosis/). ## Requests The **Requests** tab shows each request that goes through the service's domain, live, read from the server's proxy. The required permission is **View logs**. ![Requests tab with the live list and the 5xx filter](https://ployter.com/assets/docs/en/monitoring-requests.webp) - Filter by **All**, **2xx**, **3xx**, **4xx** or **5xx**. - Search by path, IP, method. - **Pause** freezes the list (new ones are counted) and **Resume** continues. **Clear** empties the screen. - Click a row to see the **Address** (IP), the **Browser**, the **Referrer** and the **Server** that handled it. The list shows the 1,000 most recent. Internal project traffic (from one service to another, over the internal network) doesn't go through the proxy and doesn't appear here. If the tab warns that the service has no domain, add one in the **Network** tab. See [Domains and HTTPS](https://ployter.com/en/docs/networking/domains/). ## Get alerts To find out about a crash or a failed deploy without watching the screen, turn on email alerts. See [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/). --- # Notifications and alerts > How to choose the alerts you receive by email and push (crashes, deploys, autoscaling, servers, backups) and set up metric alerts on managed databases. Ployter alerts you by email and by push on your phone or browser when something needs your attention: the application crashed, a deploy failed, a server went offline, a backup failed. Each person chooses their own alerts, in their account. Managed databases also have metric alerts, configured on each database. ## Choose your alerts 1. Click your avatar at the bottom of the sidebar and open **Notifications**. 2. In the **Alerts** card, turn on **By email**, **Push on phone and browser** or both. 3. Turn on the categories you want to receive. They apply to both email and push. 4. Click **Save**. ![Notifications screen with email, push and the alert categories](https://ployter.com/assets/docs/en/notifications-alerts.webp) Emails go to your account's email. **Send test email** checks that it arrives. Push only reaches the devices where you turned it on; see [Push and mobile app](https://ployter.com/en/docs/observability/push/). | Category | When it arrives | Who can turn it on | | --- | --- | --- | | **Service went down and came back** | The application stopped by itself (or ran out of memory) and when it came back. A crash loop becomes a single alert. | Anyone who can see services | | **Deploy failed** | A manual deploy, GitHub push deploy or rollback that failed, with the error and the last log lines. | Anyone who can see services | | **Autoscaling problem** | Couldn't scale up, a new server didn't come up, creation paused. | Anyone who can see services | | **Autoscaling scaled up or down** | Each replica added or removed. That can be a lot of email on a peak day. | Anyone who can see services | | **Managed database alerts** | A database metric above the limit set on it, and when it recovers. | Anyone who can see managed databases | | **Servers, certificates and backups** | A server offline for more than 5 minutes (and when it comes back), an HTTPS certificate not validated after 1 day, and a failed backup. | Anyone who can see servers | A category your role can't see shows up grayed out, with a notice that your account doesn't have access to that part of the panel. ### Who receives alerts without setting anything up The owner and admins start out receiving everything except **Autoscaling scaled up or down**. Other roles start with alerts off and can turn them on if they want. Push starts on for everyone, but only arrives once the person turns it on on a device. People with the **Subscription and payments** permission also receive billing alerts (new invoice, overdue). See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## Team channels: Slack, Discord and Telegram The same alerts can go to a team channel, for everyone to see. Under **Team → Alert channels**, click **New channel** and pick the type: - **Slack**: paste an Incoming Webhook URL (starts with `https://hooks.slack.com/services/`). - **Discord**: paste the channel's webhook URL (**Edit Channel › Integrations › Webhooks**). - **Telegram**: click **Add to a group**, **My private chat** or **Add to a channel**. Telegram opens on the panel's bot: pick the group and confirm. The channel shows up in the list, named after the group. ![New Telegram channel with the buttons to connect](https://ployter.com/assets/docs/en/alerts-telegram.webp) For a Telegram channel (where only admins post), add the bot as an admin and post the code the screen shows there; the bot deletes the post. If you'd rather use your own bot, click **Use my own bot**, paste the token @BotFather gave you and click **Find chats** to pick the group. For each channel, pick the categories and the message language. Use **Test** to check it; if sending fails, the reason shows on the channel card. The screen requires the **Rename and delete the team** permission. The webhook and the bot token are stored encrypted and never shown again. ![Alert channels screen with Slack, Discord and Telegram channels](https://ployter.com/assets/docs/en/alerts-channels.webp) ## Managed database alerts On AWS managed databases and caches, you set a limit for each metric. Ployter alerts you once when the metric stays above the limit for the chosen time, and again when it recovers. The alert goes to whoever turned on **Managed database alerts** in **Notifications**. 1. Open the database and go to **Metrics and alerts**. 2. In the **Alerts** card, turn on the metrics you want to follow. **Use suggested** fills in the suggested values. 3. For each one, adjust the limit (**above**) and the time (**for**, in minutes). 4. Click **Save alerts**. ![Alerts card of a managed database](https://ployter.com/assets/docs/en/notifications-resource-alerts.webp) | Metric | Suggestion | | --- | --- | | CPU | above 80% for 10 min | | Memory | above 90% for 10 min | | Disk | above 85% for 5 min | | Connections | above 100 for 5 min | | Replica lag | above 30 s for 5 min | | Serverless capacity (Aurora) | above 90% for 10 min | Each database shows only the metrics that make sense for it (for example, lag only on replicas and capacity only on Aurora Serverless). A triggered alert shows the **alert** tag next to the metric. Metrics come from CloudWatch, with a 1 to 2 minute delay, and are evaluated every 2 minutes. DigitalOcean doesn't provide database metrics through its API, so its databases have no alerts. ## Other on-screen notices Some situations also show up directly in the panel, without email: - **The application crashed**, at the top of the service screen, with the **Diagnose with AI** button. - Free plan, invoice due soon or overdue, in a notice on the **Overview** for whoever manages the subscription. A suspended subscription also shows at the top of every screen. - The **Events** panel in the **Metrics** tab, with the history of crashes and autoscaling. See [Logs, metrics and requests](https://ployter.com/en/docs/observability/monitoring/#eventos). --- # Push and mobile app > How to install the dashboard as an app on your phone and computer, turn on push on each device and manage the devices that receive alerts. Besides email, dashboard alerts can arrive as notifications on your phone and computer, even with the dashboard closed. Each device is turned on separately, and they all receive the same categories you chose in [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/). The dashboard can also be installed as an app: it opens in its own window, without the browser bar, and sits on your phone's home screen or your computer's menu. ## Install the dashboard as an app - **Chrome and Edge on a computer**: open **Notifications** (avatar → **Notifications**) and click **Install app** in the **On this device** card. The install icon in the address bar does the same. - **Android**: in Chrome, tap **⋮ → Install app** (or **Add to Home screen**). - **iPhone and iPad**: in Safari, tap **Share → Add to Home Screen**. Once installed, the card shows **Installed as an app**. ## Turn on push on this device 1. Open **Notifications** on the device that should receive alerts. 2. In the **On this device** card, click **Turn on push on this device**. 3. Accept the browser's permission prompt. The device joins the **Devices with push** list, marked as **this device**. Repeat on every phone or computer that should receive alerts. ![On this device card with the list of devices with push](https://ployter.com/assets/docs/en/notifications-push.webp) > [!NOTE] > On iPhone and iPad, push only works with the dashboard on the Home Screen (iOS 16.4 or later). Add the dashboard to the Home Screen, open it from there and turn on push in that window. Push must also be on in the **Alerts** card (**Push on phone and browser**). It starts on; turning it off there stops every device at once, without removing them one by one. ## Test Click **Send test push**. The notification reaches every device in the list. If it doesn't reach one, the error shows under its name. ## What arrives The notification shows the alert's title and its first sentence, in your account's language. Tapping it opens the dashboard straight on the screen of what happened: the service that went down, the deploy that failed, the offline server. Crash alerts stay on screen until you tap them. ## Manage devices - **Turn off on this device**: stops alerts only on this device. - **Trash icon** next to a device: removes it from the list, including a device you no longer use. - A device that uninstalled the app, cleared the site's data or revoked the permission leaves the list by itself on the next alert. Each person sees and removes only their own devices. ## Common problems - **Notifications for this site are blocked in the browser**: you declined the permission earlier. Allow it in **Site settings → Notifications** and reload the page. - **This browser does not support push**: use an up-to-date Chrome, Edge, Firefox or Safari. On iPhone, open the dashboard from the Home Screen. - **Push is not configured**: this dashboard installation doesn't have the push keys yet. Talk to whoever runs the dashboard. Email keeps working. --- # AI diagnosis > How to ask the AI for the cause of a failed deploy or a service crash, what is sent, and how to apply the suggested adjustments. When a deploy fails or the application crashes, the **Diagnose with AI** button analyzes the log, the service configuration and the repository's configuration files. The answer explains the cause, shows the log lines that prove it and suggests the fix. When the fix is a service setting or a variable, you apply it with one click. ## When the button appears - **Failed deploy**: open the deploy in the **Deploys** tab. The button is next to the error message. - **Service crash**: when the application crashes, the top of the service screen shows **The application crashed**, with the button next to it. The button requires the **View logs** permission. It doesn't appear if AI diagnosis isn't configured in the panel. ## Request a diagnosis 1. Click **Diagnose with AI**. 2. Read what will be sent and click **Diagnose**. 3. Wait 10 seconds to 1 minute. You can close the window: the result is saved and shows up when you open it again. ![AI diagnosis modal with cause, evidence and adjustments](https://ployter.com/assets/docs/en/ai-diagnosis-result.webp) The result has: - **Cause**: what went wrong, with the AI's confidence (**High confidence**, **Medium confidence** or **Low confidence**). - **Evidence**: the log or file lines that show the cause. - **How to fix it**: the steps, in order. - **Code changes**: the file and snippet to change, when the fix is in the code. - **Service adjustments**: changes the panel can apply for you. The most recent diagnosis for each deploy or crash is saved, with who requested it and when. **Diagnose again** runs a new analysis. > [!WARNING] > The text is generated by AI. Check it before applying. ## Apply the adjustments **Service adjustments** show the **Current** and **New** values. They can change: - a service setting: **Install command**, **Build command**, **Start command**, **Root directory**, **Port**, **Healthcheck path**, **Builder**, **Dockerfile path**, **Before starting** or **Release script**; - a service variable. For each adjustment: 1. Check the **New** value. If the AI asks for a variable without proposing the value (a password or key, for example), fill in the **Value of NAME** field. 2. Click **Apply**, or **Apply and deploy** to ship the fix right away. Adjustments go through the same settings screen, with your permissions: changing settings requires **Edit service settings**, changing a variable requires **Edit variables** and deploying requires **Deploy**. Without a deploy, the adjustment takes effect from the next one. When the answer says **Nothing to change in the panel**, the fix is in the code: follow **How to fix it** and **Code changes**, and run a new deploy. ## What is sent The diagnosis uses OpenAI. It receives: - the relevant part of the log (from the deploy or the crash); - the service configuration; - variable names, without values; - repository configuration files, such as `package.json` and `Dockerfile`. Passwords and tokens that appear in the text are masked. ## Plan quota The number of diagnoses depends on the plan (**AI diagnoses** limit). The quota is per user, every 24 hours, and shows in the modal (for example, **4 left in the last 24 h**). It frees up as each request turns 24 hours old. If the plan doesn't include diagnosis, the modal tells you. To use it, change the plan in **Team → Subscription**. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). --- # Teams, members and roles > How teams work, how to invite people, choose each person's role and fine-tune permissions one by one. Everything in Ployter belongs to a team: projects, servers, integrations (cloud, GitHub, Cloudflare), templates, tokens and the subscription. Team members see and change what their role and permissions allow. ## Teams When you create your account, you get a personal team, where you're the owner. You can belong to several teams, with a different role in each. To switch teams or create another one, use the team selector in the top bar: 1. Click the current team's name. The **Teams** list appears, with your role in each. 2. Pick the team, or click **Create team**. 3. When creating, enter a name. Optionally, check **Copy integrations from another team** to bring over the clouds and GitHub already connected. 4. Click **Create and open**. Each team has its own subscription and plan limits. See [Subscription, plans and costs](https://ployter.com/en/docs/team/billing/). ## Roles | Role | What it does by default | | --- | --- | | **Owner** | Everything, including other owners, the subscription and deleting the team. | | **Admin** | Everything day to day, including members, servers and domains. Doesn't touch the subscription or permissions. | | **Developer** | Projects, services and deploys: create and edit services, variables, commands and backups. | | **Viewer** | View only: status, metrics, logs and history. | Some permissions only the owner has by default: **Manage member permissions**, **Rename and delete the team**, **Subscription and payments**, **Delete projects**, **Delete managed databases and caches**, **Remove servers**, **Server terminal** and **Manage providers**. Some that go down to admin, but not to developer: **Open terminal** (service), **Manage domains**, **Restore backup**, **Delete services**, **Create projects** and **Create managed databases and caches**. ## Invite someone 1. In the **Team** menu, open **Members**. 2. Click **Invite**. 3. Enter the **Email** and pick the **Role**. 4. Click **Invite**. ![Invite member modal with email and role](https://ployter.com/assets/docs/en/members-invite-modal.webp) The person gets the invitation by email. Anyone without an account creates one through the invitation link itself. The invitation is valid for 7 days and only works for the invited email. In **Pending invites**, you see who hasn't accepted yet. **Generate link** creates a new link to send through another channel (the previous one stops working). You can also cancel the invitation. > [!NOTE] > The plan limits the number of members (**Members** limit). Pending invites count. Only an owner can invite another owner. ## Change role and permissions In the **Members** list, open the person's menu: - **Role**: changes the role. Permissions go back to the new role's defaults. - **Permissions**: checks and unchecks permissions one by one, in groups (Panel, Team, Billing, Projects, Services, Project templates, Managed databases and buckets, Servers, Integrations). **Reset to role defaults** undoes the adjustments. - **Remove from team**: the person stops seeing the team. The account stays, with their other teams. History (deploys, logs) keeps their name. ![Member Permissions modal](https://ployter.com/assets/docs/en/members-permissions-modal.webp) Permission rules: - You can only grant what you also have. - The change takes effect on the person's next session refresh, within 30 minutes. - The **Access the panel** permission is required to sign in. Without it, the person can't sign in to the team. - The owner has no editable permissions: they have everything. > [!TIP] > To give a client or a freelancer view-only access, use the **Viewer** role. For someone who only deploys, use **Developer** and uncheck what they don't need in **Permissions**. ## Team settings In **Team → Settings**: - **Name**: shows in the team selector and in invitations. Requires the **Rename and delete the team** permission. - **Leave team**: you stop seeing everything in this team. The last owner can't leave: promote someone else first. - **Delete team**: only an empty team. First delete the projects, cloud providers and GitHub credentials. The team disappears for every member, along with its templates and invitations. ## See also - [Security: 2FA, access logs and API tokens](https://ployter.com/en/docs/team/security/) - [Notifications and alerts](https://ployter.com/en/docs/observability/notifications/): each member chooses their own alerts. --- # Security: 2FA, social sign-in, access logs and API tokens > How to protect your account with two-factor authentication, keep track of your team's sign-ins and create least-privilege API tokens for the CLI and CI. This page covers what protects access to your team: each account's two-factor authentication (2FA), access logs and the API tokens used by the CLI, CI and automations. ## Two-factor authentication (2FA) With 2FA on, sign-in asks for a 6-digit code generated by an app on your phone, in addition to your password. 1. Click your avatar at the bottom of the sidebar and open **2FA**. 2. Install an authenticator app, such as Google Authenticator, Authy or Microsoft Authenticator. 3. In the app, tap **+** and scan the QR code on screen. 4. Type the 6-digit code the app shows. 5. Click **Enable 2FA**. ![Enable 2FA screen with the QR code](https://ployter.com/assets/docs/en/security-2fa-setup.webp) To turn it off, open the same screen, click **Disable 2FA** and confirm with a code from the app. > [!TIP] > Turn on 2FA on every account with the owner or admin role. Whoever controls the team controls your connected cloud accounts. To change your password, use **Password and sign-in** in the same menu. ### Require 2FA for the team The owner can make 2FA mandatory for every member. Under **Team → Settings**, turn on **Require 2FA for all members**. Turn on 2FA for your own account first: without it, the option won't switch on. ![Require 2FA for all members option with the list of who doesn't have it yet](https://ployter.com/assets/docs/en/team-require-2fa.webp) The card lists who doesn't have 2FA yet. With the requirement on, those people see the **2FA required** notice in the team's dashboard and can only use it again after turning 2FA on. Account screens (2FA, preferences, password) and support stay open. > [!WARNING] > The requirement also applies to the API: API tokens of members without 2FA stop working in this team until they turn it on. ## Sign in with Google, GitHub, GitLab or Bitbucket Besides email and password, you can sign in with your Google, GitHub, GitLab or Bitbucket account. The buttons show up under **Sign in**, on sign-up and on the invite screen. Only the providers turned on in this dashboard appear. ![Sign-in screen with the Google, GitHub, GitLab and Bitbucket buttons](https://ployter.com/assets/docs/en/login-social.webp) - **You already have an account**: the dashboard finds it by the email confirmed at the provider and links the two the first time. After that, it works even if you change the email at the provider. - **You don't have an account**: with sign-up open, the account is created right away, without a password. Through an invite link, the account joins the team directly, as long as the provider's email is the invited one. - **2FA**: with 2FA on, the dashboard asks for the code after the provider, just like signing in with a password. The provider must report a confirmed email. If the account's email at the provider is not confirmed, sign-in is refused: confirm it there or sign in with email and password. ### Connect and disconnect sign-ins In **Password and sign-in** (avatar, at the bottom of the sidebar), the **Sign in with** card shows the providers connected to your account: - **Connect**: opens the provider and connects its account to yours. It can be an account with another email. - **Disconnect**: removes the provider from your account. ![Sign in with card on the Password and sign-in screen](https://ployter.com/assets/docs/en/account-logins.webp) An account created by social sign-in starts without a password. On the same screen, the **Create password** card creates the first one without asking for the current one. The dashboard won't let you disconnect your only way to sign in: create a password or connect another provider first. A provider account is connected to a single person: if it is already connected to someone else in the dashboard, the connection is refused. ## Audit log Under **Team → Audit log**, you see who did what in the team: deploys and rollbacks, services and projects created or deleted, edited variables, domains, databases, viewed database passwords, servers, cloud, GitHub and Cloudflare connections, members and permissions, subscription, terminal, files and SFTP. The screen requires the **View access logs** permission (owner and admin, by default). ![Audit log screen with deploys, variables and viewed passwords](https://ployter.com/assets/docs/en/team-audit.webp) Each row shows **When**, **Who**, **What** (with the name of the service, project or database, even after it's deleted), **Details** and the IP. Actions made with an API token show the token name; actions by platform support using someone's account are flagged. - Filter by **Area**, **Person** and period (**From** and **To**), or click someone's name. - **Export CSV** downloads what is filtered (up to 10,000 rows). > [!NOTE] > Variable values, passwords and file contents are never recorded: only names. Records older than the plan's history are deleted. ## Access logs In **Team → Access logs**, you see team members' sign-ins, sign-outs and failed attempts. The screen requires the **View access logs** permission (owner and admin, by default). ![Access logs screen with sign-ins and failures](https://ployter.com/assets/docs/en/security-access-logs.webp) Each row shows **When**, **Type**, **User**, the IP and the **Browser**. The types are: - **Signed in** and **Signed out**; - **Signed in (social login)**: with Google, GitHub, GitLab or Bitbucket; - **Wrong password** (the row shows the email typed); - **2FA requested** and **Wrong 2FA code**. Filter by type with the selector at the top, or click a person's name to see only their sign-ins. Records older than the plan's history (**History (days)** limit) are deleted. ## API tokens API tokens let the CLI, CI (GitHub Actions) and your automations call Ployter without your password. They start with `ply_`. ### CLI sign-in through the browser The simplest way to get a token is to run `ployter login`. The CLI opens the browser on the **Authorize the CLI** screen, which shows which machine the request came from and a code to compare with the one in the terminal. When you click **Authorize**, the panel creates a token with your permissions, valid for 1 year, named `CLI · nome-da-máquina`. See [CLI](https://ployter.com/en/docs/cli/cli/). ### Create a token 1. Click your avatar at the bottom of the sidebar and open **API tokens**. 2. Click **New token**. 3. Enter a **Name** (e.g. `GitHub Actions loja`). 4. Pick the **Expiration**: 7, 30 or 90 days, **1 year** or **Never expires**. 5. In **Owner**, choose: - **Mine (valid while I'm on the team)**: the token acts as you and loses access if you leave the team or lose permissions. - **Team (for client CI)**: the token belongs to no one and stays valid if its creator leaves. Only people with **Rename and delete the team** can create one. 6. In **Permissions**, pick **Same as mine** or **Choose**, and check only what's needed. A team token always has chosen permissions. 7. In **Projects**, pick: - **All**: every project of the team. - **Only some**: only the checked projects. - **Only those it creates from templates**: install token. It only applies the chosen templates and only touches the projects it creates with them. - **Only those it creates (agency)**: starts with no project and only sees and touches the projects it creates itself. Made for AI agents over [MCP](https://ployter.com/en/docs/cli/mcp/#token-para-um-agente-que-cria-projetos). 8. Click **Create token**. 9. Copy the token. It won't be shown again. ![New token modal with chosen permissions](https://ployter.com/assets/docs/en/security-api-token-modal.webp) > [!TIP] > For CI deploys, create a **Team** token with only **Deploy** and **View logs**, limited to the project, and store it as the `PLOYTER_TOKEN` secret. See [CLI](https://ployter.com/en/docs/cli/cli/#uso-no-ci). ### What a token can't do Even with the permission, no token: - changes members, permissions or other tokens; - changes the subscription and payments; - changes the account (password, 2FA) or the team; - approves another CLI's sign-in. These actions require the panel. That way, a leaked token can't take over the team. A token limited to projects only sees those projects, lists included, and can't manage team-wide things: servers, templates and integrations. It can only choose which team server each service of its projects runs on. You can never give a token a permission you don't have. A personal token also follows your permissions: if you lose one, the token loses it too. ### Track and revoke The list shows the name, the access (permissions and projects), **Last used** (with the IP) and when it **Expires**. Team tokens show the **team** tag. You see your own tokens and, if you manage the team, the team tokens. To cut off a token, click **Revoke**. It stops working immediately. Do this when a token leaks, when a machine is lost or when a CI is no longer used. `ployter logout` only deletes the token from the machine: it stays valid until it's revoked here. --- # Subscription, plans and costs > How to subscribe and change plans, pay invoices by card (Stripe) or Pix and boleto (Mercado Pago), what happens with late payment and cancellation, and how to read your cloud cost estimate. Ployter charges one subscription per team, which sets the plan's limits. The infrastructure (servers, databases, buckets, load balancers) is billed separately by your cloud, in your AWS, DigitalOcean, Hetzner, Vultr or Linode account. The **Costs** screen estimates how much each project spends there. ## Plans and limits Each plan sets quantity limits and enabled features: | Limit | What it controls | | --- | --- | | **Servers** | Servers created in the cloud, your own servers and those created by autoscaling. | | **Projects** | Number of projects. | | **Members** | Team members. Pending invites count. | | **Managed databases, caches and buckets** | Managed resources in the cloud. Read replicas count. | | **Replicas and load balancer** | Running a service on more than one server. | | **Autoscaling** | Scaling replicas up and down automatically. | | **SFTP access to volumes** | Accessing volumes over SFTP. | | **Scheduled backups** | Automatic backup of container databases. | | **Custom templates** | Saving and importing templates (the catalog stays available). | | **AI diagnoses** | How many diagnoses each user can request every 24 hours. | | **History (days)** | How long events, runs, access logs and deploy logs are kept. The deploy stays (rollback works), only the log goes away. | Without a paid subscription, the team uses the default plan. In **Team → Settings**, the plan card shows the usage of each limit. When an action goes over the limit, the panel refuses it with the message **Plan limit reached** and points to the plan in **Team → Subscription**. ## The Subscription screen Open **Team → Subscription**. The screen requires the **Subscription and payments** permission (owner only, by default). ![Subscription screen with the current plan, plans and invoices](https://ployter.com/assets/docs/en/billing-page.webp) It shows: - **Current plan**: the plan, the price, the payment method, the status (**Up to date**, **Past due**, **Suspended**...) and the next renewal date. - **Plans**: the available plans, in the currency and period (**Monthly** or **Yearly**) chosen at the top. - **Invoices**: each invoice with period, amount, status (**Open**, **Paid**, **Void**) and the **Pay** button on open ones. ## Subscribe or change plans 1. In **Plans**, choose the currency and period. 2. On the plan you want, click **Subscribe** (or **Switch to this one**, if you already have a subscription). 3. Choose the **Payment method**, when there's more than one. 4. Pay on the gateway's page. ![Choosing the payment method](https://ployter.com/assets/docs/en/billing-payment-method.webp) When you come back, the panel tells you the payment was sent. Confirmation comes from the gateway shortly: Pix and card right away, boleto within 2 business days. Once payment is confirmed, the plan changes and the period starts. Rules: - Changing plans creates a new invoice for the new plan's price. There's no proration: the period restarts at payment. - With an overdue invoice, pay the pending invoice before changing plans. - One checkout at a time: starting another cancels the previous unpaid one. - If payment isn't completed, the invoice stays open for you to pay whenever you want. ## Payment methods | Gateway | Methods | Currencies | Renewal | | --- | --- | --- | --- | | **Card (Stripe)** | Card | BRL, USD, EUR | Saves the card: renewal is charged automatically. | | **Pix, boleto or card (Mercado Pago)** | Pix, boleto and card | BRL | Each renewal arrives by email for you to pay. | With Stripe, the renewal invoice is issued a few days before the end of the period and charged to the saved card on the due date. With Mercado Pago, the invoice is issued about a week before and arrives by email with the payment link. You can also pay with the **Pay** button in the invoice list, and switch gateways at that point. ## Late payment and suspension - **Past due**: the invoice is overdue. The panel shows a notice at the top of the screens. - **Suspended**: the grace period shown on screen has passed. Deploys, servers and new resources are blocked. What's live keeps running. Pay the invoice in **Invoices** and everything comes back right away. ## Cancel and keep 1. In **Current plan**, click **Cancel subscription** and confirm. 2. The subscription stays active until the end of the paid period (**Canceled: valid until** the date). 3. After that, the team goes back to the default plan. Whatever goes over its limits keeps running, but you can't create more. Changed your mind before the period ends? Click **Keep subscription**. > [!NOTE] > Canceling your Ployter subscription doesn't delete anything in your cloud. Servers, databases and buckets stay in your account, billing, until you delete them. ## Costs The **Costs** screen, in the sidebar, estimates how much each project's infrastructure costs in your cloud. It requires the **View infrastructure costs** permission (owner and admin, by default). ![Costs screen with the month's projects and servers](https://ployter.com/assets/docs/en/billing-costs.webp) - Pick the month in the selector at the top. **CSV** downloads the report. - The panels show the total **So far** (or **Month total**, for closed months) and the **Month forecast**. - The projects table lists each project with its services, managed resources and **Load balancer** (the load balancer's hourly cost; traffic varies). - The **Servers** table shows each server's **Price/month** and the **Split** among services. The split uses each service's average memory and CPU for the month. Without measurements yet, it splits evenly. - **Servers without services** and **Not included** show what's billing without use, or without a known price. The price comes from the public price lists of AWS, DigitalOcean, Vultr and Linode. Hetzner bills in euros: its servers show up without a price, with the euro value in the notice. For your own server (a VPS at another provider), a discounted price or a usage-billed resource, click **Set** and type the **Monthly cost (US$)**. Leaving it empty goes back to the list price. > [!WARNING] > The estimate is in US dollars, without taxes, discounts (Savings Plans, reservations, credits) or network traffic. Your cloud invoice is the official bill. --- # Support: tickets with the Ployter team > How to open a ticket, follow the support reply, and close or reopen the conversation from the dashboard. Tickets are your team's conversation with Ployter support. They live under **Support → Tickets** in the sidebar (life buoy icon). Every team member sees the tickets and can reply, not only whoever opened them. ![Support screen with one answered ticket and one waiting](https://ployter.com/assets/docs/en/support-list.webp) ## Open a ticket 1. Under **Support → Tickets**, click **Open ticket**. 2. Write the **Subject** and pick the **Category**: Question, Problem, Billing or Suggestion. 3. In **Message**, explain what happened, what you expected and the name of the project or service. Paste the error message, if there is one. 4. Click **Open ticket**. ![Open ticket window with subject, category and message](https://ployter.com/assets/docs/en/support-new.webp) > [!CAUTION] > Never paste passwords, tokens or cloud keys into a ticket. Support doesn't need them. ## Follow the reply When support replies, the ticket moves to **Answered** and whoever opened it gets an email, in their account language, with a button to open the ticket. If that person left the team, the email goes to the owners. ![Ticket with the team's message and the support reply](https://ployter.com/assets/docs/en/support-ticket.webp) - To reply, write in the **Reply** field and click **Send** (or press Ctrl + Enter). - If the reply solved it, click **Close**. - Replying to a closed ticket opens the conversation again; you can also use **Reopen**. The **In progress**, **Closed** and **All** tabs split the tickets. Tickets with a new support reply are marked in the list. > [!TIP] > No account yet, or a sales question? Use the contact page on the website. The reply arrives by email. --- # CLI > How to install the Ployter CLI, sign in through the browser or with a token, link a folder to a service and deploy, view logs, manage variables and run commands from the terminal and from CI. The `ployter` CLI does from the terminal what you do most in the panel: deploys, logs, variables, commands on the server, the container terminal and the maintenance page. It works on your computer and in CI (GitHub Actions and others). ## Install The CLI needs Node.js 18.17 or newer. ```bash npm i -g @ployter/cli ployter help ``` Without installing, use it through `npx`: ```bash npx @ployter/cli help ``` `ployter --version` shows the installed version. ## Sign in ### On your computer: through the browser ```bash ployter login ``` 1. The CLI shows a code (e.g. `BCDF-2345`) and opens the browser on the **Authorize the CLI** screen. 2. Check that the code on screen matches the one in the terminal and that the machine is yours. 3. Click **Authorize**. 4. Go back to the terminal: it shows `Logado na equipe Acme.` (signed in to the Acme team). The request is valid for 10 minutes. The panel creates a token with your permissions, valid for 1 year, named `CLI · nome-da-máquina`. It shows up in **API tokens**, where you can revoke it. The CLI signs in to whichever team is open in the panel when you authorize. ### On a server or in CI: with a token Where there's no browser, create a token in the panel (see [API tokens](https://ployter.com/en/docs/team/security/#tokens-de-api)) and use: ```bash ployter login --token ply_... ``` Or pass the token through the `PLOYTER_TOKEN` variable, without running `login`. The variable takes precedence over the saved sign-in: ```bash PLOYTER_TOKEN=ply_... ployter status --project loja --service api ``` ### Check and sign out ```bash ployter whoami # API, team, user and token in use ployter logout # deletes the token from this machine ``` `logout` only deletes the token from the machine. It stays valid until it's revoked in the panel, in **API tokens**. The sign-in is stored in `~/.ployter/config.json`, readable only by your user. To use another folder, set `PLOYTER_HOME`. ## Link a folder to a service In the project folder, run: ```bash cd loja ployter link ``` The CLI asks for the project and service, and writes a `.ployter.json` at the repository root (where `.git` is). From then on, service commands use that service without any options. To choose without prompts: ```bash ployter link --project loja --service web ``` `ployter unlink` deletes `.ployter.json`. Every service command accepts `--service` (and `--project`) instead of `.ployter.json`. The value can be the name, the identifier or the id. Use `--project` when the same service name exists in more than one project. ```bash ployter logs --project loja --service worker ``` ## Commands ### Account | Command | What it does | | --- | --- | | `ployter login` | Signs in through the browser. With `--token ply_...`, signs in with a token. | | `ployter logout` | Signs out on this machine. | | `ployter whoami` | Shows the team and token in use. | ### Folder | Command | What it does | | --- | --- | | `ployter link` | Links the folder to a service (`--project`, `--service`). | | `ployter unlink` | Unlinks it. | ### Service | Command | What it does | | --- | --- | | `ployter status` | Status, server, domains and the last 5 deploys. | | `ployter deploy` | Deploys the branch (GitHub) and follows the log. | | `ployter up` | Uploads the local folder, without going through GitHub. | | `ployter restart` | Restarts the live version, without a build, applying the variables. | | `ployter logs` | Container logs. `-f` follows, `-n 200` sets the lines, `--process worker` reads an extra process. | | `ployter run "comando"` | Runs a command on the server (e.g. migrations). | | `ployter shell` | Opens the container terminal. | | `ployter env` | Lists the variables. | | `ployter env pull [.env]` | Downloads the variables to a file. | | `ployter env set A=1 B=2` | Saves variables. | | `ployter env unset A` | Removes variables. | | `ployter maintenance on\|off` | Turns the maintenance page on or off (`--title`, `--message`). | | `ployter open` | Opens the service in the panel. | ### AI assistants | Command | What it does | | --- | --- | | `ployter mcp` | MCP server over stdio, for Claude Desktop and other clients. See [AI assistants (MCP)](https://ployter.com/en/docs/cli/mcp/). | ### Options | Option | What it does | | --- | --- | | `--no-wait` | In `deploy`, `up` and `restart`: requests and exits, without following. | | `PLOYTER_TOKEN` | Token to use (CI). Takes precedence over the saved sign-in. | | `PLOYTER_API_URL` | A different API. | | `PLOYTER_HOME` | Configuration folder (default `~/.ployter`). | ## Deploy: `deploy` and `up` `ployter deploy` deploys the branch configured on the service, from GitHub, just like the panel's **Deploy** button. It shows the log live and ends with `Deploy #123 no ar.` (deploy #123 is live). If the deploy fails, the command exits with an error (non-zero exit code), which makes CI fail. `ployter up` uploads the local folder, with no commit and no push. The build is the same; only the code source changes. Use it to test a change before pushing to GitHub, or for a project that isn't on GitHub yet. ```bash ployter up # the repository root ployter up --path apps/api # another folder ``` The CLI packs the folder respecting `.gitignore` (in each folder) and `.ployterignore`. `.git`, `node_modules` and `.ployter.json` are never included. The package can be up to 300 MB compressed. `up` only works for services with a build: a service that runs a prebuilt image doesn't accept it. In both, `Ctrl+C` only stops following: the deploy continues on the server. See [Deploys, rollback and release command](https://ployter.com/en/docs/services/deployments/). `ployter restart` starts the live version again, without a build, with the current variables. Use it after `env set`. ## Variables ```bash ployter env # lists NAME=value ployter env pull # writes to .env ployter env pull .env.production # another file ployter env set APP_DEBUG=false LOG_LEVEL=info ployter env unset APP_DEBUG ployter restart # applies without a build ``` - `env pull` asks before replacing an existing file (`--force` replaces it without asking). The file is created readable only by your user. Don't commit this file to git. - If your role can't see the values, `env` lists only the names and `env pull` refuses. - `env set` and `env unset` take effect on the next deploy or restart. See [Variables and shared variables](https://ployter.com/en/docs/services/variables/). ## Run commands ```bash ployter run "php artisan migrate --force" ployter run -- npx prisma migrate deploy ``` The command runs on the server, in the service's container, and the output appears live. The exit code of `ployter run` is the command's, so CI stops if the migration fails. `--timeout 600` sets the maximum time, in seconds. After `--`, everything is an argument to the command, with no quotes needed. See [Processes, scheduled tasks and commands](https://ployter.com/en/docs/services/processes-and-cron/). ## Container terminal ```bash ployter shell ployter shell --process worker ``` Opens in your terminal the same terminal as the panel's **Terminal** tab. `Ctrl+D` or `exit` leaves. It needs an interactive terminal and the **Open terminal** permission. `ployter ssh` is an alias. See [Terminal](https://ployter.com/en/docs/services/terminal/). ## Logs ```bash ployter logs # last 100 lines ployter logs -n 500 # last 500 ployter logs -f # follows ployter logs -f --process worker ``` See [Logs, metrics and requests](https://ployter.com/en/docs/observability/monitoring/). ## Maintenance page ```bash ployter maintenance on --title "Voltamos já" --message "Atualizando o sistema." ployter maintenance off ``` With maintenance on, the domains show the notice page. The CLI shows a link so you can see the site during maintenance. See [Service settings](https://ployter.com/en/docs/services/settings/). ## Use in CI In CI, use a **team** token, with only the **Deploy** and **View logs** permissions, limited to the project. Store it as the `PLOYTER_TOKEN` secret. 1. In the panel, open **API tokens** and click **New token**. 2. In **Owner**, pick **Team (for client CI)**. 3. In **Permissions**, pick **Choose** and check **Deploy** and **View logs**. To run migrations with `ployter run`, also check **Run commands and scheduled tasks**. 4. In **Projects**, pick **Only some** and check the project. 5. Click **Create token** and copy it. 6. In GitHub, open the repository and go to **Settings → Secrets and variables → Actions → New repository secret**. Create the `PLOYTER_TOKEN` secret with the token. Example GitHub Actions workflow: ```yaml name: Deploy on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/setup-node@v4 with: node-version: 20 - run: npx @ployter/cli deploy --project loja --service api env: PLOYTER_TOKEN: ${{ secrets.PLOYTER_TOKEN }} ``` In CI there's no interactive terminal: always pass `--project` and `--service` (or have `.ployter.json` in the repository). Without them, the CLI asks for the option instead of prompting. > [!TIP] > If the service already deploys on every push through the GitHub webhook, don't run `ployter deploy` on the same push: that would be two deploys. Use the CLI in CI when you want the deploy to happen only after the tests. To upload the folder from CI, without going through GitHub, use `ployter up` instead of `deploy` (it needs `actions/checkout`). --- # AI assistants (MCP) > How to connect Claude (as a connector), Claude Code, Cursor and VS Code to Ployter through MCP, what an AI assistant or agent can create, monitor and manage, and how to limit its access. Ployter has an MCP (Model Context Protocol) server. With it, an AI assistant (Claude Code, Cursor, VS Code, Claude Desktop and others) or an agent you built yourself creates, inspects and operates your infrastructure: it sets up projects with services, databases and domains, reads logs and metrics, finds out why a deploy failed, deploys, rolls back and runs commands on the server. The assistant signs in with your account (in the Claude connector) or with an API token, and gets exactly the permissions you gave it. Everything it does goes to the team audit log, just like actions in the panel. ## Claude: a connector, no token In Claude (app, browser and desktop), Ployter is added as a custom connector. No token to create, no file to edit: 1. In Claude, open **Customize › Connectors**, click **+ Add** and **Add custom connector**. 2. Give it a name (e.g. `Ployter`) and paste the URL `https://api.ployter.com/mcp`. 3. Click **Connect**. Claude opens the Ployter panel; sign in if you are not signed in yet. 4. Pick the access, **The same permissions as me** or **Read only**, and click **Authorize**. ![Connect Claude screen with the access options](https://ployter.com/assets/docs/en/mcp-oauth.webp) The connector is tied to the team open in the panel when you authorize. To connect another team, switch teams first. It shows up in **API tokens** as `Claude · MCP`; revoke it there to disconnect. On Claude Team and Enterprise plans, an organization admin adds the connector in **Organization settings › Connectors**, and each person connects with their own Ployter sign-in. ## Create a token for the assistant In Claude Code, Cursor and VS Code, the assistant signs in with an API token. Click your avatar at the bottom of the sidebar, open **API tokens** and click **New token**. A token just for the assistant is the safest choice: - Under **Permissions**, pick **Choose** and tick only what it may do. To read only, **View services** and **View logs** are enough. To deploy, add **Deploy** too. - Under **Projects**, limit it to the projects it may touch. - Give it an expiry. See [Security: 2FA, access logs and API tokens](https://ployter.com/en/docs/team/security/) for details on permissions and expiry. ### Token for an agent that creates projects For an agent that sets up your clients' projects (an AI agency, an onboarding bot, your own dashboard), create a token that only sees what it creates itself: 1. In **Owner**, choose **Team**: the token stays valid if its creator leaves the team. 2. In **Permissions**, check **View projects**, **Create projects**, **View services**, **Create services**, **Edit service settings**, **Edit variables**, **Deploy**, **Start, stop and restart services**, **View logs**, **Manage domains** and **View servers**. Only check the delete permissions if the agent will really delete things. 3. In **Projects**, choose **Only those it creates (agency)**. The token starts with no project and gains each project it creates. The team's other projects don't show up for it, not even in lists. It picks which team server each service runs on, but it doesn't manage servers and doesn't use the team's Git, cloud and DNS accounts. > [!NOTE] > If the agent needs a private repository (the team's Git account) or a managed cloud database, use a token with **Projects** set to **All** and only the permissions it needs. ## Connect with the token The same screen shows the ready-made config for each client, under **AI assistants (MCP)**. Replace `ply_YOUR_TOKEN` with the token you created. ![AI assistants (MCP) block with the connector URL and a tab for each client](https://ployter.com/assets/docs/en/mcp-setup.webp) ### Claude Code ```bash claude mcp add --transport http ployter https://api.ployter.com/mcp --header "Authorization: Bearer ply_YOUR_TOKEN" ``` ### Cursor In `~/.cursor/mcp.json` (or `.cursor/mcp.json` in the project): ```json { "mcpServers": { "ployter": { "url": "https://api.ployter.com/mcp", "headers": { "Authorization": "Bearer ply_YOUR_TOKEN" } } } } ``` ### VS Code In `.vscode/mcp.json` in the project: ```json { "servers": { "ployter": { "type": "http", "url": "https://api.ployter.com/mcp", "headers": { "Authorization": "Bearer ply_YOUR_TOKEN" } } } } ``` ### Claude Desktop through the CLI If you'd rather not use the connector, Claude Desktop can also open Ployter as a local MCP server, using the [CLI](https://ployter.com/en/docs/cli/cli/) as a bridge (requires Node.js). In **Settings › Developer › Edit config**: ```json { "mcpServers": { "ployter": { "command": "npx", "args": ["-y", "@ployter/cli@latest", "mcp"], "env": { "PLOYTER_TOKEN": "ply_YOUR_TOKEN" } } } } ``` If you already ran `ployter login` on that computer, you can drop `env`: `ployter mcp` uses the CLI login. If `ployter` does not show up or disconnects: - Quit Claude Desktop for real (tray or menu bar icon, **Quit**) before editing the file. If the app is open, it saves its settings over the file on exit and the `mcpServers` block is lost. - The log is at `%APPDATA%\Claude\logs\mcp-server-ployter.log` (Windows) or `~/Library/Logs/Claude/mcp-server-ployter.log` (macOS). - `UNABLE_TO_VERIFY_LEAF_SIGNATURE` or another certificate error: an antivirus or proxy is inspecting HTTPS. Turn off its HTTPS scanning or add `"NODE_OPTIONS": "--use-system-ca"` to `env` (Node.js 22.15 or newer). ## What the assistant can do To read: - Who the token is: its permissions and the projects it reaches (the assistant starts here). - Projects, services, servers, Git accounts, cloud providers, templates and managed databases. Lists come in pages and accept a name search. - Container logs (including extra processes, such as a queue worker). - Recent deploys and a deploy's log, to understand a failure. - Metrics (CPU, memory, requests, errors and latency), HTTP requests and the service timeline (crashes, restarts, out of memory). - DNS and HTTPS certificate status of each domain. - Environment variables. Values are hidden if the token can't see secrets. To create and configure: - Create, rename and delete projects. - Create a service from GitHub, GitLab, Bitbucket or a Docker image, with variables, volumes, domains and the first deploy, in a single call. Edit its settings, duplicate it (to set up a staging copy, for example), stop it and delete it. - Create a container database (MySQL, PostgreSQL, MongoDB or Redis) with a volume and a generated password, and connect apps to it by reference, such as `${{mysql.MYSQL_URL}}`. - Create, link and delete managed cloud databases (the assistant warns that they cost money on the provider). - Add and remove domains, generate an automatic domain and point DNS on Cloudflare. - Add and remove volumes. - Apply a team template or a ready-made catalog app (WordPress, n8n, Ghost, Metabase...), with a key so a repeated request doesn't duplicate the project. First, the assistant sees what the template asks: its inputs (name, description, whether required and the default), and the variables and domains of each service. A name the template doesn't have is refused before anything is created. To operate: - Deploy, schedule a deploy, restart, roll back to an earlier deploy and cancel a deploy in progress. - Save and remove variables. They apply from the next deploy or restart. - Run a command in the container (a migration, for example) and read the output. The assistant only sees the tools the token can use. Clients ask for confirmation before actions; the ones that change what's live (rollback, commands, stop, delete) are marked as destructive. Example requests: - "Why did the last deploy of the api fail?" - "Has the payments service been slow since yesterday? Check the metrics and logs." - "Run the Laravel migrations on the store's api service." - "Create the Client X project with a MySQL and the API from the client-x/api repository on the main branch, on the FB-01 server, with the domain api.clientx.com." > [!WARNING] > With a token that can deploy or run commands, the assistant can change production. Read what it is about to do before confirming, and prefer a token limited to the right projects. ## MCP security MCP has no access rules of its own: each tool calls the same API as the panel, with the same token. The token's permissions, team isolation and project limit all apply. - **Delete with confirmation**: to delete a project, a service, a managed database or a domain, the assistant must repeat the exact name of what it is deleting. If the name doesn't match the id, nothing is deleted and it is told the real name. This avoids deleting the right item in the wrong project. - **Audit**: everything the assistant changes goes to the [audit log](https://ployter.com/en/docs/team/security/#auditoria) with the token name and the **via MCP** mark, along with the tool used. - **Untrusted content**: the server tells the assistant not to follow instructions found in logs, command output or repository code. - **Rate limit**: up to 300 calls per minute. Very large responses arrive truncated, with a notice. - **Leaked token**: revoke it in **API tokens**. It stops right away, and no token can touch members, permissions, tokens or billing. ## REST API (OpenAPI) Everything MCP does is also in the REST API, with the same token in the `Authorization: Bearer ply_...` header. The OpenAPI 3 specification is at [ployter.com/openapi.json](https://ployter.com/openapi.json). Use the file to generate an SDK (openapi-generator, orval), import it into Postman or Insomnia, or give it to your agent as context. Responses follow the `{ status, msg, data }` format. Member, token, billing and team routes are marked as panel only: with a token, they answer 403. ## Server address The MCP server is at `https://api.ployter.com/mcp` (HTTP transport, stateless). It takes the token in the `Authorization: Bearer` header or an OAuth 2.1 sign-in (PKCE, dynamic client registration and client ID metadata documents), discovered at `https://api.ployter.com/.well-known/oauth-protected-resource`.