├── LICENSE
├── README.md
├── _snippets
├── before-begin.mdx
└── languages.mdx
├── api-reference
├── authentication.mdx
├── endpoint
│ ├── apps
│ │ ├── backups
│ │ │ ├── get.mdx
│ │ │ └── post.mdx
│ │ ├── commit.mdx
│ │ ├── delete.mdx
│ │ ├── deploy
│ │ │ ├── info.mdx
│ │ │ ├── list.mdx
│ │ │ └── webhooks.mdx
│ │ ├── filemanager
│ │ │ ├── content.mdx
│ │ │ ├── delete.mdx
│ │ │ ├── list.mdx
│ │ │ ├── patch.mdx
│ │ │ └── put.mdx
│ │ ├── info.mdx
│ │ ├── logs.mdx
│ │ ├── network
│ │ │ ├── analytics.mdx
│ │ │ ├── custom.mdx
│ │ │ ├── dns.mdx
│ │ │ └── purge_cache.mdx
│ │ ├── restart.mdx
│ │ ├── start.mdx
│ │ ├── status-all.mdx
│ │ ├── status.mdx
│ │ ├── stop.mdx
│ │ └── upload.mdx
│ ├── service
│ │ └── status.mdx
│ ├── users
│ │ └── me.mdx
│ └── workspace
│ │ ├── apps
│ │ ├── add.mdx
│ │ └── remove.mdx
│ │ ├── create.mdx
│ │ ├── delete.mdx
│ │ ├── get.mdx
│ │ ├── leave.mdx
│ │ ├── list.mdx
│ │ └── members
│ │ ├── code.mdx
│ │ ├── invite.mdx
│ │ ├── kick.mdx
│ │ └── perms.mdx
└── limitations-and-restrictions.mdx
├── articles
├── getting-started-with-csharp.mdx
├── getting-started-with-elixir.mdx
├── getting-started-with-go.mdx
├── getting-started-with-java.mdx
├── getting-started-with-nodejs.mdx
├── getting-started-with-php.mdx
├── getting-started-with-python.mdx
├── getting-started-with-rust.mdx
├── how-to-create-your-package-json.mdx
├── how-to-create-your-requirements.mdx
└── personal
│ └── node.js-v20-released-with-new-features-and-improvements.mdx
├── blob-reference
├── authentication.mdx
└── endpoint
│ ├── delete.mdx
│ ├── list.mdx
│ ├── post.mdx
│ └── stats.mdx
├── cli-reference
├── authentication.mdx
├── commands.mdx
└── installation.mdx
├── company
├── brand.mdx
├── legal.mdx
└── support.mdx
├── faqs
├── automatic-deletion-files-when-deploying-an-application-to-squarecloud.mdx
├── debugging-an-application.mdx
├── troubleshooting
│ ├── ABUSE_REQUESTS.mdx
│ ├── BETTER_SQLITE3_ERROR.mdx
│ ├── INVALID_DEPENDENCY.mdx
│ ├── LACK_OF_CPU.mdx
│ ├── LACK_OF_RAM.mdx
│ ├── MODULE_NOT_FOUND.mdx
│ ├── TOKEN_INVALID.mdx
│ ├── access-website.mdx
│ ├── lavalink-closed-abnormally.mdx
│ └── whitelist-mongodb.mdx
└── using-autorestart-in-your-squarecloud-application.mdx
├── favicon.png
├── getting-started
├── config-file.mdx
├── overview.mdx
└── quick-start.mdx
├── images
├── articles
│ ├── cloudflare
│ │ ├── add-site.png
│ │ ├── domain-setup.png
│ │ ├── page-rule-www.png
│ │ ├── pending-dns.png
│ │ ├── record-dns.png
│ │ ├── timeout.png
│ │ └── unauthorized-dns.png
│ ├── discord
│ │ ├── getting-started.png
│ │ ├── getting-the-token.png
│ │ ├── intent.png
│ │ └── testing-bot.png
│ ├── github
│ │ ├── add-webhook.gif
│ │ ├── copy-access-token.png
│ │ ├── deploy-webhook-git.gif
│ │ ├── new-personal-access-token.png
│ │ └── setting_branch.gif
│ ├── teams
│ │ ├── add-app.gif
│ │ ├── add-member.gif
│ │ ├── create-team.png
│ │ ├── invite.gif
│ │ ├── profile-user.gif
│ │ ├── team-code.png
│ │ └── team.gif
│ ├── telegram
│ │ ├── getting-started.png
│ │ ├── getting-the-token.png
│ │ └── testing-bot.png
│ ├── topgg
│ │ ├── example-send.png
│ │ └── example-url.png
│ ├── troubleshooting
│ │ ├── temporarily-denied-access.png
│ │ └── website-took-too-long-to-respond.png
│ └── whatsapp
│ │ └── remote-path.png
├── background.png
├── services
│ ├── blob-speed.png
│ ├── blob.png
│ ├── bots.png
│ └── sites.png
├── troubleshooting
│ └── mongodb-whitelist.png
└── uploading.gif
├── mint.json
├── platform
├── limitations-and-restrictions.mdx
└── overview.mdx
├── sdks
├── introduction.mdx
├── js
│ ├── client.mdx
│ ├── commit_and_upload.mdx
│ ├── managing_application.mdx
│ └── managing_files.mdx
└── py
│ ├── advanced
│ ├── app_cache.mdx
│ ├── listeners.mdx
│ └── using_pydantic.mdx
│ ├── client.mdx
│ ├── commit_and_upload.mdx
│ ├── deployments.mdx
│ ├── installation.mdx
│ ├── managing_application.mdx
│ └── managing_files.mdx
├── services
├── blob.mdx
├── bots.mdx
└── sites.mdx
└── tutorials
├── como-criar-um-servidor-lavalink.mdx
├── como-hospedar-seu-website.mdx
├── how-to-create-your-lavalink-server.mdx
├── how-to-deploy-your-discord-bot.mdx
├── how-to-deploy-your-django-application.mdx
├── how-to-deploy-your-express-application.mdx
├── how-to-deploy-your-fastify-application.mdx
├── how-to-deploy-your-flask-application.mdx
├── how-to-deploy-your-nestjs-application.mdx
├── how-to-deploy-your-next-website.mdx
├── how-to-deploy-your-react-website.mdx
├── how-to-deploy-your-selenium-application.mdx
├── how-to-deploy-your-telegram-bot.mdx
├── how-to-deploy-your-vite-website.mdx
├── how-to-deploy-your-vue-website.mdx
├── how-to-deploy-your-website.mdx
├── how-to-deploy-your-whatsapp-bot.mdx
├── how-to-set-up-git-integration.mdx
├── how-to-set-up-your-domain.mdx
├── introduction.mdx
├── managing-teams.mdx
├── timezone-change-guide.mdx
└── topgg-webhook-config.mdx
/README.md:
--------------------------------------------------------------------------------
1 | # Square Cloud Documentation
2 |
3 | Welcome to the squarecloud.app Documentation! This documentation provides detailed information on how to interact with the squarecloud.app to manage and deploy your applications on the Square Cloud platform.
4 |
5 | Using the Mintlify documentation framework, we have created a simple and easy to use documentation site. The documentation site is available at [https://docs.squarecloud.app](https://docs.squarecloud.app).
6 |
7 | # Test Local
8 | Is this your first time running the documentation site locally? If so, you will need to install the Mintlify CLI.
9 |
10 | ```bash
11 | npm install mintlify --global
12 | ```
13 |
14 | Once you have installed the Mintlify CLI, you can run the documentation site locally using the following command:
15 | ```bash
16 | mintlify dev
17 | ```
18 |
19 | Documentation built with [Mintlify](https://mintlify.com). & with love by [Square Cloud](https://squarecloud.app)
--------------------------------------------------------------------------------
/_snippets/before-begin.mdx:
--------------------------------------------------------------------------------
1 | ## Before you begin
2 | To get started, create a Square Cloud account. Then you can [select the plan](https://squarecloud.app/plans) that's right for you.
3 |
4 |
5 |
11 | If you've never used Square before, sign up to get started.
12 |
13 |
19 | If you already have an account, log in to get started.
20 |
21 |
--------------------------------------------------------------------------------
/_snippets/languages.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/api-reference/authentication.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Authentication"
3 | icon: "lock"
4 | description: "Learn what it takes to authenticate to the Square Cloud API."
5 | ---
6 |
7 | First you need to get an API key from the [Developer Dashboard](https://squarecloud.app/account). You can use this API key to authenticate to the Square Cloud API.
8 |
9 | ```bash
10 | 'Authorization': ''
11 | ```
12 |
13 | ## API Usage
14 | You can use the API key to authenticate to the Square Cloud API. You can use the API key in the `Authorization` header.
15 | Remembering that the use of the API is subject to the [Terms of Service](https://squarecloud.app/legal) and the [Acceptable Use Policy](https://squarecloud.app/legal/policy).
16 |
17 |
21 | Learn about the limits and restrictions of the Square Cloud API.
22 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/backups/get.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get List of Application Backups"
3 | sidebarTitle: "/v2/apps/:appId/backups"
4 | description: "This route allows you to retrieve a list of backups (snapshots) for a specific application."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/backups"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | The ID of the application. You can find this in the URL of your application's dashboard.
14 |
15 |
16 | ### Response
17 |
18 |
19 | Indicates whether the call was successful. `success` if successful, `error` if not.
20 |
21 |
22 |
23 | The contents of the response.
24 |
25 |
26 | The ID of the application from which you fetched the backups.
27 |
28 |
29 | Size of the backup in bytes.
30 |
31 |
32 | Date of the last modification of the backup.
33 |
34 |
35 | AWS access key for the backup.
36 |
37 |
38 |
39 |
40 | ```json
41 | {
42 | "status": "success",
43 | "response": [
44 | {
45 | "name": "1d2cdc0d6ebd435c91315c6329d12eab",
46 | "size": 12900705,
47 | "modified": "2024-06-27T06:23:42.326Z",
48 | "key": "AWSAccessKeyId=access key"
49 | },
50 | {
51 | "name": "1d2cdc0d6ebd435c91315c6329d12eab",
52 | "size": 12900705,
53 | "modified": "2024-06-26T07:05:40.000Z",
54 | "key": "AWSAccessKeyId=access key"
55 | },
56 | {
57 | "name": "1d2cdc0d6ebd435c91315c6329d12eab",
58 | "size": 12900705,
59 | "modified": "2024-06-25T05:15:51.533Z",
60 | "key": "AWSAccessKeyId=access key"
61 | },
62 | ]
63 | }
64 | ```
65 |
66 | The format of the URL to download the desired backup is: https://backups.squarecloud.app/{accountID}_{name}.zip?{key}
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/backups/post.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Application Backup"
3 | sidebarTitle: "/v2/apps/:appId/backups"
4 | description: "Perform a backup of your application. It has a rate limit of 1 request every 60 seconds."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/backups"
6 | authMethod: "none"
7 | ---
8 |
9 | Each application (app ID) can only perform 12 backups every 24 hours.
10 |
11 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | The contents of the response.
25 |
26 |
27 | The URL to download the backup of your application.
28 |
29 |
30 | The key to download the backup of your application.
31 |
32 |
33 |
34 |
35 | ```json
36 | {
37 | "status": "success",
38 | "response": {
39 | "url": "https://backups.squarecloud.app/23457145698959364_a23d130fcc9ddaf2d288ae9599a4292c32.zip?AWSAccessKeyId=i06Xdad2dRD74Pm8Xly&Expires=1753081182&Signature=riWPedawcsouRAPGU5n3kGHnWoOuw%3D",
40 | "key": "AWSAccessKeyId=i06Xdad2dRD74Pm8Xly&Expires=1753081182&Signature=riWPedawcsouRAPGU5n3kGHnWoOuw%3D"
41 | }
42 | }
43 | ```
44 |
45 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/commit.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Commit Application Changes"
3 | sidebarTitle: "/v2/apps/:appId/commit"
4 | description: "Send a change to your application. It has a rate limit of 1 request every 3 seconds."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/commit"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | Use FormData or NodeJS Buffer (single file or compress [zip])
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 | A message indicating the status of the commit.
28 |
29 |
30 |
31 | ```json
32 | {
33 | "status": "success"
34 | }
35 | ```
36 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/delete.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Delete Application"
3 | sidebarTitle: "/v2/apps/:appId"
4 | description: "Remove your application from Square Cloud. (yellow category)"
5 | api: "DELETE https://api.squarecloud.app/v2/apps/{app_id}"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/deploy/info.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Deployment Information"
3 | sidebarTitle: "[...]/deployments/current"
4 | description: "Get the current deployment information for an application."
5 | api: "GET https:/api.squarecloud.app/v2/apps/{app_id}/deployments/current"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 |
25 | The contents of the response.
26 |
27 |
28 |
29 |
30 | The webhook URL for the application.
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ```json
40 | {
41 | "status": "success",
42 | "response": {
43 | "webhook": "https://api.squarecloud.app/v2/git/webhook/69ce71f11974f2cc21d47cd0a8bcbafdaacbc3c9924b23ca40e0e2032705f6391eb89b40983338e0f2415e9331d602ccc"
44 | }
45 | }
46 | ```
47 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/deploy/list.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "List Deployments"
3 | sidebarTitle: "[...]/deployments"
4 | description: "Get the last 10 deployments of an application from the last 24 hours."
5 | api: "GET https:/api.squarecloud.app/v2/apps/{app_id}/deployments"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 |
25 | The contents of the response.
26 |
27 |
28 |
29 |
30 | The ID of the deploy.
31 |
32 |
33 |
34 | The state of the deploy. Can be `pending`, `clone`, `success`, or `error`.
35 |
36 |
37 |
38 | The date the deploy was created.
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ```json
47 | {
48 | "status": "success",
49 | "response": [
50 | [
51 | {
52 | "id": "git-393caedd68f5e5b771f6a027",
53 | "state": "pending",
54 | "date": "2023-10-16T20:27:20.513Z"
55 | },
56 | {
57 | "id": "git-393caedd68f5e5b771f6a027",
58 | "state": "clone",
59 | "date": "2023-10-16T20:27:20.536Z"
60 | },
61 | {
62 | "id": "git-393caedd68f5e5b771f6a027",
63 | "state": "success",
64 | "date": "2023-10-16T20:27:21.422Z"
65 | }
66 | ]
67 | ],
68 | }
69 | ```
70 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/deploy/webhooks.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "GitHub Webhook Integration"
3 | sidebarTitle: "[...]/deploy/webhook"
4 | description: "Integrate Square Cloud with GitHub webhooks."
5 | api: "POST https:/api.squarecloud.app/v2/apps/{app_id}/deploy/webhook"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The access token for your GitHub repository. You can find this in your [GitHub Tokens Classic](https://github.com/settings/tokens/new)
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 | A message indicating the status of the commit.
28 |
29 |
30 |
31 |
32 | The contents of the response.
33 |
34 |
35 |
36 |
37 | The URL of the webhook.
38 |
39 |
40 |
41 |
42 |
43 |
44 | ```json
45 | {
46 | "status": "success",
47 | "response": {
48 | "webhook": "https://api.squarecloud.app/v2/git/webhook/"
49 | },
50 | }
51 | ```
52 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/filemanager/content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Read Application File"
3 | sidebarTitle: "[...]/files/content"
4 | description: "Read a file from your application."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/files/content"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The path to the file you want to read. This is relative to the root of your application.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | The contents of the file.
29 |
30 |
31 | The type of the data. It is "Buffer" for binary data.
32 |
33 |
34 | The data of the file represented as an array of numbers. These numbers represent the bytes of the file.
35 |
36 |
37 |
38 |
39 |
40 | ```json
41 | {
42 | "status": "success",
43 | "response": {
44 | "type": "Buffer",
45 | "data": [
46 | 112,
47 | 111,
48 | 120,
49 | 97,
50 | 44,
51 | 32,
52 | 116,
53 | 97,
54 | 32,
55 | 113,
56 | 117,
57 | 101,
58 | 114,
59 | 101,
60 | 110,
61 | 100,
62 | 111,
63 | 32,
64 | 99,
65 | 111,
66 | 112,
67 | 105,
68 | 97,
69 | 114,
70 | 32,
71 | 97,
72 | 116,
73 | 195,
74 | 169,
75 | 32,
76 | 111,
77 | 32,
78 | 98,
79 | 117,
80 | 102,
81 | 102,
82 | 101,
83 | 114,
84 | 63
85 | ]
86 | }
87 | }
88 | ```
89 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/filemanager/delete.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Delete Application File"
3 | sidebarTitle: "/v2/apps/:appId/files"
4 | description: "Delete a file from your application."
5 | api: "DELETE https://api.squarecloud.app/v2/apps/{app_id}/files"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The path of the file to delete.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | ```json
29 | {
30 | "status": "success"
31 | }
32 | ```
33 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/filemanager/list.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "List Application Files"
3 | sidebarTitle: "/v2/apps/:appId/files"
4 | description: "List the files of your application."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/files"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The path of the directory whose files you want to list. Default is the root directory.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | The list of files and directories in the specified path.
29 |
30 |
31 | The type of the entry. Can be `file` or `directory`.
32 |
33 |
34 | The name of the file or directory.
35 |
36 |
37 | The size of the file in bytes. For directories, it is 0.
38 |
39 |
40 | The last modified timestamp of the file or directory in milliseconds since the epoch.
41 |
42 |
43 |
44 |
45 |
46 | ```json
47 | {
48 | "status": "success",
49 | "response": [
50 | {
51 | "type": "file",
52 | "name": ".env",
53 | "size": 86,
54 | "lastModified": 1676168978000
55 | },
56 | {
57 | "type": "file",
58 | "name": ".gitignore",
59 | "size": 8,
60 | "lastModified": 1675125328000
61 | },
62 | {
63 | "type": "file",
64 | "name": "index.js",
65 | "size": 614,
66 | "lastModified": 1676168350000
67 | },
68 | {
69 | "type": "file",
70 | "name": "squarecloud.app",
71 | "size": 65,
72 | "lastModified": 1676169188000
73 | },
74 | {
75 | "type": "directory",
76 | "name": "src",
77 | "lastModified": 1676155738000
78 | }
79 | ]
80 | }
81 | ```
82 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/filemanager/patch.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Move Application File"
3 | sidebarTitle: "/v2/apps/:appId/files"
4 | description: "Move a file in your application."
5 | api: "PATCH https://api.squarecloud.app/v2/apps/{app_id}/files"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The path of the file to move.
19 |
20 |
21 |
22 | The path to move the file to.
23 |
24 |
25 | ### Response
26 |
27 |
28 | Indicates whether the call was successful. `success` if successful, `error` if not.
29 |
30 |
31 |
32 | ```json
33 | {
34 | "status": "success"
35 | }
36 | ```
37 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/filemanager/put.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Create/Modify Application File"
3 | sidebarTitle: "/v2/apps/:appId/files"
4 | description: "Create files in your application."
5 | api: "PUT https://api.squarecloud.app/v2/apps/{app_id}/files"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The path where the file should be created. Example: /test.txt
19 |
20 |
21 |
22 | The content of the file to be created.
23 |
24 |
25 | ### Response
26 |
27 |
28 | Indicates whether the call was successful. `success` if successful, `error` if not.
29 |
30 |
31 |
32 | ```json
33 | {
34 | "status": "success"
35 | }
36 | ```
37 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/info.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Application Information"
3 | sidebarTitle: "/v2/apps/:appId"
4 | description: "Retrieve technical information about your application."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | The status code of the response.
25 |
26 |
27 |
28 |
29 | The contents of the response.
30 |
31 |
32 |
33 |
34 | The application's name.
35 |
36 |
37 |
38 | The application's ID.
39 |
40 |
41 |
42 | The ID of the application owner.
43 |
44 |
45 |
46 | The application's cluster.
47 |
48 |
49 |
50 | The application's RAM usage in MB.
51 |
52 |
53 |
54 | The application's programming language.
55 |
56 |
57 |
58 | The application's domain (null if not applicable).
59 |
60 |
61 |
62 | Custom information about the application (null if not applicable).
63 |
64 |
65 |
66 |
67 |
68 |
69 | ```json Response
70 | {
71 | "status": "success",
72 | "response": {
73 | "name": "Best bot forever",
74 | "id": "64d0c750212742ca8704fb458c9771af",
75 | "owner": "3133971456989594464",
76 | "cluster": "fl-micron-1",
77 | "ram": 1024,
78 | "language": "rust",
79 | "domain": null,
80 | "custom": null
81 | }
82 | }
83 | ```
84 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/logs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Application Logs"
3 | sidebarTitle: "/v2/apps/:appId/logs"
4 | description: "Collect the latest logs from your application. It has a rate limit of 1 request every 5 seconds."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/logs"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 |
25 | The contents of the response.
26 |
27 |
28 |
29 |
30 | The latest logs from the application.
31 |
32 |
33 |
34 |
35 |
36 |
37 | ```json
38 | {
39 | "status": "success",
40 | "response": {
41 | "logs": "Working!"
42 | }
43 | }
44 | ```
45 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/network/analytics.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Website Analytics"
3 | sidebarTitle: "[...]/network/analytics"
4 | description: "Get analytics for a website hosted on Square Cloud. There is a rate limit of 1 uncached request every 10 seconds."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/network/analytics"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | Time range for the analytics data. It can be `daily` or `weekly`. Default is `daily`.
19 |
20 |
21 | ### Response
22 |
23 |
24 | This route can send a response in a compressed format, optimizing data transmission.
25 |
26 |
27 | Indicates whether the call was successful. `success` if successful, `error` if not.
28 |
29 |
30 |
31 | Check the Response Example in right side to see the full response.
32 |
33 |
34 |
35 | ```json
36 | {
37 | "status": "success",
38 | "response": {
39 | "visits": [
40 | {
41 | "visits": 1,
42 | "requests": 4,
43 | "bytes": 9677,
44 | "date": "2025-05-31T18:45:00Z"
45 | }
46 | ],
47 | "countries": [
48 | {
49 | "type": "BR",
50 | "visits": 1,
51 | "requests": 4,
52 | "bytes": 9677,
53 | "date": "2025-05-31T18:45:00Z"
54 | }
55 | ],
56 | "devices": [
57 | {
58 | "type": "desktop",
59 | "visits": 1,
60 | "requests": 4,
61 | "bytes": 9677,
62 | "date": "2025-05-31T18:45:00Z"
63 | }
64 | ],
65 | "os": [
66 | {
67 | "type": "Windows",
68 | "visits": 1,
69 | "requests": 4,
70 | "bytes": 9677,
71 | "date": "2025-05-31T18:45:00Z"
72 | }
73 | ],
74 | "browsers": [
75 | {
76 | "type": "Chrome",
77 | "visits": 1,
78 | "requests": 4,
79 | "bytes": 9677,
80 | "date": "2025-05-31T18:45:00Z"
81 | }
82 | ],
83 | "protocols": [
84 | {
85 | "type": "https",
86 | "visits": 1,
87 | "requests": 4,
88 | "bytes": 9677,
89 | "date": "2025-05-31T18:45:00Z"
90 | }
91 | ],
92 | "methods": [
93 | {
94 | "type": "GET",
95 | "visits": 1,
96 | "requests": 4,
97 | "bytes": 9677,
98 | "date": "2025-05-31T18:45:00Z"
99 | }
100 | ],
101 | "paths": [
102 | {
103 | "type": "/",
104 | "visits": 1,
105 | "requests": 4,
106 | "bytes": 9677,
107 | "date": "2025-05-31T18:45:00Z"
108 | }
109 | ],
110 | "referers": [
111 | {
112 | "type": "https://google.com",
113 | "visits": 1,
114 | "requests": 4,
115 | "bytes": 9677,
116 | "date": "2025-05-31T18:45:00Z"
117 | }
118 | ],
119 | "providers": [
120 | {
121 | "type": "Cloudflare",
122 | "visits": 1,
123 | "requests": 4,
124 | "bytes": 9677,
125 | "date": "2025-05-31T18:45:00Z"
126 | }
127 | ]
128 | }
129 | }
130 | ```
131 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/network/custom.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Custom Domain Integration"
3 | sidebarTitle: "[...]/network/custom"
4 | description: "Integrate your website with a custom domain. It has a rate limit of 1 request every 60 seconds."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/network/custom"
6 | authMethod: "none"
7 | ---
8 |
9 | **Is necessary to have at least the [Standard plan](https://squarecloud.app/plans) to use this route.**
10 |
11 |
12 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
13 |
14 |
15 |
16 | The ID of the application. You can find this in the URL of your application's dashboard.
17 |
18 |
19 |
20 | The custom domain you want to use.
21 |
22 |
23 | ### Response
24 |
25 |
26 | Indicates whether the call was successful. `success` if successful, `error` if not.
27 |
28 |
29 |
30 | ```json
31 | {
32 | "status": "success"
33 | }
34 | ```
35 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/network/dns.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Custom Domain DNS Records"
3 | sidebarTitle: "[...]/network/dns"
4 | description: "Get the DNS records for your custom domain."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/network/dns"
6 | authMethod: "none"
7 | ---
8 |
9 | **Is necessary to have at least the [Standard plan](https://squarecloud.app/plans) to use this route.**
10 |
11 |
12 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
13 |
14 |
15 |
16 | The ID of the application. You can find this in the URL of your application's dashboard.
17 |
18 |
19 | ### Response
20 |
21 |
22 | Indicates whether the call was successful. `success` if successful, `error` if not.
23 |
24 |
25 |
26 |
27 | The contents of the response.
28 |
29 |
30 |
31 |
32 | The type of the DNS record.
33 |
34 |
35 |
36 | The name of the DNS record.
37 |
38 |
39 |
40 | The value of the DNS record.
41 |
42 |
43 |
44 | The status of the DNS record. It can be `pending_validation`, `pending` or `active`.
45 |
46 |
47 |
48 |
49 |
50 |
51 | ```json
52 | {
53 | "status": "success",
54 | "response": [
55 | {
56 | "type": "txt",
57 | "name": "_acme-challenge.joaootavios.dev",
58 | "value": "hmo-jMx_KCWQU5CWG6xmrkI4AOZOJXlQtjEtc7zI1PA",
59 | "status": "pending_validation"
60 | },
61 | {
62 | "type": "cname",
63 | "name": "joaootavios.dev",
64 | "value": "custom.squarecloud.app",
65 | "status": "pending"
66 | }
67 | ]
68 | }
69 | ```
70 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/network/purge_cache.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Purge Cache"
3 | sidebarTitle: "[...]/network/purge_cache"
4 | description: "Purge Cache of the certain paths in the network. It has a rate limit of 1 request every 60 seconds."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/network/purge_cache"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 |
18 | The paths you want to purge the cache.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | ```json
29 | {
30 | "status": "success"
31 | }
32 | ```
33 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/restart.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Restart Application"
3 | sidebarTitle: "/v2/apps/:appId/restart"
4 | description: "Initiate your application."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/restart"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/start.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Start Application"
3 | sidebarTitle: "/v2/apps/:appId/start"
4 | description: "Initiate your application."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/start"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/status-all.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get All Applications Status"
3 | sidebarTitle: "/v2/apps/status"
4 | description: "Collect status information about all your applications in real time. It has a rate limit of 15 request every 60 seconds."
5 | api: "GET https://api.squarecloud.app/v2/apps/status"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | ### Response
14 |
15 |
16 | Indicates whether the call was successful. `success` if successful, `error` if not.
17 |
18 |
19 |
20 |
21 | The contents of the response.
22 |
23 |
24 |
25 |
26 | The application ID.
27 |
28 |
29 |
30 | The CPU usage of the application.
31 |
32 |
33 |
34 | The RAM usage of the application.
35 |
36 |
37 |
38 | Indicates whether the application is currently running.
39 |
40 |
41 |
42 |
43 |
44 |
45 | ```json
46 | {
47 | "status": "success",
48 | "response": [
49 | {
50 | "id": "5bbd020126ee4692aga43e0ca0a75454",
51 | "cpu": "0.00%",
52 | "ram": "55.88MB",
53 | "running": true
54 | },
55 | {
56 | "id": "e1b286ba30f14a87baed4b4ad3b53c47",
57 | "cpu": "0.01%",
58 | "ram": "68.44MB",
59 | "running": true
60 | }
61 | ]
62 | }
63 | ```
64 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/status.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Application Status"
3 | sidebarTitle: "/v2/apps/:appId/status"
4 | description: "Collect status information about your application."
5 | api: "GET https://api.squarecloud.app/v2/apps/{app_id}/status"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | The status code of the response.
25 |
26 |
27 |
28 |
29 | The contents of the response.
30 |
31 |
32 |
33 |
34 | The CPU usage of the application.
35 |
36 |
37 |
38 | The RAM usage of the application.
39 |
40 |
41 |
42 | The status of the application.
43 |
44 |
45 |
46 | Indicates whether the application is currently running.
47 |
48 |
49 |
50 | The storage used by the application.
51 |
52 |
53 |
54 |
55 |
56 |
57 | The total network usage of the application.
58 |
59 |
60 |
61 | The current network usage of the application.
62 |
63 |
64 |
65 |
66 |
67 |
68 | The uptime of the application in milliseconds.
69 |
70 |
71 |
72 |
73 |
74 |
75 | ```json
76 | {
77 | "status": "success",
78 | "response": {
79 | "cpu": "0.01%",
80 | "ram": "31.79",
81 | "status": "running",
82 | "running": true,
83 | "storage": "2.72MB",
84 | "network": {
85 | "total": "602 KB ↑ 134 KB ↓",
86 | "now": "14 KB ↑ 3.3 KB ↓"
87 | },
88 | "uptime": 1662927833666
89 | }
90 | }
91 | ```
92 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/stop.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Stop Application"
3 | sidebarTitle: "/v2/apps/:appId/stop"
4 | description: "Initiate your application."
5 | api: "POST https://api.squarecloud.app/v2/apps/{app_id}/stop"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the application. You can find this in the URL of your application's dashboard.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/apps/upload.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Upload Application"
3 | sidebarTitle: "/v2/apps"
4 | description: "Send an application to Square Cloud. It has a rate limit of 1 request every 3 seconds."
5 | api: "POST https://api.squarecloud.app/v2/apps"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The application to upload. Must be a ZIP file.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 | The status code of the response.
24 |
25 |
26 |
27 | The contents of the response.
28 |
29 |
30 | The ID of the uploaded application.
31 |
32 |
33 | The name of the uploaded application.
34 |
35 |
36 | The description of the uploaded application.
37 |
38 |
39 | The subdomain of the uploaded application (null if not applicable).
40 |
41 |
42 | The RAM usage of the uploaded application in MB.
43 |
44 |
45 | The CPU usage of the uploaded application.
46 |
47 |
48 |
49 |
50 | The programming language of the uploaded application.
51 |
52 |
53 | The recommended version of the programming language.
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | ```json
62 | {
63 | "status": "success",
64 | "code": "SUCCESS",
65 | "response": {
66 | "id": "945f574e6cc14ea6818f91d7d56de101",
67 | "name": "Estrelinha Legal",
68 | "description": "Nossa, fui enviada na velocidade da luz! ✨",
69 | "domain": null,
70 | "ram": 1024,
71 | "cpu": 6,
72 | "language": {
73 | "name": "JavaScript",
74 | "version": "recommended"
75 | }
76 | }
77 | }
78 | ```
79 |
--------------------------------------------------------------------------------
/api-reference/endpoint/service/status.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Square Cloud Services Status"
3 | sidebarTitle: "/v2/service/status"
4 | description: "Check the real-time status of Square Cloud services"
5 | api: "GET https://api.squarecloud.app/v2/service/status"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | This route has a 5-minute cache and does not reflect the real-time status of
11 | status.squarecloud.app.
12 |
13 |
14 | ### Response
15 |
16 |
17 | The current status of Square Cloud, with `online` indicating the service is online, `degraded` indicating issues, and `unknown` indicating unavailable.
18 |
19 |
20 | Message about the current status of Square Cloud services.
21 |
22 |
23 | ```json
24 | {
25 | "status": "online",
26 | "message": "All services are online."
27 | }
28 | ```
29 |
30 |
--------------------------------------------------------------------------------
/api-reference/endpoint/users/me.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get information about your account"
3 | sidebarTitle: "/v2/users/me"
4 | api: "GET https://api.squarecloud.app/v2/users/me"
5 | authMethod: "authorization"
6 | description: "Get information about your account."
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | ### Response
14 |
15 |
16 | Indicates whether the call was successful. `success` if successful, `error` if not.
17 |
18 |
19 |
20 |
21 | The contents of the response.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | The user's ID.
31 |
32 |
33 |
34 | The user's name.
35 |
36 |
37 |
38 | The user's email.
39 |
40 |
41 |
42 |
43 |
44 |
45 | The user's plan name.
46 |
47 |
48 |
49 | The user's plan duration in milliseconds.
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | The application's name.
64 |
65 |
66 |
67 | The application's ID.
68 |
69 |
70 |
71 | The application's description.
72 |
73 |
74 |
75 | The application's RAM usage.
76 |
77 |
78 |
79 | The application's language.
80 |
81 |
82 |
83 | The application's domain.
84 |
85 |
86 |
87 | The application's custom domain.
88 |
89 |
90 |
91 | The application's cluster.
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | ```json Response
103 | {
104 | "status": "success",
105 | "response": {
106 | "user": {
107 | "id": "313397145698959364",
108 | "name": "joaootavios",
109 | "email": "joao@squarecloud.app",
110 | "plan": {
111 | "name": "standard",
112 | "memory": {
113 | "limit": 2048,
114 | "available": 1536,
115 | "used": 256
116 | },
117 | "duration": 1732072955446
118 | }
119 | },
120 | "applications": [
121 | {
122 | "name": "Square Example APP",
123 | "id": "446b0b4118634a1c99e73bac9a54e475",
124 | "desc": "This is a example of description",
125 | "ram": 512,
126 | "lang": "javascript",
127 | "domain": "square-example-app.squareweb.app",
128 | "custom": "mydomain.com",
129 | "cluster": "fl-micron-1"
130 | }
131 | ]
132 | }
133 | }
134 | ```
135 |
136 |
137 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/apps/add.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Add App into a Workspace"
3 | sidebarTitle: "/v2/workspaces/applications"
4 | description: "Add an application into the workspace."
5 | api: "POST https://api.squarecloud.app/v2/workspaces/applications"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 |
18 | The ID of the application. You can find this in the URL of your application's dashboard.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | ```json
29 | {
30 | "status": "success"
31 | }
32 | ```
33 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/apps/remove.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Removing App from Workspace"
3 | sidebarTitle: "/v2/workspaces/applications"
4 | description: "Removes an application from the workspace."
5 | api: "DELETE https://api.squarecloud.app/v2/workspaces/applications"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 |
18 | The ID of the application. You can find this in the URL of your application's dashboard.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. `success` if successful, `error` if not.
25 |
26 |
27 |
28 | ```json
29 | {
30 | "status": "success"
31 | }
32 | ```
33 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/create.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Create Workspace"
3 | sidebarTitle: "/v2/workspaces"
4 | description: "Create a new workspace into your Square Cloud account."
5 | api: "POST https://api.squarecloud.app/v2/workspaces"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | A string representing the name of the workspace. (without extension)
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 |
25 | The contents of the response.
26 |
27 |
28 | The ID of the Workspace.
29 |
30 |
31 | The Workspace owner id.
32 |
33 |
34 | The name of the Workspace.
35 |
36 |
37 | The creation timestamp in UTC-0.
38 |
39 |
40 |
41 |
42 |
43 |
44 | ```json
45 |
46 | {
47 | "status": "success",
48 | "response": {
49 | "id": "dcedcd13d7e272a7b32a70f6a1d180f23c12d759",
50 | "owner": "5354d9742d889d49b20134ba0be09ccc0033be68",
51 | "name": "Test",
52 | "createdAt": "2025-06-04T20:44:55.934Z"
53 | }
54 | }
55 |
56 | ```
57 |
58 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/delete.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Delete Workspace"
3 | sidebarTitle: "/v2/workspaces"
4 | description: "Delete the workspace."
5 | api: "DELETE https://api.squarecloud.app/v2/workspaces"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/get.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Workspace"
3 | sidebarTitle: "/v2/workspaces/:Id"
4 | description: "Get workspace info."
5 | api: "GET https://api.squarecloud.app/v2/workspaces/{workspaceId}"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | ### Response
14 |
15 |
16 | Indicates whether the call was successful. `success` if successful, `error` if not.
17 |
18 |
19 |
20 | The contents of the response.
21 |
22 |
23 | The ID of the Workspace.
24 |
25 |
26 | The Workspace owner id.
27 |
28 |
29 | The name of the Workspace.
30 |
31 |
32 |
33 | The workspace member list.
34 |
35 |
36 | The user's ID.
37 |
38 |
39 |
40 | The user's name.
41 |
42 |
43 | The member permissions on the workspace applications.
44 |
45 |
46 | The join timestamp in UTC-0.
47 |
48 |
49 |
50 |
51 |
52 |
53 | The workspace applications list.
54 |
55 |
56 |
57 | The ID of the uploaded application.
58 |
59 |
60 | The name of the uploaded application.
61 |
62 |
63 | The RAM usage of the uploaded application in MB.
64 |
65 |
66 | The programming language of the uploaded application.
67 |
68 |
69 |
70 |
71 |
72 |
73 | The creation timestamp in UTC-0.
74 |
75 |
76 |
77 |
78 |
79 |
80 | ```json
81 | {
82 | "status": "success",
83 | "response": {
84 | "id": "dcedcd13d7e272a7b32a70f6a1d180f23c12d759",
85 | "name": "Test",
86 | "owner": "5354d9742d889d49b20134ba0be09ccc0033be68",
87 | "members": [
88 | {
89 | "name": "Example",
90 | "id": "5354d9742d889d49b20134ba0be09ccc0033be68",
91 | "group": "owner",
92 | "joinedAt": "2025-06-04T20:44:55.934Z"
93 | }
94 | ],
95 | "applications": [],
96 | "createdAt": "2025-06-04T20:44:55.934Z"
97 | }
98 | }
99 | ```
100 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/leave.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Leave Workspace"
3 | sidebarTitle: "/v2/workspaces/leave"
4 | description: "Leave from workspace."
5 | api: "DELETE https://api.squarecloud.app/v2/workspaces/leave"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 | ### Response
18 |
19 |
20 | Indicates whether the call was successful. `success` if successful, `error` if not.
21 |
22 |
23 |
24 | ```json
25 | {
26 | "status": "success"
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/list.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Workspace"
3 | sidebarTitle: "/v2/workspaces"
4 | description: "Get workspace info."
5 | api: "GET https://api.squarecloud.app/v2/workspaces"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | ### Response
14 |
15 |
16 | Indicates whether the call was successful. `success` if successful, `error` if not.
17 |
18 |
19 |
20 | The contents of the response.
21 |
22 |
23 | The ID of the Workspace.
24 |
25 |
26 | The Workspace owner id.
27 |
28 |
29 | The name of the Workspace.
30 |
31 |
32 |
33 | The workspace member list.
34 |
35 |
36 | The user's ID.
37 |
38 |
39 |
40 | The user's name.
41 |
42 |
43 | The member permissions on the workspace applications.
44 |
45 |
46 | The join timestamp in UTC-0.
47 |
48 |
49 |
50 |
51 |
52 |
53 | The workspace applications list.
54 |
55 |
56 |
57 | The ID of the uploaded application.
58 |
59 |
60 | The name of the uploaded application.
61 |
62 |
63 | The RAM usage of the uploaded application in MB.
64 |
65 |
66 | The programming language of the uploaded application.
67 |
68 |
69 |
70 |
71 |
72 |
73 | The creation timestamp in UTC-0.
74 |
75 |
76 |
77 |
78 |
79 | ```json
80 | {
81 | "status": "success",
82 | "response": [
83 | {
84 | "id": "dcedcd13d7e272a7b32a70f6a1d180f23c12d759",
85 | "name": "Test",
86 | "owner": "5354d9742d889d49b20134ba0be09ccc0033be68",
87 | "members": [
88 | {
89 | "name": "Example",
90 | "id": "5354d9742d889d49b20134ba0be09ccc0033be68",
91 | "group": "owner",
92 | "joinedAt": "2025-06-04T20:44:55.934Z"
93 | }
94 | ],
95 | "applications": [],
96 | "createdAt": "2025-06-04T20:44:55.934Z"
97 | }
98 | ]
99 | }
100 | ```
101 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/members/code.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Get Invite Code"
3 | sidebarTitle: "/v2/workspaces/members/code"
4 | description: "Get your invite code to add you into an workspace."
5 | api: "GET https://api.squarecloud.app/v2/workspaces/members/code"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | ### Response
14 |
15 |
16 | Indicates whether the call was successful. `success` if successful, `error` if not.
17 |
18 |
19 |
20 | Your team invite code.
21 |
22 |
23 |
24 |
25 | ```json
26 | {
27 | "status": "success",
28 | "code": "9c1a499e623d2410226f1ecdc7e6daaec2fc6704"
29 | }
30 | ```
31 |
32 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/members/invite.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Invite to Workspace"
3 | sidebarTitle: "/v2/workspaces/members"
4 | description: "Invites someone to an workspace."
5 | api: "POST https://api.squarecloud.app/v2/workspaces/members"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 |
18 | A string with the member invite code.
19 |
20 |
21 |
22 | The member permissions on the workspace applications
23 |
24 |
25 |
26 | ### Response
27 |
28 |
29 | Indicates whether the call was successful. `success` if successful, `error` if not.
30 |
31 |
32 |
33 | ```json
34 | {
35 | "status": "success"
36 | }
37 | ```
38 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/members/kick.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Remove Workspace Member"
3 | sidebarTitle: "/v2/workspaces/members"
4 | description: "Removes a workspace member from the workspace."
5 | api: "DELETE https://api.squarecloud.app/v2/workspaces/members"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 |
18 | The member ID.
19 |
20 |
21 |
22 | ### Response
23 |
24 |
25 | Indicates whether the call was successful. `success` if successful, `error` if not.
26 |
27 |
28 |
29 | ```json
30 | {
31 | "status": "success"
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/api-reference/endpoint/workspace/members/perms.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Change Workspace Member"
3 | sidebarTitle: "/v2/workspaces/members"
4 | description: "Changes workspace member permissions."
5 | api: "PATCH https://api.squarecloud.app/v2/workspaces/members"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The ID of the workspace.
15 |
16 |
17 |
18 | The member ID.
19 |
20 |
21 |
22 | The member permissions on the workspace applications.
23 |
24 |
25 | ### Response
26 |
27 |
28 | Indicates whether the call was successful. `success` if successful, `error` if not.
29 |
30 |
31 |
32 | ```json
33 | {
34 | "status": "success"
35 | }
36 | ```
37 |
--------------------------------------------------------------------------------
/articles/getting-started-with-csharp.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Getting Started on Square Cloud with Csharp"
3 | sidebarTitle: "Csharp"
4 | icon: "c"
5 | description: "Learn how to get started on Square Cloud with Elixir"
6 | ---
7 |
8 | ## 🚀 Introduction
9 |
10 | - Before you begin, make sure you have Dotnet on your system. If you don't have them yet, you can download them from the [official Dotnet website](https://dotnet.microsoft.com/pt-br/download).
11 | - Next, you will need to create an account on Square Cloud, which can be done through the [login page](https://squarecloud.app/login). You can use either your email or Discord, or both, to create an account.
12 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
13 |
14 | ## ⚙️ Creating the squarecloud config file
15 |
16 |
21 | The squarecloud.app file is a configuration file that will be used to
22 | configure your application; it will be used to define the name, description,
23 | version, main file, among other things.
24 |
25 |
26 | ## 📄 Required Files
27 | - **project/project.csproj** (Example of main file).
28 | In the example above, the main application file is inside a folder. If your configuration file is also inside a folder, it's necessary to define its path in the `MAIN` field, for example: `MAIN=folder/file.csproj`
29 | - [squarecloud.app](/getting-started/config-file) (file that contains the Square Cloud configuration).
30 |
31 | ## ▶️ Start Application
32 |
33 | - If the `START` field is not defined in the configuration file, Square Cloud will by default uses `restore & run` to start your application. If the `START` field is defined in the configuration file, the value in the `START` field will be executed directly. For more information on configuration file parameters, visit [configuration parameters](https://docs.squarecloud.app/getting-started/config-file#configuration-parameters).
34 |
35 | - Square Cloud uses `dotnet restore` to restore project dependencies and `dotnet run --project MAIN` to build and run the project specified by `MAIN`.
36 |
37 | ## 🖥️ Preparing Project for Upload
38 |
39 | Before hosting your project on Square Cloud, you must first have the files of your project properly configured, so that you can host it later.
40 |
41 | The configuration (`squarecloud.app/.config`) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.
42 |
43 | ## 📤 Uploading Project to Square Cloud
44 |
45 | After preparing your project files, you can now upload them to Square Cloud and host your project.
46 |
47 |
48 |
49 | Access the [Square Cloud
50 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
51 | files.
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | First, you need to have the CLI installed in your environment. If you
60 | don't have it yet, run the following command in your terminal:
61 | ```
62 | npm install -g @squarecloud/cli
63 | ```
64 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
65 |
66 |
67 | ```bash
68 | squarecloud update
69 | ```
70 |
71 |
72 | ```bash
73 | curl -fsSL https://cli.squarecloud.app/install | bash
74 | ```
75 |
76 |
77 |
78 |
79 | Now, to authenticate and use other CLI commands, you will find your
80 | authorization key [here](https://squarecloud.app/account) by clicking on
81 | "Request API Key". After obtaining your authorization key, run the
82 | following command:
83 | ```bash
84 | squarecloud login
85 | ```
86 |
87 |
88 | Finally, to deploy your application to Square Cloud using the CLI, you
89 | need to execute the following command, passing the path of your zip
90 | file:
91 | ```bash
92 | squarecloud upload zip
93 | ```
94 |
95 |
96 |
97 |
98 |
99 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/articles/getting-started-with-elixir.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Getting Started on Square Cloud with Elixir"
3 | sidebarTitle: "Elixir"
4 | icon: "flask"
5 | description: "Learn how to get started on Square Cloud with Elixir"
6 | ---
7 |
8 | ## 🚀 Introduction
9 |
10 | - Before you begin, make sure you have Elixir on your system. If you don't have them yet, you can download them from the [official Elixir website](https://elixir-lang.org/install.html).
11 | - Next, you will need to create an account on Square Cloud, which can be done through the [login page](https://squarecloud.app/login). You can use either your email or Discord, or both, to create an account.
12 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
13 |
14 | ## ⚙️ Creating the squarecloud config file
15 |
16 |
21 | The squarecloud.app file is a configuration file that will be used to
22 | configure your application; it will be used to define the name, description,
23 | version, main file, among other things.
24 |
25 |
26 | ## 📄 Required Files
27 | - main.ex (Example of main file).
28 | - mix.exs (Dependency file).
29 | - [squarecloud.app](/getting-started/config-file) (file that contains the Square Cloud configuration).
30 |
31 | ## ▶️ Start Application
32 |
33 | - If the `START` field is not defined in the configuration file, Square Cloud will run `mix run --no-halt` to start the project. If the `START` field is defined in the configuration file, the value in the `START` field will be executed directly. For more information on configuration file parameters, visit [configuration parameters](https://docs.squarecloud.app/getting-started/config-file#configuration-parameters).
34 |
35 | - Square Cloud performs a local installation of the `hex` and `rebar` tools and obtains project dependencies with `mix deps.get`.
36 |
37 | ## 🖥️ Preparing Project for Upload
38 |
39 | Before hosting your project on Square Cloud, you must first have the files of your project properly configured, so that you can host it later.
40 |
41 | The configuration (`squarecloud.app/.config`) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.
42 |
43 | ## 📤 Uploading Project to Square Cloud
44 |
45 | After preparing your project files, you can now upload them to Square Cloud and host your project.
46 |
47 |
48 |
49 | Access the [Square Cloud
50 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
51 | files.
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | First, you need to have the CLI installed in your environment. If you
60 | don't have it yet, run the following command in your terminal:
61 | ```
62 | npm install -g @squarecloud/cli
63 | ```
64 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
65 |
66 |
67 | ```bash
68 | squarecloud update
69 | ```
70 |
71 |
72 | ```bash
73 | curl -fsSL https://cli.squarecloud.app/install | bash
74 | ```
75 |
76 |
77 |
78 |
79 | Now, to authenticate and use other CLI commands, you will find your
80 | authorization key [here](https://squarecloud.app/account) by clicking on
81 | "Request API Key". After obtaining your authorization key, run the
82 | following command:
83 | ```bash
84 | squarecloud login
85 | ```
86 |
87 |
88 | Finally, to deploy your application to Square Cloud using the CLI, you
89 | need to execute the following command, passing the path of your zip
90 | file:
91 | ```bash
92 | squarecloud upload zip
93 | ```
94 |
95 |
96 |
97 |
98 |
99 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/articles/getting-started-with-go.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Getting Started on Square Cloud with Go"
3 | sidebarTitle: "Go"
4 | icon: "golang"
5 | description: "Learn how to get started on Square Cloud with Go"
6 | ---
7 |
8 | ## 🚀 Introduction
9 |
10 | - Before you begin, make sure you have Go on your system. If you don't have them yet, you can download them from the [official Go website](https://go.dev/doc/install).
11 | - Next, you will need to create an account on Square Cloud, which can be done through the [login page](https://squarecloud.app/login). You can use either your email or Discord, or both, to create an account.
12 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
13 |
14 | ## ⚙️ Creating the squarecloud config file
15 |
16 |
21 | The squarecloud.app file is a configuration file that will be used to
22 | configure your application; it will be used to define the name, description,
23 | version, main file, among other things.
24 |
25 |
26 | ## 📄 Required Files
27 | - main.go (Example of main file).
28 | - go.mod (Dependency file).
29 | - OR go.work (Dependency file).
30 | - go.sum (Checksum file, optional).
31 | - [squarecloud.app](/getting-started/config-file) (file that contains the Square Cloud configuration).
32 |
33 | ## ▶️ Start Application
34 |
35 | - If the `START` field is not defined in the configuration file, Square Cloud will run `go run MAIN` to compile and execute the Go file specified in the `MAIN` field. If the `START` field is defined in the configuration file, the value in the `START` field will be executed directly. For more information on configuration file parameters, visit [configuration parameters](https://docs.squarecloud.app/getting-started/config-file#configuration-parameters).
36 |
37 | - Square Cloud runs the `go mod tidy` command to update your project's dependencies.
38 |
39 | ## 🖥️ Preparing Project for Upload
40 |
41 | Before hosting your project on Square Cloud, you must first have the files of your project properly configured, so that you can host it later.
42 |
43 | The configuration (`squarecloud.app/.config`) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.
44 |
45 | ## 📤 Uploading Project to Square Cloud
46 |
47 | After preparing your project files, you can now upload them to Square Cloud and host your project.
48 |
49 |
50 |
51 | Access the [Square Cloud
52 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
53 | files.
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | First, you need to have the CLI installed in your environment. If you
62 | don't have it yet, run the following command in your terminal:
63 | ```
64 | npm install -g @squarecloud/cli
65 | ```
66 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
67 |
68 |
69 | ```bash
70 | squarecloud update
71 | ```
72 |
73 |
74 | ```bash
75 | curl -fsSL https://cli.squarecloud.app/install | bash
76 | ```
77 |
78 |
79 |
80 |
81 | Now, to authenticate and use other CLI commands, you will find your
82 | authorization key [here](https://squarecloud.app/account) by clicking on
83 | "Request API Key". After obtaining your authorization key, run the
84 | following command:
85 | ```bash
86 | squarecloud login
87 | ```
88 |
89 |
90 | Finally, to deploy your application to Square Cloud using the CLI, you
91 | need to execute the following command, passing the path of your zip
92 | file:
93 | ```bash
94 | squarecloud upload zip
95 | ```
96 |
97 |
98 |
99 |
100 |
101 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/articles/getting-started-with-java.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Getting Started on Square Cloud with Java"
3 | sidebarTitle: "Java"
4 | icon: "java"
5 | description: "Learn how to get started on Square Cloud with Java"
6 | ---
7 |
8 | ## 🚀 Introduction
9 |
10 | - Before you begin, make sure you have Java on your system. If you don't have them yet, you can download them from the [official Java website](https://www.java.com/download/manual.jsp).
11 | - Next, you will need to create an account on Square Cloud, which can be done through the [login page](https://squarecloud.app/login). You can use either your email or Discord, or both, to create an account.
12 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
13 |
14 | ## ⚙️ Creating the squarecloud config file
15 |
16 |
21 | The squarecloud.app file is a configuration file that will be used to
22 | configure your application; it will be used to define the name, description,
23 | version, main file, among other things.
24 |
25 |
26 | ## 📄 Required Files
27 | - project.jar (Example of main file).
28 | - MANIFEST.MF (Dependency file).
29 | - [squarecloud.app](/getting-started/config-file) (file that contains the Square Cloud configuration).
30 |
31 | ## ▶️ Start Application
32 |
33 | - If the `START` field is not defined in the configuration file, Square Cloud will run `java -jar MAIN`, where the file specified in the `MAIN` field is the `JAR` file. If the `START` field is defined in the configuration file, the value in the `START` field will be executed directly. For more information on configuration file parameters, visit [configuration parameters](https://docs.squarecloud.app/getting-started/config-file#configuration-parameters).
34 |
35 | ## 🖥️ Preparing Project for Upload
36 |
37 | Before hosting your project on Square Cloud, you must first have the files of your project properly configured, so that you can host it later.
38 |
39 | The configuration (`squarecloud.app/.config`) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.
40 |
41 | ## 📤 Uploading Project to Square Cloud
42 |
43 | After preparing your project files, you can now upload them to Square Cloud and host your project.
44 |
45 |
46 |
47 | Access the [Square Cloud
48 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
49 | files.
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | First, you need to have the CLI installed in your environment. If you
58 | don't have it yet, run the following command in your terminal:
59 | ```
60 | npm install -g @squarecloud/cli
61 | ```
62 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
63 |
64 |
65 | ```bash
66 | squarecloud update
67 | ```
68 |
69 |
70 | ```bash
71 | curl -fsSL https://cli.squarecloud.app/install | bash
72 | ```
73 |
74 |
75 |
76 |
77 | Now, to authenticate and use other CLI commands, you will find your
78 | authorization key [here](https://squarecloud.app/account) by clicking on
79 | "Request API Key". After obtaining your authorization key, run the
80 | following command:
81 | ```bash
82 | squarecloud login
83 | ```
84 |
85 |
86 | Finally, to deploy your application to Square Cloud using the CLI, you
87 | need to execute the following command, passing the path of your zip
88 | file:
89 | ```bash
90 | squarecloud upload zip
91 | ```
92 |
93 |
94 |
95 |
96 |
97 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/articles/getting-started-with-rust.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Getting Started on Square Cloud with Rust"
3 | sidebarTitle: "Rust"
4 | icon: "rust"
5 | description: "Learn how to get started on Square Cloud with Rust"
6 | ---
7 |
8 | ## 🚀 Introduction
9 |
10 | - Before you begin, make sure you have Rust on your system. If you don't have them yet, you can download them from the [official Rust website](https://www.rust-lang.org/tools/install).
11 | - Next, you will need to create an account on Square Cloud, which can be done through the [login page](https://squarecloud.app/login). You can use either your email or Discord, or both, to create an account.
12 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
13 |
14 | ## ⚙️ Creating the squarecloud config file
15 |
16 |
21 | The squarecloud.app file is a configuration file that will be used to
22 | configure your application; it will be used to define the name, description,
23 | version, main file, among other things.
24 |
25 |
26 | ## 📄 Required Files
27 |
28 | - main.rs (Example of main file).
29 | - Cargo.toml (dependency file).
30 | - [squarecloud.app](/getting-started/config-file) (file that contains the Square Cloud configuration).
31 |
32 | ## ▶️ Start Application
33 |
34 | - If the `START` field is not defined in the configuration file, Square Cloud will run the `cargo run --release` command to build and execute the code in release mode. If the `START` field is defined in the configuration file, the value in the `START` field will be executed directly. For more information on configuration file parameters, visit [configuration parameters](https://docs.squarecloud.app/getting-started/config-file#configuration-parameters).
35 |
36 | ## 🖥️ Preparing Project for Upload
37 |
38 | Before hosting your project on Square Cloud, you must first have the files of your project properly configured, so that you can host it later.
39 |
40 |
41 | The configuration (`squarecloud.app/.config`) file must be located in the root
42 | of the zip file. Otherwise, Square Cloud will not be able to find it during
43 | deployment.
44 |
45 |
46 | ## 📤 Uploading Project to Square Cloud
47 |
48 | After preparing your project files, you can now upload them to Square Cloud and host your project.
49 |
50 |
51 |
52 | Access the [Square Cloud
53 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
54 | files.
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | First, you need to have the CLI installed in your environment. If you
63 | don't have it yet, run the following command in your terminal:
64 | ```
65 | npm install -g @squarecloud/cli
66 | ```
67 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
68 |
69 |
70 | ```bash
71 | squarecloud update
72 | ```
73 |
74 |
75 | ```bash
76 | curl -fsSL https://cli.squarecloud.app/install | bash
77 | ```
78 |
79 |
80 |
81 |
82 | Now, to authenticate and use other CLI commands, you will find your
83 | authorization key [here](https://squarecloud.app/account) by clicking on
84 | "Request API Key". After obtaining your authorization key, run the
85 | following command:
86 | ```bash
87 | squarecloud login
88 | ```
89 |
90 |
91 | Finally, to deploy your application to Square Cloud using the CLI, you
92 | need to execute the following command, passing the path of your zip
93 | file:
94 | ```bash
95 | squarecloud upload zip
96 | ```
97 |
98 |
99 |
100 |
101 |
102 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
103 |
--------------------------------------------------------------------------------
/articles/how-to-create-your-package-json.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to create your package.json file"
3 | sidebarTitle: "Create your package.json"
4 | description: "Learn how to create a package.json file for Node.js projects"
5 | ---
6 |
7 | # Creating Your package.json File
8 |
9 | A `package.json` file is a standard way to specify the dependencies of your Node.js project. It lists all the external packages your project relies on, making it easier for others to reproduce your environment and for you to manage your dependencies. Here"s a step-by-step guide on how to create your `package.json` file.
10 |
11 | ## Step 1: Initialization
12 | There are two main paths to kickstart your package.json:
13 |
14 | ### Automatic (Recommended)
15 | Navigate to your project"s root directory and run `npm init -y`. This interactive prompt will guide you through filling in the basic details.
16 |
17 | ### Manual
18 | Create a file named `package.json` and write the `JSON structure yourself`. While this offers more control, it requires familiarity with the format.
19 |
20 | ## Step 2: Essential Fields
21 |
22 | Every package.json needs these key landmarks:
23 | - `name:` Your project"s unique identifier, like "my-project".
24 | - `version:` Your project"s current stage, typically starting with "1.0.0".
25 | - `description:` A concise overview of what your project does.
26 |
27 | ## Step 3: Dependencies
28 | Specify the exact version (using ==) for each package to ensure consistency and reproducibility
29 |
30 | List all the external packages your project relies on under the dependencies property. Use the package name followed by the desired version (e.g., "`discord.js`": "`^14.14.1`").
31 |
32 | **Remember:**
33 |
34 | - Exact versions (using `==`): Pin your project to specific versions for predictable behavior.
35 | - Ranges (using `^` or `~`): Allow for minor or patch updates without manual intervention.
36 |
37 | ## Step 4: Additional Features
38 |
39 | Your package.json can be a treasure trove of other helpful features:
40 |
41 | - `scripts:` Define custom commands to automate tasks like testing or deployment.
42 | - `keywords:` Improve discoverability by specifying relevant keywords.
43 | - `author:` Share your project"s creator(s).
44 |
45 | ## Step 5: Share and Use
46 |
47 | Your package.json is a vital part of sharing your project. Include it in your version control system and use it to:
48 |
49 | - Install dependencies for newcomers with `npm install `.
50 | - Deploy your project to Square Cloud.
51 |
52 | ## Bonus Tips:
53 |
54 | - Use tools like `npm audit` to identify and address potential vulnerabilities in your dependencies.
55 | - Group related dependencies into sub-packages for better organization.
56 | - Keep your package.json concise and well-documented for future reference.
57 | - When setting up your package.json, you may also encounter the `devDependencies` property. This is used to list packages that are only needed during development, such as testing libraries or build tools. These dependencies are not included when the project is deployed to production environments, like Square Cloud. This helps to keep the production environment clean and free of unnecessary packages that are not needed for the app to run.
58 |
59 | By following these steps and tips, you"ll craft a package.json that steers your Node.js project towards smooth sailing and success. Remember, a well-managed dependency landscape is a happy developer"s landscape!
--------------------------------------------------------------------------------
/articles/how-to-create-your-requirements.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to create your requirements.txt file"
3 | sidebarTitle: "Create your requirements.txt"
4 | description: "Learn how to create a requirements.txt file for Python projects"
5 | ---
6 |
7 | # Creating Your requirements.txt File
8 |
9 | A `requirements.txt` file is a standard way to specify the dependencies of your Python project. It lists all the external packages your project relies on, making it easier for others to reproduce your environment and for you to manage your dependencies. Here"s a step-by-step guide on how to create your `requirements.txt` file.
10 |
11 | ## Step 1: Activate Virtual Environment (optional but recommended)
12 |
13 | Before creating the `requirements.txt` file, it"s a good practice to work within a virtual environment to keep your project dependencies isolated. Activate your virtual environment using the appropriate command for your operating system.
14 |
15 | ## Step 2: List Dependencies
16 | Specify the exact version (using ==) for each package to ensure consistency and reproducibility
17 |
18 | Manually list all the external packages and their versions that your project depends on in the `requirements.txt` file. For example:
19 |
20 | ```plaintext requirements.txt
21 | discord.py
22 | ```
23 |
24 | ## Step 3: Review and Edit
25 |
26 | Open the `requirements.txt` file with a text editor and review the list of packages. You may want to add or remove packages or update their versions as needed.
27 |
28 | ## Step 4: Share and Use
29 |
30 | With your `requirements.txt` file ready, you can share it with your team or other developers. They can then create a virtual environment and install the exact same packages and versions.
31 |
32 | Host your project on Square now to take advantage of our seamless development environment and collaboration tools.
33 |
34 | ## Bonus Tips:
35 |
36 | - Update the `requirements.txt` file regularly as you add or update dependencies in your project.
37 | - Be cautious with using `pip freeze` with the system-wide Python environment, as it may include packages that are not strictly required for your project.
38 |
39 | Creating a `requirements.txt` file is a valuable step in managing your Python project"s dependencies and ensuring a seamless development experience for you and your collaborators.
--------------------------------------------------------------------------------
/blob-reference/authentication.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Authentication"
3 | icon: "lock"
4 | description: "Learn what it takes to authenticate to the Square Cloud API."
5 | ---
6 |
7 | First you need to get an API key from the [Developer Dashboard](https://squarecloud.app/account). You can use this API key to authenticate to the Square Cloud API.
8 |
9 | ```bash
10 | 'Authorization': ''
11 | ```
12 |
13 | ## API Usage
14 | You can use the API key to authenticate to the Square Cloud API. You can use the API key in the `Authorization` header.
15 | Remembering that the use of the API is subject to the [Terms of Service](https://squarecloud.app/legal) and the [Acceptable Use Policy](https://squarecloud.app/legal/policy).
16 |
17 |
21 | Learn about the limits and restrictions of the Square Cloud API.
22 |
--------------------------------------------------------------------------------
/blob-reference/endpoint/delete.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Blob Delete Objects"
3 | sidebarTitle: "Objects Delete"
4 | description: "This documentation provides a comprehensive overview of the DELETE /v1/objects endpoint of the SquareCloud Blob API."
5 | api: "DELETE https://blob.squarecloud.app/v1/objects"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | The name of the object to delete. The object name must adhere to the following pattern: `a to z, A to Z, 0 to 9, and _`.
15 | ```json
16 | { "object": "ID/prefix/name1_ltq7b2sw-de6241.jpeg" }
17 | ```
18 |
19 |
20 | ### Response
21 |
22 |
23 | Indicates whether the call was successful. "success" if successful, "error" if not.
24 |
25 |
26 |
27 | ```json
28 | {
29 | "status": "success",
30 | }
31 | ```
32 |
33 |
34 | ### Troubleshooting
35 |
36 |
37 | ### Object-Related
38 |
39 | ```json INVALID_OBJECTS
40 | // The provided object names are invalid.
41 | {
42 | "status": "error",
43 | "code": "INVALID_OBJECTS"
44 | }
45 | ```
46 | ```json TOO_MANY_OBJECTS
47 | // The number of objects to delete exceeds the maximum limit.
48 | {
49 | "status": "error",
50 | "code": "TOO_MANY_OBJECTS"
51 | }
52 | ```
53 | ```json FAILED_DELETE
54 | // The request to delete the objects failed. Please try again.
55 | {
56 | "status": "error",
57 | "code": "FAILED_DELETE"
58 | }
59 | ```
60 |
61 |
62 |
63 | ### Unauthorized
64 |
65 | ```json ACCESS_DENIED
66 | // Just set the correct API key in the Authorization header.
67 | {
68 | "status": "error",
69 | "code": "ACCESS_DENIED"
70 | }
71 | ```
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/blob-reference/endpoint/list.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Blob Object List"
3 | sidebarTitle: "Object List"
4 | description: "This documentation provides a comprehensive overview of the GET /v1/objects endpoint of the SquareCloud Blob API."
5 | api: "GET https://blob.squarecloud.app/v1/objects"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 |
14 | A string representing the prefix for the file.
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
15 |
16 |
17 |
18 | A string representing the continuation token for the file list.
19 |
20 |
21 | ### Response
22 |
23 |
24 | Indicates whether the call was successful. "success" if successful, "error" if not.
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | The id of the object.
36 |
37 |
38 |
39 | The size of the object in bytes.
40 |
41 |
42 |
43 | The date and time the object was created.
44 |
45 |
46 |
47 | The date and time the object will expire.
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | ```json Response - [30s cache]
59 | {
60 | "status": "success",
61 | "response": {
62 | "objects": [
63 | {
64 | "id": "ID/name1_ltq7b2sw-de6241.jpeg",
65 | "size": 78266,
66 | "created_at": "2024-03-13T19:31:28.776Z"
67 | },
68 | {
69 | "id": "ID/name_ltq7b2sw-de6243-ex1.jpeg",
70 | "size": 90466,
71 | "created_at": "2024-03-13T19:35:28.776Z",
72 | "expires_at": "2024-03-14T19:35:28.776Z"
73 | },
74 | ]
75 | }
76 | }
77 | ```
78 |
79 |
80 | ### Troubleshooting
81 |
82 |
83 | ### Object-Related
84 |
85 | ```json INVALID_PREFIX
86 | // The provided object prefix is invalid.
87 | // Must adhere to the a to z, A to Z, 0 to 9, and _ pattern.
88 | {
89 | "status": "error",
90 | "code": "INVALID_OBJECT_PREFIX"
91 | }
92 | ```
93 |
94 |
95 |
96 | ### Unauthorized
97 |
98 | ```json ACCESS_DENIED
99 | // Just set the correct API key in the Authorization header.
100 | {
101 | "status": "error",
102 | "code": "ACCESS_DENIED"
103 | }
104 | ```
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/blob-reference/endpoint/stats.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Blob Account Stats"
3 | sidebarTitle: "Account Stats"
4 | description: "This documentation provides a comprehensive overview of the GET /v1/stats endpoint of the SquareCloud Blob API."
5 | api: "GET https://blob.squarecloud.app/v1/account/stats"
6 | authMethod: "none"
7 | ---
8 |
9 |
10 | The API key for your account. You can find this in your [account settings](https://squarecloud.app/account).
11 |
12 |
13 | Status updates every 1 minute.
14 |
15 | ### Response
16 |
17 |
18 | Indicates whether the call was successful. "success" if successful, "error" if not.
19 |
20 |
21 |
22 |
23 |
24 |
25 | The total number of objects in your account.
26 |
27 |
28 | The total size of all objects in your account, in bytes.
29 |
30 |
31 | The total price of storage for all objects in your account, in BRL.
32 |
33 |
34 | The total price of all objects in your account, in BRL.
35 |
36 |
37 | The total price of all objects in your account, in BRL.
38 |
39 |
40 |
41 |
42 |
43 |
44 | ```json Response - [15m cache]
45 | {
46 | "status": "success",
47 | "response": {
48 | "objects": 5,
49 | "size": 1628388,
50 | "storagePrice": 0,
51 | "objectsPrice": 0,
52 | "totalEstimate": 0
53 | }
54 | }
55 | ```
56 |
57 |
58 | ### Troubleshooting
59 |
60 |
61 | ### Unauthorized
62 |
63 | ```json ACCESS_DENIED
64 | // Just set the correct API key in the Authorization header.
65 | {
66 | "status": "error",
67 | "code": "ACCESS_DENIED"
68 | }
69 | ```
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/cli-reference/authentication.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Authentication"
3 | icon: "lock"
4 | description: "Learn what it takes to authenticate to the Square Cloud CLI."
5 | ---
6 |
7 |
8 |
9 | First you need to get an API key from the [Developer Dashboard](https://squarecloud.app/account). You can use this API key to authenticate to the Square Cloud CLI.
10 |
11 |
12 | Authenticate to the Square Cloud CLI using the following command:
13 | ```bash
14 | squarecloud auth login
15 | ```
16 |
17 | You will be prompted to enter your API key.
18 | ```bash
19 | Your API Token:
20 | > Insert your square cloud api token
21 | ```
22 |
23 | After entering your API key, you will be authenticated to the Square Cloud CLI.
24 |
25 | You can skip the prompt by passing your API key with the `--token` flag:
26 | ```bash
27 | squarecloud auth login --token=
28 | ```
29 |
30 |
31 |
32 | ## Next steps
33 | After authenticating to the Square Cloud CLI, you can start deploying your applications.
34 |
35 |
39 | Learn how to deploy your application using the Square Cloud CLI.
40 |
41 |
46 | Learn about the commands available in the Square Cloud CLI.
47 |
48 |
--------------------------------------------------------------------------------
/cli-reference/installation.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Installation"
3 | icon: "download"
4 | description: "Learn what it takes to install the Square Cloud CLI."
5 | ---
6 |
7 | The Square Cloud CLI is a command-line tool that allows you to interact with Square Cloud services. You can use the CLI to deploy applications, manage services, and much more.
8 |
9 | ## Installation
10 | To use the CLI, you need to install it on your local machine.
11 |
12 | You can install the CLI using the following commands:
13 |
14 |
15 |
16 |
17 |
18 |
19 | ```bash macOS, Linux, and WSL
20 | curl -fsSL https://cli.squarecloud.app/install | bash
21 | ```
22 |
23 | ```bash Windows with npm
24 | npm install -g @squarecloud/cli
25 | ```
26 |
27 | ```bash Windows with yarn
28 | yarn global add @squarecloud/cli
29 | ```
30 |
31 |
32 | ## Update the CLI
33 | To update the CLI, you can run the following command:
34 |
35 | ```bash Windows
36 | npm update -g @squarecloud/cli
37 | ```
38 | ```bash Linux, macOS, and WSL
39 | curl -fsSL https://cli.squarecloud.app/install | bash
40 | ```
41 |
42 |
43 | And that's it! You have successfully updated the Square Cloud CLI. 🎉
44 |
45 | ## Next steps
46 | After installing the CLI, you need to authenticate to the Square Cloud API.
47 |
48 |
52 | Learn what it takes to authenticate to the Square Cloud CLI.
53 |
--------------------------------------------------------------------------------
/company/brand.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'Brand'
3 | description: 'Discover the origins, symbolism, and intrinsic connection of our logo at Square Cloud, a flexible cloud infrastructure designed from the ground up for adaptability.'
4 | icon: 'copyright'
5 | ---
6 |
7 | ## Origin of the Logo
8 |
9 | The logo of Square Cloud has been thoughtfully designed to reflect the values and objectives of our company. It consists of two squares positioned at a specific angle, resulting in an appearance that resembles a "Docker container."
10 |
11 | ### The Meaning Behind the Logo
12 |
13 | 1. **Two Squares**: The two squares in our logo represent the solid foundation on which we build our cloud infrastructure. Each square symbolizes the robustness and reliability of our services.
14 |
15 | 2. **Docker Container**: The positioning of the squares was carefully chosen to evoke the image of a Docker container, which is a widely used technology in the world of cloud computing. This visually represents our flexible and adaptable approach to providing efficient and scalable solutions to our clients.
16 |
17 | ### The Flexible Infrastructure
18 |
19 | Our company was born with the vision of creating a highly flexible cloud platform capable of meeting the ever-evolving needs of businesses of all sizes. The Square Cloud logo, with its angular squares, symbolizes this commitment to flexibility.
20 |
21 | #### Key Features of Our Infrastructure:
22 |
23 | 1. **Elasticity**: Our infrastructure is designed to scale vertically and horizontally, allowing you to increase or decrease resources according to your business demands.
24 |
25 | 2. **Portability**: Just like Docker containers can run in different environments, our services can be easily migrated between public and private clouds, providing greater freedom of choice.
26 |
27 | 3. **Agility**: With container-based technology as the foundation, we can deploy solutions quickly, ensuring minimal downtime for deployments and updates.
28 |
29 | 4. **Scalability**: The two squares in our logo also represent the scalability of our services. With automated and optimized resources, we can handle intense and growing workloads.
30 |
31 | ### Our Online Domains
32 |
33 | To complement our commitment to flexibility, we are proud to provide a range of online domains where you can access our services and resources. These domains are designed to ensure ease of access and use for our valued clients:
34 |
35 | - [squarecloud.app](https://squarecloud.app): Our main domain, where you can find detailed information about our services, solutions, and company updates.
36 | - [dash.squarecloud.app](https://squarecloud.app/dashboard): Aliases to our dashboard, where you can access your Square Cloud account and manage your cloud infrastructure with ease.
37 | - [api.squarecloud.app](https://api.squarecloud.app): Our API domain, where you can find detailed information about our API and its endpoints.
38 | - [squareweb.app](https://squarecloud.app): Our official domain that connects our clients' projects with the world.
39 |
40 | We also have the following domains:
41 | - squarecloud.org -> squarecloud.app
42 | - squarecloud.dev -> squarecloud.app
43 | - squarecloud.xyz -> squarecloud.app
44 | - squarecloud.email -> squarecloud.app
45 | - squarecloud.com.br -> squarecloud.app
46 |
47 | Curiosity, we use .org & .email to send emails, like noreply@ emails.
48 |
49 | ## Conclusion
50 |
51 | The Square Cloud logo is much more than a simple visual representation. It encapsulates our company's philosophy and commitment to providing a flexible and reliable cloud infrastructure.
--------------------------------------------------------------------------------
/company/legal.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'Legal'
3 | description: 'Square Cloud Legal Information, EULA, and Privacy Policy'
4 | icon: 'file-contract'
5 | ---
6 |
7 | ## End-User License Agreement (EULA)
8 |
9 | Welcome to Square Cloud! Before you proceed to use our services, please carefully read and understand our End-User License Agreement (EULA). By accessing or using any part of our platform, you agree to be bound by the terms and conditions outlined in this agreement.
10 |
11 | You can access the full End-User License Agreement [here](https://squarecloud.app/legal).
12 |
13 | ## Privacy Policy
14 |
15 | Protecting your data and privacy is of utmost importance to us. Our Privacy Policy outlines how we collect, use, and disclose your personal information when you use our services. It also explains the measures we take to safeguard your data.
16 |
17 | To learn more about our Privacy Policy, please visit [https://squarecloud.app/legal/policy](https://squarecloud.app/legal/policy).
18 |
19 | If you have any questions or concerns regarding our legal documents or need assistance, please contact our support team.
--------------------------------------------------------------------------------
/company/support.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'Support'
3 | description: 'Get in touch with Square Cloud Support Team'
4 | icon: 'envelope'
5 | ---
6 |
7 | ## Contact Information
8 |
9 | - General Inquiries: contact@squarecloud.app
10 | - Legal Matters: legal@squarecloud.app
11 |
12 |
13 |
14 |
19 | Support Center - Customer Service.
20 |
21 |
27 | Text us on Whatsapp.
28 |
29 |
35 | Text us on Telegram.
36 |
37 |
43 | Join our Discord community server.
44 |
45 |
46 |
47 | ## Social Media
48 |
49 | Connect with us on social media, but please note that support response times may vary:
50 |
51 |
52 |
59 | Follow us on Instagram!
60 |
61 |
68 | Follow us on Twitter!
69 |
70 |
77 | Subscribe! 🥰
78 |
79 |
80 | For the quickest and most efficient support, we recommend using our Discord server or contacting the appropriate email addresses mentioned above.
81 |
--------------------------------------------------------------------------------
/faqs/automatic-deletion-files-when-deploying-an-application-to-squarecloud.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Automatic Deletion of Files When Deploying an Application to Square Cloud"
3 | sidebarTitle: "File Whitelisting in Square Cloud"
4 | description: "Learn about the files that are automatically deleted when deploying an application to Square Cloud."
5 | ---
6 |
7 | When deploying your application to Square Cloud, you might encounter a scenario where certain files are automatically deleted during the deployment process. Understanding the files that are subject to automatic deletion is crucial for ensuring a smooth deployment experience. Here, we provide a list of files that are commonly deleted during deployment and need to be excluded from your deployment package.
8 |
9 | ## List of Files to Exclude:
10 |
11 | - `.cache`
12 | - `.config`
13 | - `.composer`
14 | - `.dockerenv`
15 | - `.git`
16 | - `.husky`
17 | - `.logs`
18 | - `.local`
19 | - `.npm`
20 | - `.next`
21 | - `.pki`
22 | - `.replit`
23 | - `.upm`
24 | - `.vscode`
25 | - `__pycache__`
26 | - `Cargo.lock`
27 | - `.npmrc`
28 | - `node_modules`
29 | - `package-lock.json`
30 | - `replit.nix`
31 | - `replit_zip_error_log.txt`
32 | - `target`
33 | - `yarn.lock`
34 | - `.venv`
35 | - `.breakpoints`
36 | - `pycache`
37 |
38 | These files are typically related to development environments, build configurations, and dependencies. Square Cloud may automatically remove them during the deployment process to optimize the application's performance and reduce unnecessary data transfer.
39 |
40 | It's important to note that certain development tools and platforms generate these files for local development purposes. However, they are not essential for the application to run in a production environment. Therefore, excluding them during deployment ensures a more efficient and streamlined application deployment process.
41 |
42 | To prevent these files from being deleted during deployment, make sure to exclude them from your deployment package or configure your deployment process accordingly. Understanding and managing these files will help you deploy your application smoothly on Square Cloud while maintaining a clean and efficient deployment package.
43 |
44 | For more information on deploying applications on Square Cloud and managing whitelists, refer to the [Square Cloud documentation](https://docs.squarecloud.app/).
45 |
--------------------------------------------------------------------------------
/faqs/debugging-an-application.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to debug your Application"
3 | description: "Learn how to debug your application using discord.py and discord.js."
4 | ---
5 |
6 | ## Debugging in [**discord.js**](https://old.discordjs.dev/#/docs/discord.js/14.14.1/class/Client?scrollTo=e-debug)
7 | With discord.js, you can utilize the "debug" and "error" events for debugging. Here's an example:
8 |
9 | ```js
10 | // The client listens for a 'debug' event
11 | client.on('debug', (info) => {
12 | // Logs the debug info to the console
13 | console.log(`Debug Info: ${info}`);
14 | });
15 |
16 | // The client listens for an 'error' event
17 | client.on('error', (error) => {
18 | // Logs the error message to the console
19 | console.error(`Encountered an Error: ${error.message}`);
20 | });
21 | ```
22 |
23 | In this code, we use the 'debug' event; it is triggered to provide general debugging information, and the debug messages are logged to the console. Similarly, when the 'error' event is triggered, the error message is logged to the console.
24 |
25 | ## Debugging in [**discord.py**](https://discordpy.readthedocs.io/en/stable/logging.html?highlight=debug)
26 | With discord.py, you can use the logging module for debugging. Here's an example:
27 |
28 | ```py
29 | import logging
30 | import logging.handlers
31 |
32 | # Sets up the logger for discord
33 | logger = logging.getLogger('discord')
34 | logger.setLevel(logging.DEBUG)
35 | logging.getLogger('discord.http').setLevel(logging.INFO)
36 |
37 | # Sets up the handler for the logger
38 | handler = logging.StreamHandler()
39 | dt_fmt = '%Y-%m-%d %H:%M:%S'
40 | formatter = logging.Formatter('[{asctime}] [{levelname:<8}] {name}: {message}', dt_fmt, style='{')
41 | handler.setFormatter(formatter)
42 | logger.addHandler(handler)
43 |
44 | # Runs the bot
45 | client.run("your token here", log_handler=None)
46 | ```
47 | In this code, all debugging information and errors are logged to the console.
48 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/ABUSE_REQUESTS.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving ABUSE_REQUESTS"
3 | sidebarTitle: "Solving ABUSE_REQUESTS"
4 | description: "Learn how to address the ABUSE_REQUESTS error, caused by excessive requests to Discord and/or Amino APIs, and ensure your application runs smoothly."
5 | ---
6 |
7 | ## When does it occur?
8 |
9 | The ABUSE_REQUESTS error occurs when your application is shut down due to a high volume of requests made to the Discord and/or Amino APIs. This may result from inefficient coding practices, lack of caching mechanisms, or surpassing the allocated request limits.
10 |
11 | ```bash
12 | [SQUARE-SHIELD] ABUSE_REQUESTS
13 | ```
14 |
15 | ## Why does it occur?
16 |
17 | This error typically arises when your application exceeds the permissible limits for making requests to the Discord and/or Amino APIs. It could be a consequence of a rapid increase in user activity or inefficient coding that generates an excessive number of API calls.
18 |
19 | ## How to fix
20 |
21 | Addressing the ABUSE_REQUESTS error involves monitoring and optimizing the sections of your code responsible for API requests, implementing effective caching mechanisms, and, if necessary, requesting an increase in your API request limit through the official support channels.
22 |
23 | ### Monitor and Optimize Your Code
24 |
25 | - Identify Problematic Code: Use logging tools or profiling to pinpoint sections of your code that generate a large number of API requests.
26 | - Optimize API Calls: Review and optimize the code responsible for API calls. Minimize unnecessary requests and ensure that each call is essential for your application's functionality.
27 |
28 | ### Implement Caching Mechanisms
29 |
30 | - Use Local Caching: Store frequently requested data locally to avoid unnecessary API calls. This reduces the load on the servers and improves response times.
31 | - Set Expiry Times: Implement caching with expiration times to ensure that your application fetches fresh data when necessary while minimizing the number of API requests.
32 |
33 | ### Request an Increase in Request Limit
34 |
35 | If your application genuinely requires a higher API request limit, consider reaching out to the Discord and/or Amino support channels to request an increase. Provide justifications for the increased limit and any measures you've taken to optimize your code.
36 |
37 | ### Keep Your Application Updated
38 |
39 | Ensure your application is using the latest version of any libraries or SDKs interacting with the APIs. Regularly check for updates, as developers often release new versions to address performance issues and improve efficiency.
40 |
41 | ```bash Update discord.js
42 | npm install discord.js@latest
43 | # or update in your package.json
44 | ```
45 |
46 | ```bash Update discord.py
47 | pip install discord.py
48 | # or update in your requirements.txt
49 | ```
50 |
51 | ### Test and Restart Your Application
52 |
53 | After making the necessary changes, thoroughly test your application to ensure that the modifications effectively reduce the number of API requests. Additionally, restart your application to apply the updates and monitor its performance.
54 |
55 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
56 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/BETTER_SQLITE3_ERROR.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving 'Could not locate the bindings file'"
3 | sidebarTitle: "Solving BETTER_SQLITE3_ERROR"
4 | description: "Learn how to resolve the 'Could not locate the bindings file' issue in your application."
5 | ---
6 |
7 | ## When does it occur?
8 |
9 | This issue happens when the `better-sqlite3` library or a library that depends on it, like `quick.db`, is not updated.
10 |
11 | ```bash
12 | Error: Could not locate the bindings file. Tried:
13 | → /application/node_modules/better-sqlite3/build/better_sqlite3.node
14 | [...]
15 | ```
16 |
17 | ## Why does it occur?
18 |
19 | This error occurs because the `better-sqlite3` library has not been updated to the latest version. In `better-sqlite3` **11.x.x and earlier**, the library **was not support Node.js LTS v22**.x.x.
20 |
21 | ## How to fix
22 |
23 | To fix this issue, you need to update the `better-sqlite3` library to the latest version. Remember to update libraries that depend on `better-sqlite3`, like `quick.db`.
24 |
25 | ### Check the latest versions of the libraries:
26 | - [npm better-sqlite3](https://www.npmjs.com/package/better-sqlite3)
27 | - [npm quick.db](https://www.npmjs.com/package/quick.db)
28 |
29 |
30 | ### Update the `better-sqlite3` in your `package.json`
31 |
32 | After checking the latest version of the library, you can update it in your `package.json`. For example, if the current version is 11.10.0, you can use the following:
33 |
34 | ```json Update manually in your package.json
35 | "better-sqlite3": "^11.10.0",
36 | "quick.db": "^9.1.7" // or any other library that depends on better-sqlite3
37 | ```
38 |
39 | ```bash Update using the terminal
40 | npm install better-sqlite3@latest
41 | ```
42 |
43 | ### Removing files for a clean installation
44 |
45 | After updating your `package.json`, you should remove the files and folders: `node_modules`, `package-lock.json`, and the `.npm` folder.
46 |
47 | ### Reboot Your Application
48 |
49 | In conclusion, simply restart your application by clicking on the blue button. If you have followed all the steps correctly, your application should no longer encounter this error.
50 |
51 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
52 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/INVALID_DEPENDENCY.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving INVALID_DEPENDENCY"
3 | sidebarTitle: "Solving INVALID_DEPENDENCY"
4 | description: "Learn how to resolve the Solving INVALID_DEPENDENCY issue in your application."
5 | ---
6 |
7 | ## When does it occur?
8 |
9 | This issue occurs when your dependency file could not be located in the root of your application.
10 |
11 | ## Why does it occur?
12 |
13 | This issue occurs when your dependency file could not be located in the root of your application. This can happen when your dependency file does not exist or its nominated with an extra `.txt`.
14 |
15 | ## How to fix
16 |
17 | ### For Node.js (package.json)
18 |
19 | 1. **Navigate to the root directory of your project:**
20 | Ensure that you are in the main directory of your application.
21 |
22 | 2. **Check for the presence of `package.json`:**
23 | Verify whether the `package.json` file exists in the root directory. If it is not present, create one using the following command:
24 | ```bash
25 | npm init -y
26 | ```
27 | This command initializes a default `package.json` file.
28 |
29 | 3. **Ensure correct naming:**
30 | Confirm that the file is named exactly as `package.json` and does not have any additional extensions (e.g., `package.json.txt`). If there are any discrepancies, rename the file accordingly.
31 |
32 | ### For Python (requirements.txt)
33 |
34 | 1. **Navigate to the root directory of your project:**
35 | Make sure you are in the main directory of your application.
36 |
37 | 2. **Check for the presence of `requirements.txt`:**
38 | Confirm whether the `requirements.txt` file exists in the root directory. If it is missing, create one.
39 |
40 | 3. **Ensure correct naming:**
41 | Verify that the file is named exactly as `requirements.txt` without any additional extensions (e.g., `requirements.txt.txt`). If the name is incorrect, rename the file accordingly.
42 |
43 | 4. **Add dependencies to the file:**
44 | Open the `requirements.txt` file and add the necessary dependencies for your Python project. For example:
45 |
46 | ```plaintext requirements.txt
47 | discord.py
48 | ```
49 |
50 | ### Additional Tips:
51 |
52 | - **Double-check file extensions:**
53 | Ensure that the file extensions are correct (e.g., `.json` for Node.js, `.txt` for Python). Incorrect extensions might lead to the `INVALID_DEPENDENCY` error.
54 |
55 | - **Review documentation and guides:**
56 | Consult the documentation for your specific programming language ([Node.js](/articles/getting-started-with-nodejs)/[Python](/articles/getting-started-with-python)).
57 |
58 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
59 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/LACK_OF_CPU.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving LACK_OF_CPU"
3 | sidebarTitle: "Solving LACK_OF_CPU"
4 | description: "Learn how to resolve the LACK_OF_CPU issue in your application."
5 | ---
6 |
7 | ## When does it occur?
8 |
9 | This issue occurs when your application is using more CPU than is available.
10 |
11 | ```bash
12 | [SQUARE-SHIELD] LACK_OF_CPU
13 | ```
14 |
15 | ## Why does it occur?
16 |
17 | This issue occurs when your application is using more CPU than is available. This can happen when your application is under heavy load, or when your application is not optimized to use less CPU.
18 |
19 | ## How to fix
20 |
21 | The CPU allocated to your application is determined by your current plan. To address this, consider upgrading to a higher plan on the [plans page](https://squarecloud.app/plans). Alternatively, optimize your application to reduce CPU usage.
22 |
23 | ### Resubmitting your application
24 |
25 | After upgrading your plan, it's important to remove your application and resubmit it to reflect the updated CPU allocation.
26 |
27 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
28 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/LACK_OF_RAM.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving LACK_OF_RAM"
3 | sidebarTitle: "Solving LACK_OF_RAM"
4 | description: "Learn how to resolve the LACK_OF_RAM issue in your application."
5 | ---
6 |
7 | ## When does it occur?
8 |
9 | This issue occurs when your application is using more RAM than is available.
10 |
11 | ```bash
12 | [SQUARE-SHIELD] LACK_OF_RAM
13 | ```
14 |
15 | ## Why does it occur?
16 |
17 | This issue occurs when your application is using more RAM than is available. This can happen when your application is using more RAM than is available on your current plan.
18 |
19 | ## How to fix
20 |
21 | Navigate to the file manager and locate the `squarecloud.app/config` file.
22 | 1. Open the file and locate the `MEMORY` field.
23 | 2. Increase the value of the `MEMORY` field. The value is in megabytes (MB).
24 | 3. We recommend increasing the value by 50% of the current value. For example, if the current value is `512`, increase it to `768`.
25 |
26 | If you are already using the maximum available RAM based on your current plan, consider upgrading to a higher plan by visiting the [plans page](https://squarecloud.app/plans).
27 |
28 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
29 |
--------------------------------------------------------------------------------
/faqs/troubleshooting/MODULE_NOT_FOUND.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving MODULE_NOT_FOUND"
3 | sidebarTitle: "Solving MODULE_NOT_FOUND"
4 | description: "Learn how to resolve the MODULE_NOT_FOUND issue in your application."
5 | ---
6 |
7 | ## When does it occur?
8 | This error occurs when your application tries to use a library that is not installed in the environment.
9 |
10 | ```bash javascript
11 | Error: Cannot find module 'discord.js'
12 | ```
13 |
14 | ```bash python
15 | ModuleNotFoundError: No module named 'discord.py'
16 | ```
17 |
18 | ## Why does it occur?
19 |
20 | This can happen when you try to use a library that is not installed by default in the environment. For example, the `discord.js` library is not installed by default in the JavaScript environment.
21 |
22 | ## How to fix
23 |
24 | To fix this, you need to add the missing library to your project's dependency files. These files list the libraries that will be installed in the environment. In the case of Python, this file is called `requirements.txt`, and for JavaScript, it is called `package.json`.
25 |
26 | Here is an example of the content of these files after adding the missing libraries:
27 |
28 | ```json package.json
29 | {
30 | "name": "my-app",
31 | "version": "1.0.0",
32 | "dependencies": {
33 | "discord.js": "14.14.1",
34 | // other dependencies...
35 | }
36 | }
37 | ```
38 |
39 | ```txt requirements.txt
40 | discord.py
41 | # other dependencies...
42 | ```
43 |
44 | ### Reboot Your Application
45 |
46 | After adding the necessary libraries to your project's dependency files, you should reboot your application. This allows your environment to recognize and install the newly added libraries.
47 |
48 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/faqs/troubleshooting/TOKEN_INVALID.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving TOKEN_INVALID"
3 | sidebarTitle: "Solving TOKEN_INVALID"
4 | description: "Learn how to resolve the TOKEN_INVALID code error and ensure smooth communication with the Discord API."
5 | ---
6 |
7 | ## When does it occur?
8 | The authentication token for your Discord bot was not found or appears to be invalid. This might happen if the token is regenerated, revoked, or the bot's access to the server is restricted.
9 |
10 | ```bash discord.js
11 | Error [TOKEN_INVALID]: An invalid token was provided.
12 | ```
13 |
14 | ```bash discord.py
15 | LoginFailure: Improper token has been passed.
16 | ```
17 |
18 | ## Why does it occur?
19 | You will encounter this error when your application attempts to authenticate with the Discord API using an invalid or outdated bot token.
20 |
21 | ## How to fix
22 |
23 | Ensure that the token provided when creating the Discord.js client is accurate and up-to-date. If you suspect the token might be invalid, regenerate it on the Discord Developer Portal.
24 |
25 | ### Regenerate the Token
26 | If you have confirmed that the current token is invalid or compromised, generate a new one on the [Discord Developer Portal](https://discord.com/developers/applications).
27 |
28 | ### Update the Token in Your Code
29 | If you are using a `.env` file to store the token, make sure to update the file with the new token.
30 |
31 | Generally, the token is stored in `.env` or `config,json` files. If you are using a different method to store the token, update the code accordingly.
32 |
33 | ### Keep the library up to date
34 |
35 | Ensure you are using the latest version of your library. Developers regularly update the library to fix bugs and address compatibility issues.
36 |
37 | ```bash Update discord.js
38 | npm install discord.js@latest
39 | # or update in your package.json
40 | ```
41 |
42 | ```bash Update discord.py
43 | pip install discord.py
44 | # or update in your requirements.txt
45 | ```
46 |
47 | ### Reboot Your Application
48 |
49 | After implementing the changes, restart your application to apply the updates. This ensures that the new token and any code modifications take effect.
50 |
51 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/faqs/troubleshooting/access-website.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Troubleshooting Access Issues on Website or API"
3 | sidebarTitle: "Website Access Problems"
4 | description: "Discover how to resolve issues when accessing your website or API."
5 | ---
6 |
7 | ## Unauthorized
8 |
9 | - There are 2 situations that can result in this message when trying to access a website/API:
10 |
11 | 1. The URL of the site you tried to access is not hosted on Square Cloud. Any subdomain of a site that is not hosted on Square Cloud and is attempted to be accessed will receive the message "Unauthorized". If you added the "SUBDOMAIN" field after deploying your application, this field will not be read, and the URL will not exist because this field is only read during the deployment. Therefore, you need to remove and redeploy your application with this field correctly configured.
12 |
13 | 2. If you have recently hosted your site, please wait 1 minute. Square Cloud is finalizing the configurations for your site. After this period, try accessing it again.
14 |
15 |
16 |
17 |
18 |
19 | ## Timeout
20 |
21 | - There are 4 situations that can result in this message when trying to access a website/API:
22 |
23 | 1. Your website or API may have errors preventing it from responding properly.
24 |
25 | 2. If the website or API is offline, you will also receive this message. It's important to check the logs to identify any potential errors.
26 |
27 | 3. In Square Cloud, the default port for websites and APIs is port `80` for HTTP traffic. If your website or API is using a different port, you may encounter this error message.
28 |
29 | 4. If you do not correctly configure the host as `0.0.0.0` when hosting your site, this can lead to access errors.
30 |
31 |
32 |
33 |
34 |
35 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/faqs/troubleshooting/lavalink-closed-abnormally.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Solving Lavalink Closed Abnormally issue"
3 | sidebarTitle: "Lavalink Closed Abnormally"
4 | description: "Due to recent Lavalink updates you may come across the following error: Lavalink Closed Abnormally. This article will help you solve this issue."
5 | ---
6 |
7 | ## When does it occur?
8 | When you are trying to connect your Lavalink server to your app hosted on Square Cloud, you may come across the following error:
9 |
10 | ```
11 | Error: Unexpected server response: 400
12 | Error: WebSocket closed abnormally with code 1006.
13 | ```
14 |
15 | ## Why does it occur?
16 | You will receive this error if you are using a Lavalink version that is not compatible with the library you are using.
17 | For example, if you are using the Lavalink version 4.0.0, you will receive this error if you are using the Lavalink client version 3, as the Lavalink version 4 is entirely REST.
18 |
19 | ## How to fix
20 | To fix this error, you will need to update your Lavalink client to the latest version. Or use a Lavalink version that is compatible with your Lavalink client.
21 |
22 | ### Bonus Tips:
23 | - Remember to open your Lavalink server in port 80.
24 | - Connect in your Lavalink server using port 443 and option `secure: true`.
25 |
26 | Congratulations! You have successfully solved the Lavalink Closed Abnormally issue. Now you can connect your Lavalink to your app hosted on Square Cloud.
27 |
28 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/faqs/troubleshooting/whitelist-mongodb.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Configuring MongoDB Atlas Whitelist"
3 | sidebarTitle: "Whitelisting Square in MongoDB"
4 | description: "Due to how Square works in a way that has a dynamic IP, by an exclusive technology, it is impossible to provide you with an IP, since every restart in the application, you receive a unique IP."
5 | ---
6 |
7 | **Square Cloud** stands out with its **dynamic IP allocation**, assigning a **unique address** with **each application restart**. Unlike static IPs, this dynamic approach enhances security by constantly changing the network footprint, **making it more resilient against potential threats**.
8 |
9 | ## When does it occur?
10 | When you are trying to connect your MongoDB Atlas database to your app hosted on Square Cloud, you may come across the following error:
11 |
12 | ```
13 | MongoNetworkError: connection 0 to shard-xxx-xxx.mongodb.net:27017 closed
14 | ```
15 |
16 | ## Why does it occur?
17 | You will receive this error message if you have not included the MongoDB Atlas addresses, the IP where your app is hosted, on the whitelist.
18 |
19 | ## How to fix
20 | To fix this error, you need to whitelist the IP address, according to the [mongodb documentation](https://www.mongodb.com/docs/atlas/security/ip-access-list/), you need to whitelist 0.0.0.0/0 IP address.
21 |
22 |
23 |
24 |
25 |
26 | Congratulations! You have successfully whitelisted the IP address 0.0.0.0/0 for your MongoDB Atlas database. Now you can connect your database to your app hosted on Square Cloud.
27 |
28 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------
/faqs/using-autorestart-in-your-squarecloud-application.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to use Auto Restart in Square Cloud"
3 | sidebarTitle: "How to use Auto Restart"
4 | description: "Learn how to use Auto Restart in Square Cloud to automatically restart your application in case it crashes."
5 | ---
6 |
7 | A **Square Cloud exclusive technology**, Auto Restart is a powerful feature in Square Cloud that allows your application to **automatically restart in case it crashes**. This ensures that **your app** remains **accessible and functional** even in the **event of unexpected failures**.
8 |
9 | ## Enabling Auto Restart
10 | With Auto Restart, follow these steps to enable it in your application's configuration file:
11 |
12 |
13 |
14 | Create or edit your `squarecloud.app` or `squarecloud.config` file.
15 |
19 | The squarecloud.app file is a configuration file that will be used to configure your application; it will be used to define the name, description, version, main file, among other things.
20 |
21 |
22 |
23 | Locate the `AUTORESTART` parameter in the configuration file. Or add it if it doesn't exist.
24 |
25 |
26 | Set the value of `AUTORESTART` to `true`.
27 |
28 | Here's an example of how to enable Auto Restart in your configuration file:
29 |
30 | ```systemd squarecloud.app OR squarecloud.config
31 | AUTORESTART=true
32 | ```
33 |
34 |
35 |
36 | ## How Auto Restart Works
37 | Auto Restart is a proactive feature that monitors the health of your application. If your application crashes or becomes unresponsive, Auto Restart takes action to get it back up and running.
38 |
39 |
40 |
41 | When your application crashes or becomes unresponsive, Auto Restart detects the issue if AUTORESTART is enabled in your configuration file.
42 |
43 |
44 | If the **application uptime is > 60 seconds**, will proceed to next step.
45 |
46 |
47 | If the **application exit status is 1**, will proceed to next step.
48 |
49 |
50 | If the **application didn't restart in the last 60 minutes**, will proceed to next step.
51 |
52 |
53 | If the application logs contain any of the excluded errors, Auto Restart will not restart the application.
54 |
55 | Examples of excluded errors include:
56 |
57 | ```json SyntaxError
58 | SyntaxError: Unexpected token 'X'..
59 | SyntaxError: Unexpected identifier 'X'..
60 | SyntaxError: Invalid or unexpected token 'X'..
61 | ```
62 | ```json Version didn't find
63 | npm ERR! notarget No matching version found for
64 | ERROR: Could not find a version that satisfies the requirement
65 | And variations of this error.
66 | ```
67 | ```json Module not found
68 | Error: Cannot find module 'X'
69 | Module not found: Can't resolve 'X' in 'Y'
70 | And variations of this error.
71 | ```
72 | ```json Invalid dependency file
73 | ERROR: Invalid requirement: 'X'
74 | ERROR: Could not open requirements file: 'X'
75 | npm ERR! code EJSONPARSE... npm ERR! Failed to parse json
76 | And variations of this error.
77 | ```
78 |
79 |
80 | If the application logs contain any of these errors, Auto Restart will not restart the application.
81 |
82 |
83 | AUTORESTART automatically restarts your application to bring it back. 😉
84 | Cooldown between restarts is 60 minutes.
85 |
86 |
87 |
88 | ## Best Practices
89 |
90 | Here are some best practices to make the most of Auto Restart:
91 |
92 | - Regularly review your application's logs to understand the reasons for any crashes or restarts. This can help you identify and address underlying issues.
93 | - Keep your MAIN file and memory allocation parameters up-to-date to ensure optimal performance and resource usage.
94 |
95 | ## Conclusion
96 |
97 | Auto Restart in Square Cloud is a valuable feature that enhances the reliability of your application. By automatically handling crashes and unresponsiveness, it helps maintain a seamless user experience. Ensure that you have a plan with Auto Restart enabled and configure it in your `squarecloud.app` or `squarecloud.config` file to make the most of this feature.
--------------------------------------------------------------------------------
/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/favicon.png
--------------------------------------------------------------------------------
/getting-started/quick-start.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Quickstart"
3 | sidebarTitle: "Quickstart"
4 | icon: "square-terminal"
5 | description: "Go from zero to hero in minutes with Square Cloud. This guide will help you get started with Square Cloud and understand the power of our platform."
6 | ---
7 |
8 | ## Square Cloud Services 🚀
9 | Square Cloud has been designed from the ground up to be a developer-friendly platform. The platform is composed of various services that can be used to deploy applications quickly and securely.
10 |
11 |
15 | Deploy your bots to Square Cloud and receive the best solutions for bot hosting.
16 | Square offers a strategic location for the most famous platforms, ensuring low latency and high availability.
17 |
18 |
19 |
23 | Deploy your web applications to Square Cloud and receive the best solutions for web hosting.
24 | We provide premium Cloudflare integration, fast DNS, and a Web Application Firewall (WAF) to ensure the best performance and security.
25 |
26 |
27 |
31 | Store your data with Square Cloud and enjoy the benefits of serverless storage.
32 | Our storage service is designed to be simple, scalable, and cost-effective.
33 |
34 |
35 |
36 |
37 | ## Upload your project 😁
38 | You can upload your project to Square Cloud in a few simple steps, as shown below:
39 |
40 |
41 |
42 |
43 | For this example, we will use the JavaScript (Node.js) language.
44 |
45 |
46 | After accessing the dashboard, you need to create a configuration file. You can create a [configuration file](/getting-started/config-file) reading this article [here](/getting-started/config-file).
47 |
48 | ```systemd Example of a config file for a bot
49 | MAIN=index.js
50 | MEMORY=512
51 | VERSION=recommended
52 | DISPLAY_NAME=Batman bot
53 | DESCRIPTION=This bot is the dark knight of the night.
54 | ```
55 |
56 | ```systemd Example of a config file for a web application. (Url configured to be "batman.squareweb.app")
57 | MAIN=index.js
58 | MEMORY=512
59 | VERSION=recommended
60 | SUBDOMAIN=batman
61 | START=npm run build && npm run start
62 | DISPLAY_NAME=Batman website
63 | DESCRIPTION=This website is the dark knight of the night.
64 | ```
65 |
66 |
67 | After creating the configuration file, you need to zip your project.
68 |
69 | ```bash Windows
70 | 1. Locate the file or folder that you want to zip.
71 | 2. Press and hold (or right-click) the file or folder, select (or point to) Send to, and then select Compressed (zipped) folder.
72 | 3. A new zipped folder with the same name is created in the same location. To rename it, press and hold (or right-click) the folder, select Rename, and then type the new name.
73 | ```
74 | ```bash Linux
75 | 1. Locate the file or folder that you want to zip.
76 | 2. Right-click the file or folder, then choose Compress from the shortcut menu.
77 | 3. A new zipped folder with the same name is created in the same location. To rename it, press and hold (or right-click) the folder, select Rename, and then type the new name.
78 | ```
79 | ```bash macOS
80 | 1. Locate the file or folder that you want to zip.
81 | 2. Control-click the file or folder, then choose Compress from the shortcut menu.
82 | 3. A new zipped folder with the same name is created in the same location. To rename it, press and hold (or right-click) the folder, select Rename, and then type the new name.
83 | ```
84 |
85 |
86 |
87 | After uploading your project, click on the "Add New" button to deploy your project.
88 |
89 |
--------------------------------------------------------------------------------
/images/articles/cloudflare/add-site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/add-site.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/domain-setup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/domain-setup.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/page-rule-www.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/page-rule-www.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/pending-dns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/pending-dns.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/record-dns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/record-dns.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/timeout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/timeout.png
--------------------------------------------------------------------------------
/images/articles/cloudflare/unauthorized-dns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/cloudflare/unauthorized-dns.png
--------------------------------------------------------------------------------
/images/articles/discord/getting-started.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/discord/getting-started.png
--------------------------------------------------------------------------------
/images/articles/discord/getting-the-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/discord/getting-the-token.png
--------------------------------------------------------------------------------
/images/articles/discord/intent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/discord/intent.png
--------------------------------------------------------------------------------
/images/articles/discord/testing-bot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/discord/testing-bot.png
--------------------------------------------------------------------------------
/images/articles/github/add-webhook.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/github/add-webhook.gif
--------------------------------------------------------------------------------
/images/articles/github/copy-access-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/github/copy-access-token.png
--------------------------------------------------------------------------------
/images/articles/github/deploy-webhook-git.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/github/deploy-webhook-git.gif
--------------------------------------------------------------------------------
/images/articles/github/new-personal-access-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/github/new-personal-access-token.png
--------------------------------------------------------------------------------
/images/articles/github/setting_branch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/github/setting_branch.gif
--------------------------------------------------------------------------------
/images/articles/teams/add-app.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/add-app.gif
--------------------------------------------------------------------------------
/images/articles/teams/add-member.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/add-member.gif
--------------------------------------------------------------------------------
/images/articles/teams/create-team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/create-team.png
--------------------------------------------------------------------------------
/images/articles/teams/invite.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/invite.gif
--------------------------------------------------------------------------------
/images/articles/teams/profile-user.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/profile-user.gif
--------------------------------------------------------------------------------
/images/articles/teams/team-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/team-code.png
--------------------------------------------------------------------------------
/images/articles/teams/team.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/teams/team.gif
--------------------------------------------------------------------------------
/images/articles/telegram/getting-started.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/telegram/getting-started.png
--------------------------------------------------------------------------------
/images/articles/telegram/getting-the-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/telegram/getting-the-token.png
--------------------------------------------------------------------------------
/images/articles/telegram/testing-bot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/telegram/testing-bot.png
--------------------------------------------------------------------------------
/images/articles/topgg/example-send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/topgg/example-send.png
--------------------------------------------------------------------------------
/images/articles/topgg/example-url.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/topgg/example-url.png
--------------------------------------------------------------------------------
/images/articles/troubleshooting/temporarily-denied-access.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/troubleshooting/temporarily-denied-access.png
--------------------------------------------------------------------------------
/images/articles/troubleshooting/website-took-too-long-to-respond.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/troubleshooting/website-took-too-long-to-respond.png
--------------------------------------------------------------------------------
/images/articles/whatsapp/remote-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/articles/whatsapp/remote-path.png
--------------------------------------------------------------------------------
/images/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/background.png
--------------------------------------------------------------------------------
/images/services/blob-speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/services/blob-speed.png
--------------------------------------------------------------------------------
/images/services/blob.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/services/blob.png
--------------------------------------------------------------------------------
/images/services/bots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/services/bots.png
--------------------------------------------------------------------------------
/images/services/sites.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/services/sites.png
--------------------------------------------------------------------------------
/images/troubleshooting/mongodb-whitelist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/troubleshooting/mongodb-whitelist.png
--------------------------------------------------------------------------------
/images/uploading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarecloudofc/docs/5870b02055413c26eaf5b183391d846451efc3fc/images/uploading.gif
--------------------------------------------------------------------------------
/platform/limitations-and-restrictions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Limits and Restrictions"
3 | description: "Discover the constraints and boundaries of the Square Cloud Platform."
4 | icon: "shield-dog"
5 | ---
6 |
7 | ## Minimum Resource Requirements
8 | Every project hosted on the Square Cloud Platform has specific minimum resource requirements to ensure optimal performance:
9 |
10 | - **Bots:** A minimum of **256MB** of RAM is required for hosting.
11 | - **Websites:** Websites need at least **512MB** of RAM allocated to operate effectively.
12 |
13 | Please note that while Square Cloud offers plans with up to **1TB of RAM**, the **maximum RAM allocation** for any **application is 32GB**. If you require more than 32GB, please reach out to our support team for assistance.
14 |
15 | ## CPU Optimization & Limitation
16 | The CPU limitation logic aims to optimize performance by dynamically adapting to the application's needs. The code divides the default CPU allocation by two, promoting an efficient resource utilization approach. However, specific conditions alter this behavior:
17 |
18 | If the **application's default CPU allocation** is 1vCPU, the **CPU is set to 1**. (full release)
19 |
20 | **Otherwise**, the CPU **allocation varies based** on the **application's RAM size**:
21 | - If **RAM is less than or equal to 1024**, the CPU is set to the **maximum of half** of CPU or 1.
22 | - If **RAM is 2048** or **more**, the **CPU remains unchanged**. (full release)
23 | - For **RAM sizes between 1024 and 2048**, the CPU is set to **half of CPU**.
24 |
25 | This strategy aims to balance CPU efficiency with variable system demands, ensuring adequate performance across different scenarios.
26 |
27 | This approach is crucial to promote a high-quality experience, ensuring fair and efficient CPU resource allocation, optimizing application responsiveness, and reducing unnecessary resource consumption.
28 |
29 | ## Network Limitations
30 | Network limitations are essential to ensure fair resource distribution and a high-quality experience for all users.
31 | The **network speed increases by 50MB/s** for every **additional 256MB** of RAM allocated.
32 |
33 | Here are the network limitations based on RAM allocation:
34 |
35 | - **256MB RAM:** 50MB/s network speed.
36 | - **Up to 512MB RAM:** 100MB/s network speed.
37 | - **1024MB RAM:** 200MB/s network speed.
38 | - **2048MB RAM:** 400MB/s network speed.
39 | - **4096MB RAM:** 800MB/s network speed.
40 | - **8192MB RAM:** 1.600MB/s network speed.
41 | - **10240MB RAM:** 2.000MB/s network speed.
42 |
43 | For applications requiring network speeds exceeding 2.000MB/s, please contact our support team to discuss your specific needs.
44 |
45 | Square Cloud is committed to providing a balance between resource availability and performance, ensuring a seamless experience for all users.
46 |
47 | ## Storage Limitations
48 | Storage limitations are crucial to ensure equitable resource distribution and to provide a high-quality experience for all users.
49 | - **All projects:** Each project is allocated 10GB of storage.
50 |
51 | ## Service Limits
52 | Squarecloud implements service limits to ensure fair and efficient resource utilization for all users. These limits are categorized as:
53 |
54 | ### LACK_OF_RAM
55 | If an application exceeds the allocated RAM limit as specified in its [squarecloud.app config file](../getting-started/config-file), it will be flagged for violating LACK_OF_RAM and shut down to preserve its own and everyone else's safety.
56 |
57 | ### LACK_OF_CPU
58 | If an application exceeds and stresses its allocated processing limit, it will be flagged for violating LACK_OF_CPU and shut down to preserve its own and everyone else's safety. It is important to remember that Square does not allow the hosting of applications that mine cryptocurrencies, for example.
59 |
60 | Square Cloud is dedicated to providing a secure and balanced environment for all users while ensuring compliance with its policies.
61 |
--------------------------------------------------------------------------------
/platform/overview.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Platform Overview"
3 | description: "How to use the power of Square Cloud to build your own applications"
4 | icon: "cloud"
5 | ---
6 |
7 | ## What is Square Cloud platform?
8 | The Square Cloud platform serves as the bedrock of the Square Cloud ecosystem of products and services, established in partnership with Hivelocity. It serves as a central hub for the seamless management of your applications, websites, and various projects, offering a user-friendly and straightforward approach.
9 |
10 | ### The Vision Behind Square Cloud
11 |
12 | Our company was founded with a clear vision: to create an exceptionally flexible cloud platform capable of addressing the constantly evolving needs of businesses, regardless of their size. The Square Cloud logo, featuring angular squares, serves as a symbol of our unwavering commitment to adaptability.
13 |
14 | The positioning of these squares was meticulously selected to evoke the imagery of a Docker container, a widely utilized technology in the realm of cloud computing. This choice reflects our dedication to providing efficient and scalable solutions to our clients, highlighting our flexible and adaptable approach.
15 |
16 |
17 | ### Our Secure Infrastructure
18 |
19 | Located in Staten Island, New York, our data center offers a highly secure, resilient environment that includes:
20 |
21 | **High-Speed Network Infrastructure**
22 | - **10 Gbps Connectivity per Server:** Ensuring high-speed data transfer and reduced latency.
23 | - **Multi-Layered DDoS Protection:** Guards against potential threats with robust, layered security.
24 | - **24/7 Monitoring:** Our network is constantly monitored to maintain peak performance and prevent downtime.
25 |
26 | **Physical Security and Redundancy**
27 | - **Controlled Access:** Strict biometric and keycard entry controls ensure that only authorized personnel can access the facility.
28 | - **Fire Protection:** Pre-action sprinklers and FM200 fire suppression systems safeguard against fire risks.
29 | - **Structural Resilience:** Built with a focus on durability, withstanding extreme weather and other external threats.
30 | - **Redundant Power Supply:** Backup power systems provide continuous service even in case of primary power disruptions.
31 |
32 | **Certifications and Compliance**
33 | - **SSAE-16 SOC 2 Certified:** Assures our commitment to secure management of your data.
34 | - **HIPAA and PCI Compliance:** Meeting healthcare and payment security standards to ensure comprehensive data protection.
35 |
36 | Square Cloud’s platform combines powerful features with state-of-the-art infrastructure, ready to support your business’s unique needs. Discover how Square Cloud can empower your projects with a scalable, secure environment.
--------------------------------------------------------------------------------
/sdks/introduction.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Square Cloud SDKs"
3 | description: "Learn how to use the Square Cloud SDKs to interact with the Square Cloud API."
4 | ---
5 |
6 | ### Choose your SDK
7 | All sdks are open source and available on [Github](https://go.squarecloud.app/github).
8 |
9 |
10 | }
13 | href="https://github.com/squarecloudofc/sdk-api-js"
14 | >
15 | Learn how to use the Square Cloud JavaScript SDK to interact with the Square Cloud API.
16 |
17 | }
20 | href="https://github.com/squarecloudofc/sdk-api-py"
21 | >
22 | Learn how to use the Square Cloud Python SDK to interact with the Square Cloud API.
23 |
24 |
25 |
26 | Square Cloud is constantly improving and developing SDKs in new languages. If you don't see your language here, please [let us know](https://go.squarecloud.app/github) and we'll add it to our roadmap.
--------------------------------------------------------------------------------
/sdks/js/client.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Client"
3 | description: "The main object is the SquareCloudAPI object, instantiated with an API key. This object signifies a connection to the Square Cloud service and serves as an interface for interacting with different service aspects."
4 | ---
5 |
6 | ```bash
7 | npm i @squarecloud/api
8 | ```
9 |
10 |
11 |
12 | ```javascript
13 | const { SquareCloudAPI } = require("@squarecloud/api");
14 |
15 | const api = new SquareCloudAPI("Your API Key");
16 | ```
17 |
18 |
19 | ```typescript
20 | import { SquareCloudAPI } from "@squarecloud/api";
21 |
22 | const api = new SquareCloudAPI("Your API Key");
23 | ```
24 |
25 |
26 |
27 | ## Parameters
28 |
29 | ### API Key
30 |
31 | - Type: `string`
32 | - Required: Yes
33 | - Description: A valid API key must be provided as a string for authentication.
34 |
35 | ## Get Started
36 |
37 | Using the get started endpoint, you can obtain a user object representing the user associated with the API key, as well as a list of applications associated with the user.
38 |
39 | ```javascript
40 | const user = await api.user.get();
41 |
42 | console.log(user.applications); // List of Application's
43 | ```
44 |
45 | ## Application
46 |
47 | Using the `Client`, you can obtain an object representing your application. This object is an instance of the `Application` class, allowing you to manage your application more conveniently without always needing to pass the ID.
48 |
49 | ```javascript Obtaining an Application
50 | const app = user.applications.get("Application ID");
51 | console.log(app); // Output: application object
52 | ```
53 |
54 | ```javascript Obtaining All Applications
55 | console.log(user.applications); // user = api.user.get() [Promise]
56 | ```
57 |
--------------------------------------------------------------------------------
/sdks/js/commit_and_upload.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Commit and Upload"
3 | description: "In this section you will learn how to make commits and uploads using the Square Cloud JavaScript SDK."
4 | ---
5 |
6 | ## Making a commit
7 |
8 | `application.commit()` is a method that allows you to commit a file to your application.
9 |
10 |
11 |
12 | ```javascript
13 | const { SquareCloudAPI } = require("@squarecloud/api");
14 | const api = new SquareCloudAPI("Your API Key");
15 |
16 | const application = await api.applications.get("Application ID");
17 |
18 | // Specify the content and name of the file you want to commit
19 | const fileContent = Buffer.from("Your file content");
20 | const fileName = "file.txt";
21 |
22 | // Perform the commit operation
23 | const success = await application.commit(fileContent, fileName);
24 |
25 | // Handle the result accordingly
26 | if (success) {
27 | console.log(`File "${fileName}" committed successfully.`);
28 | } else {
29 | console.error(`Failed to commit file "${fileName}".`);
30 | }
31 | ```
32 |
33 |
34 | ```javascript
35 | const { SquareCloudAPI } = require("@squarecloud/api");
36 | const api = new SquareCloudAPI("Your API Key");
37 |
38 | const application = await api.applications.get("Application ID");
39 |
40 | // Specify the content and name of the file you want to commit
41 | const { join } = require("node:path");
42 | const fileName = "file.txt";
43 | const filePath = join(__dirname, fileName);
44 |
45 | // Optionally, set whether the application should restart after the commit
46 | const shouldRestart = true;
47 |
48 | // Perform the commit operation
49 | const success = await application.commit(filePath, fileName, shouldRestart);
50 |
51 | // Handle the result accordingly
52 | if (success) {
53 | console.log(`File "${fileName}" committed successfully.`);
54 | } else {
55 | console.error(`Failed to commit file "${fileName}".`);
56 | }
57 | ```
58 |
59 |
60 |
61 | ## Making a upload
62 |
63 | `application.create()` is a method that allows you to upload a application to Square Cloud.
64 |
65 | ```javascript
66 | const { SquareCloudAPI } = require("@squarecloud/api");
67 | const api = new SquareCloudAPI("Your API Key");
68 |
69 | // Specify the content and name of the zip file you want to upload
70 | const { join } = require("node:path");
71 | const fileName = "application.zip";
72 | const filePath = join(__dirname, fileName);
73 |
74 | // Perform the upload operation
75 | const success = await api.applications.create(filePath);
76 |
77 | // Handle the result accordingly
78 | if (success) {
79 | console.log(`Application uploaded successfully.`, success);
80 | // Return the application uploaded information (id, tag, description, etc.)
81 | } else {
82 | console.error(`Failed to upload application.`);
83 | }
84 | ```
85 |
86 | **Remember that to upload an application you need a zip that contains (at least) the following files:**:
87 |
88 | - Main file: responsible for starting your application
89 | - Dependencies file: contains information about which dependencies are necessary
90 | - Configuration file (squarecloud.app): a configuration file specifying the
91 | name,
92 | description, main file name, version, etc. To learn more about the
93 | configuration file, take a look at this [guide](https://docs.squarecloud.app/getting-started/config-file).
--------------------------------------------------------------------------------
/sdks/js/managing_application.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Managing Applications"
3 | description: "In this section, you will learn how to manage your application using the available library. You can interact with your application in various ways, such as obtaining information about the application status, accessing logs, starting, stopping, and restarting the application, as well as managing files associated with it."
4 | ---
5 |
6 | ## Getting the status of your application
7 |
8 | `application.getStatus()` return a `ApplicationStatus` class.
9 |
10 | ````javascript
11 | const { SquareCloudAPI } = require("@squarecloud/api");
12 | const api = new SquareCloudAPI("Your API Key");
13 |
14 | const application = await api.applications.get("Application ID");
15 | const status = await application.getStatus();
16 |
17 | console.log(status.usage.cpu); // '0.22%'
18 | console.log(status.usage.ram); // '70MB'
19 | console.log(status.usage.network); // {'total': '0 KB ↑ 0 KB ↓', 'now': '0 KB ↑ 0 KB ↓'}
20 | console.log(status.usage.storage); // '0B'
21 | console.log(status.running); // true | false
22 | console.log(status.status); // 'running' | 'exited' ...
23 | ````
24 |
25 | ## Getting logs
26 |
27 | `application.getLogs()` return a String.
28 |
29 | ````javascript
30 | const application = await api.applications.get("Application ID");
31 | const logs = await application.getLogs();
32 |
33 | console.log(logs); // String
34 | ````
35 |
36 | ## Starting the application
37 |
38 | `application.start()` return a Boolean.
39 |
40 | ````javascript
41 | const application = await api.applications.get("Application ID");
42 | const started = await application.start();
43 |
44 | console.log(started); // Boolean (true or false)
45 | ````
46 |
47 | ## Stopping the application
48 |
49 | `application.stop()` return a Boolean.
50 |
51 | ````javascript
52 | const application = await api.applications.get("Application ID");
53 | const stopped = await application.stop();
54 |
55 | console.log(stopped); // Boolean (true or false)
56 | ````
57 |
58 | ## Restarting the application
59 |
60 | `application.restart()` return a Boolean.
61 |
62 | ````javascript
63 | const application = await api.applications.get("Application ID");
64 | const restarted = await application.restart();
65 |
66 | console.log(restarted); // Boolean (true or false)
67 | ````
68 |
69 | ## Deleting an application
70 |
71 | `application.delete()` return a Boolean.
72 |
73 |
74 | This will delete your application **PERMANENTLY**, meaning that unless you have a backup of your application, it cannot be recovered.
75 |
76 |
77 | ````javascript
78 | const application = await api.applications.get("Application ID");
79 | const deleted = await application.delete();
80 |
81 | console.log(deleted); // Boolean (true or false)
82 | ````
83 |
--------------------------------------------------------------------------------
/sdks/js/managing_files.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Managing Files"
3 | description: "In this section, you will find information and examples on how to manipulate the
4 | files associated with your application. Learn how to list, read, create, and delete
5 | files using the Square Cloud JavaScript SDK."
6 | ---
7 |
8 | ## Getting a list of files
9 |
10 | `application.files.list()` return a list of `APIListedFile` objects.
11 |
12 | ````javascript
13 | const application = await api.applications.get("Application ID");
14 | const filesList = await application.files.list();
15 |
16 | console.log(filesList); // Return a Array of File Objects
17 | // [{type: "file", name: "index.js", size: 123, lastModified: 123456789}]
18 | ````
19 |
20 | ## Reading a file
21 |
22 | `application.files.read()` returns a Buffer object.
23 |
24 | ````javascript
25 | const application = await api.applications.get("Application ID");
26 | const file = await application.files.read("index.js");
27 |
28 | console.log(file.toString()); // String
29 | ````
30 |
31 | ## Creating a file
32 |
33 | `application.files.create()` returns a Boolean.
34 |
35 |
36 |
37 | ```javascript
38 | const { SquareCloudAPI } = require("@squarecloud/api");
39 | const api = new SquareCloudAPI("Your API Key");
40 |
41 | const application = await api.applications.get("Application ID");
42 |
43 | // Specify the content and name of the file you want to create
44 | const fileContent = Buffer.from("archive content here");
45 | const filePath = "./folder/test_file.txt";
46 |
47 | // Perform the create file operation
48 | const file = await application.files.create(fileContent, filePath);
49 |
50 | console.log(file); // Boolean (true or false)
51 | ```
52 |
53 |
54 | ```javascript
55 | const { SquareCloudAPI } = require("@squarecloud/api");
56 | const api = new SquareCloudAPI("Your API Key");
57 |
58 | const application = await api.applications.get("Application ID");
59 |
60 | // Specify the content and name of the file you want to create
61 | const { join } = require("node:path");
62 | const fileName = "local_txt_file.txt";
63 | const fileContent = join(__dirname, fileName);
64 | const filePathtoCreate = "./folder/test_file.txt";
65 |
66 | // Perform the create file operation
67 | const file = await application.files.create(fileContent, filePathtoCreate);
68 |
69 | console.log(file); // Boolean (true or false)
70 | ```
71 |
72 |
73 |
74 | ## Deleting a file
75 |
76 | `application.files.delete()` returns a Boolean.
77 |
78 | ````javascript
79 | const application = await api.applications.get("Application ID");
80 | const deleted = await application.files.delete("index.js");
81 |
82 | console.log(deleted); // Boolean (true or false)
83 | ````
84 |
--------------------------------------------------------------------------------
/sdks/py/advanced/app_cache.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "App Cache"
3 | description: "Learn how to use the App cache."
4 | ---
5 |
6 | When a request is made, it returns application information and caches it in the Application object itself. This is useful if you need to access this information again in a relatively short time, meaning it's not worth making a new API request for updated data. In such cases, you can access `Application.cache`.
7 |
8 | ```python
9 | import squarecloud as square
10 |
11 | client = square.Client('API_KEY')
12 |
13 | async def example():
14 | app = await client.app('application_id')
15 |
16 | # Note that, as no requests have been made, * in the cache will be None
17 | print(app.cache.logs) # None
18 | print(app.cache.status) # None
19 | print(app.cache.backup) # None
20 |
21 | # Now let's make some requests
22 | await app.logs()
23 | await app.status()
24 | await app.backup()
25 |
26 | # The cache has been updated 🤯
27 | print(app.cache.logs) # LogsData(...)
28 | print(app.cache.status) # StatusData(...)
29 | print(app.cache.backup) # BackupData(...)
30 | ```
31 |
32 | ## Making requests without updating the cache
33 |
34 | If, for some reason, you don't want to update the cache when making a request, you can pass the `update_cache=False` argument.
35 |
36 | ```python
37 | import squarecloud as square
38 |
39 | client = square.Client('API_KEY')
40 |
41 | async def example():
42 | app = await client.app('application_id')
43 | await app.status(update_cache=False)
44 | print(app.cache.status) # None
45 | ```
46 |
47 |
48 | If the arguments you pass to `cache.update` are not an instance of `StatusData`, `LogsData`, or `BackupData`, a `SquareException` error will be raised.
49 |
50 |
51 | ## Manually clearing the cache
52 |
53 | You can manually clear the cache using `cache.clear`.
54 |
55 | ```python
56 | import squarecloud as square
57 |
58 | client = square.Client('API_KEY')
59 |
60 |
61 | async def example():
62 | app = await client.app('application_id')
63 |
64 | await app.status()
65 | print(app.cache.status) # StatusData(...)
66 | app.cache.clear()
67 | print(app.cache.status) # None
68 | ```
69 |
70 | ## Manually updating the cache
71 |
72 | You can also manually update it using the `cache.update` method.
73 |
74 | ```python
75 | import squarecloud as square
76 |
77 | client = square.Client('API_KEY')
78 |
79 |
80 | async def example():
81 | app = await client.app('application_id')
82 |
83 | logs = await app.logs()
84 | status = await app.status()
85 | backup = await app.backup()
86 |
87 | app.cache.clear() # Clears the cache
88 | app.cache.update(status, logs, backup) # Updates the cache
89 |
90 | print(app.cache.logs) # LogsData(...)
91 | print(app.cache.status) # StatusData(...)
92 | print(app.cache.backup) # BackupData(...)
93 | ```
--------------------------------------------------------------------------------
/sdks/py/advanced/listeners.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Listeners"
3 | description: "Learn how to use listeners in your application using the squarecloud python sdk."
4 | ---
5 |
6 | [cache]: app_cache
7 | [Client]: ../user_guide/Client
8 |
9 | Sometimes it's very useful to have listeners for requests, allowing you to implement features that need to be called whenever "something" happens in your application.
10 |
11 | Two types of listeners have been added for this purpose.
12 |
13 | ## Capture Listener
14 |
15 | For example, imagine that every time a request to the '/logs' route is made, my code performs a task that checks if the new logs differ from the old ones. Well, let's see how this can be done:
16 |
17 | ```python
18 | import squarecloud as square
19 | from squarecloud import Endpoint
20 |
21 | @app.capture(endpoint=Endpoint.logs())
22 | async def on_logs_request(before, after):
23 | if after != before:
24 | print(f'New logs!!! {after}')
25 |
26 | async def main():
27 | client = square.Client('your api key')
28 | app = await client.app('application_id')
29 |
30 | await app.logs() # True
31 | await app.logs() # False
32 | ```
33 |
34 | As seen above, by using the app.capture decorator on a function, this function will be called every time a request is made to the endpoint specified in the decorator. The accepted endpoints are `APP_STATUS`, `LOGS`, or `BACKUP`. This function should take two parameters:
35 |
36 | - `before`(represents the state after the request)
37 | - `after`(represents the state before the request)
38 |
39 | The data type returned by `before` and `after` depends on which endpoint the listener is "listening" to. If it is the **APP_STATUS** route, it will receive a `StatusData`, **LOGS** will receive a `LogsData`, and **BACKUP** will receive a `BackupData`.
40 |
41 | As you may have noticed in the example above, the first time the comparison between the logs occurs, `after != before` returns True. This happens precisely because after is equal to `LogsData(logs='')`, as there is still nothing stored in the cache internally.
42 |
43 |
44 | - If you use discord.py or some fork (you probably use), you should
45 | know that what differentiates events is the name
46 | of the functions that the decorator wraps, but here it differs. To know
47 | which
48 | API route the decorator needs to "listen" to, we use the `endpopint` parameter, it
49 | receives an `Endpoint` class, so the name of the function that the decorator
50 | wraps is up to you.
51 | - The function that the decorator wraps can actually be anything that is
52 | a callable. This includes regular functions, coroutines, and even
53 | classes (`__init__` will be called).
54 | - If the endpoint is not an [Endpoint.app_status()], [Endpoint.logs()], or [Endpoint.backup()],
55 | only a `response` parameter (of type `squarecloud.http.Response`) will
56 | be returned.
57 |
58 |
59 | You can use the `avoid_listener=True` parameter so that the application listener is not called.
60 |
61 |
62 | ## Request Listener
63 |
64 | The "request listeners" do pretty much the same thing. But here you use the [Client], and the return of all endpoints is `squarecloud.http.Response` objects.
65 |
66 | ```python
67 | import squarecloud as square
68 | from squarecloud import Endpoint
69 |
70 | @client.on_request(endpoint=Endpoint.logs())
71 | async def on_logs_request(response):
72 | print(1, response)
73 |
74 | async def main():
75 | client = square.Client('your api key')
76 | await client.get_logs(app_id='application_id') # 1, Response(success)
77 | ```
78 |
79 | ## Passing extra arguments
80 | You can pass to some methods keyword argument called `extra`, and this will be passed to your listener
81 |
82 | ```python
83 | import squarecloud as square
84 | from squarecloud import Endpoint
85 |
86 | @client.on_request(Endpoint.status())
87 | async def get_extra_param(before, after, extra: dict[str, str]):
88 | print(extra)
89 |
90 | async def main():
91 | client = square.Client('your api key')
92 | await client.app_status('application_id', extra={'name': 'robertinho'})
93 | ```
94 |
95 |
96 | You can get some cool features in listeners using pydantic in your project, take a look at [using pydantic](./using_pydantic)
97 |
98 |
99 | _This implementation was inspired by a [suggestion](https://github.com/squarecloudofc/sdk-api-py/pull/1) made by [@Mudinho](https://github.com/zRickz), thank you for contributing._
100 |
--------------------------------------------------------------------------------
/sdks/py/advanced/using_pydantic.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Using pydantic"
3 | description: "Learn how to use pydantic to data validation."
4 | ---
5 |
6 | ## What is pydantic?
7 | Pydantic is an awesome and modern Python library for data validation using
8 | type annotations. It enforces type constraints, ensuring data consistency and
9 | providing clear error messages when validation fails. Pydantic is both
10 | powerful and easy to use, making it a popular choice for developers working
11 | with structured data.
12 |
13 | ## Installation
14 |
15 | To use Pydantic with this SDK, you need to install the SDK with the pydantic
16 | extra dependency, as it is not included by default:
17 | ```bash
18 | pip install "squarecloud[pydantic]"
19 | ```
20 |
21 | ## Features
22 | In this SDK, Pydantic is used to cast an extra parameter from a dictionary
23 | into a Pydantic model, allowing for more robust data
24 | validation and manipulation.
25 |
26 | ````python
27 | import squarecloud as square
28 | from squarecloud import Endpoint
29 | from pydantic import BaseModel
30 |
31 | class Animal(BaseModel):
32 | name: str
33 | age: int
34 |
35 | @client.on_request(Endpoint.status())
36 | async def get_extra_param(before, after, extra: Animal):
37 | print(extra.name)
38 | print(extra.age)
39 |
40 | async def main():
41 | client = square.Client('your api key')
42 | await client.app_status('application_id', extra={'name': 'felix', 'age': 3})
43 | ````
44 |
45 | In this example, the Animal class is a Pydantic model with two
46 | fields: name and age. When a request is made to the status endpoint,
47 | the extra parameter is automatically cast into an Animal instance, allowing
48 | you to easily access and validate the data.
49 |
--------------------------------------------------------------------------------
/sdks/py/client.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Client"
3 | description: "The central object is the Client object, instantiated with an API key. This
4 | object represents a connection to the Square Cloud service and acts as an
5 | interface to interact with various aspects of the service."
6 | ---
7 |
8 | [Client]: ./#client
9 |
10 | ```python
11 | import squarecloud as square
12 |
13 | client = square.Client(api_key='API_KEY')
14 |
15 | async def example():
16 | app_status = await client.app_status('application_id')
17 | print(app_status)
18 | ```
19 |
20 | ## Parameters:
21 |
22 | - api_key
23 |
24 | `api_key: str`: This is the required parameter when instantiating the Client object.
25 | A valid API key must be provided as a string for authentication to be performed correctly.
26 |
27 | - debug
28 |
29 | `debug: bool = True`: This is an optional parameter that controls the debug mode of
30 | the Client object. When set to True, every time a request is made, the Client object prints
31 | debug information to facilitate the detection and resolution of
32 | issues. However, in production environments, it is common to set this parameter
33 | to False to avoid displaying unnecessary information.
34 | This value defaults to True.
35 |
36 | ## Application
37 |
38 | Using the [Client], you can obtain an object (or a list of
39 | objects) that represents your application. This object would be an instance of the
40 | Application class that you can use
41 | to manage your application more conveniently, without always needing to pass
42 | the id of your application.
43 |
44 |
45 |
46 | ```python
47 | import squarecloud as square
48 |
49 | client = square.Client(api_key='API KEY')
50 |
51 | async def example():
52 | app = await client.app('application id')
53 | print(app) #
54 | ```
55 |
56 |
57 |
58 | ```python
59 | import squarecloud as square
60 |
61 | client = square.Client(api_key='API KEY')
62 |
63 | async def example():
64 | apps = await client.all_apps()
65 | print(apps) # list[]
66 | ```
67 |
68 |
69 |
--------------------------------------------------------------------------------
/sdks/py/commit_and_upload.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Commit and Upload"
3 | description: "In this section you will learn how to make commits and uploads using the Client, Application and CLI."
4 | ---
5 |
6 | You can make commits and uploads using Client or Application. You
7 | just need a `squarecloud.File` object and pass the path where your
8 | zip file is.
9 |
10 | ## Making a commit
11 |
12 |
13 |
14 | ```python
15 | import squarecloud as square
16 |
17 | client = square.Client('API_KEY')
18 |
19 | async def example():
20 | file = square.File('path/to/you/file.zip')
21 | await client.commit(file=file, app_id='application_id')
22 | ```
23 |
24 |
25 |
26 | ```python
27 | import squarecloud as square
28 |
29 | client = square.Client('API_KEY')
30 |
31 | async def example():
32 | app = await client.app(app_id='application_id')
33 | file = square.File('path/to/you/file.zip')
34 | await app.commit(file=file)
35 | ```
36 |
37 |
38 |
39 | ## Making a upload
40 |
41 | To upload an application, you can use only the [Client].
42 |
43 |
44 |
45 | ```python
46 | import squarecloud as square
47 |
48 | client = square.Client(...)
49 |
50 | async def example():
51 | file = square.File('path/to/you/file.zip')
52 | await client.upload_app(file=file)
53 | ```
54 |
55 |
56 |
57 | **Remember that to upload an application you need a zip that contains (at least) the following files:**:
58 |
59 | - Main file: responsible for starting your application
60 | - Dependencies file: contains information about which dependencies are necessary
61 | - Configuration file (squarecloud.app): a configuration file specifying the
62 | name,
63 | description, main file name, version, etc. To learn more about the
64 | configuration file, take a look at this [guide](https://docs.squarecloud.app/getting-started/config-file).
65 |
66 |
67 | For your convenience, a class has been added to create this configuration file:
68 | `squarecloud.utils.ConfigFile`.
69 |
70 |
--------------------------------------------------------------------------------
/sdks/py/deployments.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Deployments"
3 | description: "This guide provides examples on how to integrate and manage
4 | application deployments using this SDK.
5 | You will learn how to create GitHub integrations, retrieve current
6 | integration details, and view the latest deployments using both the
7 | client and application objects."
8 | ---
9 |
10 | ## Create Integration
11 |
12 |
13 |
14 | ```python
15 | import squarecloud as square
16 |
17 | client = square.Client(api_key='API KEY')
18 |
19 |
20 | async def example():
21 | webhook_url = await client.github_integration(
22 | 'application_id', access_token='access_token'
23 | )
24 | print(
25 | webhook_url
26 | )
27 | ```
28 |
29 |
30 |
31 | ```python
32 | import squarecloud as square
33 |
34 | client = square.Client(api_key='API KEY')
35 |
36 |
37 | async def example():
38 | app = await client.app('application_id')
39 | webhook_url = await app.github_integration(access_token='access_token')
40 | print(
41 | webhook_url
42 | )
43 | ```
44 |
45 |
46 |
47 |
48 | ## Obtaining Current Integration
49 |
50 |
51 |
52 | ```python
53 | import squarecloud as square
54 |
55 | client = square.Client(api_key='API KEY')
56 |
57 |
58 | async def example():
59 | webhook_url = await client.current_app_integration(
60 | 'application_id',
61 | )
62 | print(webhook_url)
63 | ```
64 |
65 |
66 |
67 | ```python
68 | import squarecloud as square
69 |
70 | client = square.Client(api_key='API KEY')
71 |
72 |
73 | async def example():
74 | app = await client.app('application_id')
75 | webhook_url = await app.current_integration()
76 | print(
77 | webhook_url
78 | )
79 | ```
80 |
81 |
82 |
83 |
84 | ## Last Deploys
85 |
86 |
87 |
88 | ```python
89 | import squarecloud as square
90 |
91 | client = square.Client(api_key='API KEY')
92 |
93 |
94 | async def example():
95 | deploys = await client.last_deploys('application_id')
96 | print(deploys) # [[DeployData(...), DeployData(...), DeployData(...)]]
97 | ```
98 |
99 |
100 |
101 | ```python
102 | import squarecloud as square
103 |
104 | client = square.Client(api_key='API KEY')
105 |
106 |
107 | async def example():
108 | app = await client.app('application_id')
109 | deploys = await app.last_deploys()
110 | print(deploys) # [[DeployData(...), DeployData(...), DeployData(...)]]
111 | ```
112 |
113 |
114 |
--------------------------------------------------------------------------------
/sdks/py/installation.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Installation"
3 | description: "Learn how to install the squarecloud-api package for seamless integration into your projects"
4 | ---
5 |
6 | ```bash
7 | pip install squarecloud-api
8 | ```
9 |
10 | Now you can seamlessly integrate the squarecloud-api into your development workflow 😊.
11 |
--------------------------------------------------------------------------------
/tutorials/como-criar-um-servidor-lavalink.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Como criar seu servidor Lavalink"
3 | description: "Aprenda a hospedar seu servidor Lavalink e transmitir música de alta qualidade para o seu bot do Discord."
4 | ---
5 |
6 | ## Introdução
7 |
8 | Siga o tutorial abaixo e hospede seu servidor Lavalink hoje mesmo, é super simples! Se precisar de assistência, não hesite em entrar em contato conosco por meio de nossos canais de suporte oficiais.
9 |
10 | ## Escolhendo a Versão
11 |
12 | Escolha a versão desejada do `Lavalink` clicando [aqui](https://github.com/freyacodes/Lavalink/releases/). Recomendamos selecionar a versão mais recente para a melhor experiência.
13 |
14 | ## Criando o Arquivo de Configuração squarecloud.app
15 | Para começar, crie seu arquivo de configuração [squarecloud.app](./como-criar-seu-arquivo-de-configuracao-squarecloud) na pasta raiz do seu projeto.
16 |
17 | ## Criando o application.yml
18 |
19 | Crie um arquivo de configuração para o seu servidor Lavalink. Você pode acessar um arquivo de exemplo [aqui](https://github.com/freyacodes/Lavalink/blob/master/LavalinkServer/application.yml.example).
20 |
21 | Defina o campo `port` em seu arquivo `application.yml` para: `80`.
22 |
23 | ## Reforçando a Segurança
24 |
25 | É altamente recomendável configurar uma senha segura no campo `password` do seu arquivo de configuração (application.yml). Recomendamos o uso de uma senha com pelo menos 32 caracteres.
26 |
27 | É importante lembrar que você deve usar a porta 443 (SSL) e a opção `secure` em `true` para se conectar ao seu lavalink.
28 |
29 | ## Enviando para o Square Cloud
30 |
31 | Crie um arquivo compactado (.zip) contendo o Lavalink.jar e o application.yml. Em seguida, faça o upload do seu arquivo de configuração para o Square Cloud.
32 |
33 | Seguindo esses passos, você terá seu servidor Lavalink funcionando sem problemas no Square Cloud. Se encontrar algum problema ou precisar de assistência adicional, não hesite em entrar em contato com nossa [equipe de suporte](../company/support).
34 |
35 | Este artigo foi traduzido por [Square Cloud](https://squarecloud.app) e pode estar desatualizado, recomendamos sempre conferir a versão original dele em inglês clicando [aqui](./getting-started/config-file).
--------------------------------------------------------------------------------
/tutorials/como-hospedar-seu-website.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Hospedando seu Site ou API na Square Cloud"
3 | sidebarTitle: "Como implantar seu Site ou API"
4 | description: "Saiba como hospedar seu site ou API na Square Cloud usando o arquivo de configuração squarecloud.app."
5 | ---
6 |
7 | ## Introdução
8 |
9 | Hospedar seu site ou API na Square Cloud é muito simples com o arquivo de configuração squarecloud.app. Este arquivo permite personalizar e configurar sua aplicação com parâmetros essenciais, como o arquivo principal, alocação de memória, versão, nome de exibição e muito mais.
10 |
11 | ## Criando o Arquivo de Configuração squarecloud.app
12 | Para começar, crie seu arquivo de configuração [squarecloud.app](./como-criar-seu-arquivo-de-configuracao-squarecloud) na pasta raiz do seu projeto.
13 |
14 | ### Parâmetros importantes para websites
15 | A **porta do site** precisa ser **80**; se você estiver usando um site estático, não precisa definir o parâmetro `START`.
16 |
17 | No arquivo de configuração squarecloud.app:
18 | - `SUBDOMAIN`: Se você estiver hospedando um site, defina este parâmetro como o subdomínio desejado.
19 | - `START`: Um comando de inicialização personalizado (se necessário).
20 |
21 | O URL do site será: `seu-parâmetro-de-subdomínio`.squareweb.app
22 | ```systemd Este exemplo hospeda um site sem comando de inicialização personalizado
23 | MAIN=index.html
24 | MEMORY=512
25 | VERSION=recommended
26 | DISPLAY_NAME=Meu site estático simples!
27 | SUBDOMAIN=meusite-site-simples
28 | ```
29 |
30 | ```systemd Este exemplo usa todos os parâmetros e comandos de inicialização personalizados em um site
31 | MAIN=index.js
32 | MEMORY=512
33 | VERSION=recommended
34 | DISPLAY_NAME=Meu site nextjs simples!
35 | SUBDOMAIN=meusite-site-nextjs
36 | START=npm run build && npm run start
37 | ```
38 |
39 | Seguindo esses passos, você terá seu site ou API funcionando sem problemas na Square Cloud. Se encontrar algum problema ou precisar de assistência adicional, não hesite em entrar em contato com nossa [equipe de suporte](../company/support).
40 |
41 | Este artigo foi traduzido por [Square Cloud](https://squarecloud.app) e pode estar desatualizado, recomendamos sempre conferir a versão original dele em inglês clicando [aqui](/getting-started/config-file).
--------------------------------------------------------------------------------
/tutorials/how-to-create-your-lavalink-server.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to create your Lavalink Server"
3 | sidebarTitle: "Lavalink Server"
4 | description: "Learn how to host your Lavalink server and stream high-quality music to your Discord bot."
5 | ---
6 |
7 | ## Introduction 🚀
8 |
9 | - Follow the tutorial below and host your Lavalink server today it"s super simple! If you need any assistance, feel free to reach out to us through our official support channels.
10 | - Next, you will need to create an account on Square Cloud, which can be done through the [sign up page](https://squarecloud.app/signup). You can use your email, to create an account.
11 | - Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
12 |
13 | ## Choosing the Version
14 |
15 | Choose your desired version of `Lavalink` by clicking [here](https://github.com/freyacodes/Lavalink/releases/). We recommend selecting the latest version for the best experience.
16 |
17 | ## Creating the squarecloud config file
18 |
19 |
20 | The squarecloud.app file is a configuration file that will be used to configure your application; it will be used to define the name, description, version, main file, among other things.
21 |
22 |
23 | ## Creating the application.yml
24 |
25 | Create a configuration file for your Lavalink server. You can access an example file [here](https://github.com/freyacodes/Lavalink/blob/master/LavalinkServer/application.yml.example).
26 |
27 | Set the `port` field in your `application.yml` file to: `80`.
28 |
29 | ## Enhancing Security
30 |
31 | It is highly recommended to configure a secure password in the `password` field of your configuration file (application.yml). We recommend using a password with at least 32 characters.
32 |
33 | It is important to remember that you must use port 443 (SSL) and the `secure` option in `true` to connect to your lavalink.
34 |
35 | ## Uploading Project to Square Cloud
36 |
37 | Create a compressed file (.zip) containing the `Lavalink.jar` and `application.yml`. Then, upload your configuration file to Square Cloud.
38 |
39 |
40 |
41 | Access the [Square Cloud
42 | Dashboard](https://squarecloud.app/dashboard/upload) and upload your project
43 | files.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | First, you need to have the CLI installed in your environment. If you
52 | don't have it yet, run the following command in your terminal:
53 | ```
54 | npm install -g @squarecloud/cli
55 | ```
56 | If you already have it, we recommend updating it. To do this, run the following command in your terminal:
57 |
58 |
59 | ```bash
60 | squarecloud update
61 | ```
62 |
63 |
64 | ```bash
65 | curl -fsSL https://cli.squarecloud.app/install | bash
66 | ```
67 |
68 |
69 |
70 |
71 | Now, to authenticate and use other CLI commands, you will find your
72 | authorization key [here](https://squarecloud.app/account) by clicking on
73 | "Request API Key". After obtaining your authorization key, run the
74 | following command:
75 | ```bash
76 | squarecloud login
77 | ```
78 |
79 |
80 | Finally, to deploy your application to Square Cloud using the CLI, you need to execute the following command, passing the path of your zip file:
81 | ```bash
82 | squarecloud upload server.zip
83 | ```
84 |
85 |
86 |
87 |
88 |
89 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
90 |
--------------------------------------------------------------------------------
/tutorials/how-to-deploy-your-website.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Hosting Your Website/API on Square Cloud"
3 | sidebarTitle: "Websites and APIs"
4 | description: "Learn how to host your website or API on Square Cloud using the squarecloud.app configuration file."
5 | ---
6 |
7 | ## Introduction
8 |
9 | - Create an account on Square Cloud, which can be done through the [sign up page](https://squarecloud.app/signup). You can use your email to create an account.
10 | - Have an active paid plan on your account. You can view our plans and purchase one according to your needs [here](https://squarecloud.app/plans).
11 |
12 | ## Creating the squarecloud config file
13 |
14 |
19 | The squarecloud.app file is a configuration file that will be used to
20 | configure your application; it will be used to define the name, description,
21 | version, main file, among other things.
22 |
23 |
24 | ### Important website parameters
25 | The **website port** needs to be **80**, if you are using a static website, you don't need to set the `START` parameter.
26 |
27 | In squarecloud.app configuration file:
28 | - `SUBDOMAIN`: If you are hosting a website, set this parameter to your desired subdomain.
29 | - `START`: A custom startup command (if needed).
30 |
31 |
32 | Website url will be: `my-subdomain-parameter`.squareweb.app
33 | ```systemd This example host a website without custom startup command
34 | MAIN=index.html
35 | MEMORY=512
36 | VERSION=recommended
37 | DISPLAY_NAME=My simple static website!
38 | SUBDOMAIN=mysite-simple-website
39 | ```
40 |
41 | ```systemd This example use all parameters and custom startup command in a website
42 | MAIN=index.js
43 | MEMORY=512
44 | VERSION=recommended
45 | DISPLAY_NAME=My simple nextjs website!
46 | SUBDOMAIN=mysite-nextjs-website
47 | START=npm run build && npm run start
48 | ```
49 |
50 | # Support for multiple technologies
51 |
52 |
53 |
54 | Learn how to host your React website on Square Cloud.
55 |
56 |
57 | Learn how to host your Next.js website on Square Cloud.
58 |
59 |
60 | Learn how to host your NestJs application on Square Cloud.
61 |
62 |
63 | Learn how to host your Vite website on Square Cloud.
64 |
65 |
66 | Learn how to host your Vue website on Square Cloud.
67 |
68 |
69 | Learn how to host your Flask application on Square Cloud.
70 |
71 |
72 | Learn how to host your Django application on Square Cloud.
73 |
74 |
75 | Learn how to host your Lavalink server and stream high-quality music to your Discord bot.
76 |
77 |
78 |
79 | By following these steps, you'll have your website or API up and running smoothly on Square Cloud. If you encounter any issues or need further assistance, don't hesitate to reach out to our [support team](../company/support).
--------------------------------------------------------------------------------
/tutorials/how-to-set-up-git-integration.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to set up Git integration in your application"
3 | sidebarTitle: "GitHub integration"
4 | description: "Learn how to configure Git integration on Square Cloud"
5 | ---
6 |
7 | ## Getting the GitHub Access Token
8 |
9 | - Visit the [Personal access tokens](https://github.com/settings/tokens) page to obtain your access token. Click on **"Generate new token"** and choose the **"classic"** option.
10 | - When choosing the classic token option, **select only** the **"repos" option** and do **not set an expiration time**. Remember to give a name to your token so that you can identify it later.
11 |
12 |
13 |
14 |
15 | - Finally, click on **"Generate token"** at the bottom of the page. Your access token will be displayed for you to **copy**.
16 |
17 |
18 |
19 |
20 | ## Configuring the Access Token in Square Cloud
21 |
22 | - After obtaining the access token, go to the [dashboard](https://squarecloud.app/dashboard), select your app, navigate to the Deploy section, and **paste your token in the corresponding field**. Click on **"Save"**.
23 |
24 |
25 |
26 |
27 | - After saving, a URL webhook will be displayed that **you need to copy**.
28 |
29 | ## Configuring the Square Cloud Webhook on GitHub
30 |
31 | - Now, access your application's repository (which can be private or public) and go to **"Deploy"**. Then, click on **"Webhooks"** and then on **"Add Webhook"**.
32 | - Paste your webhook in the Payload URL field, set the Content Type to **application/json**, and click on **"Add Webhook"**.
33 |
34 |
35 |
36 |
37 | ## Setting a branch for webhook
38 |
39 | - If you want to set a branch for the webhook, you can set a query parameter in the webhook URL.
40 | - Access the **webhook Payload URL** field in your GitHub repository and insert on the end of the webhook URL `?branch=name` where `name` is the name of the desired branch.
41 |
42 | In this example, the desired branch will be `main`
43 |
44 |
45 |
46 |
47 |
48 | ## Deploy
49 |
50 | - If you have followed all the steps correctly, simply commit to your repository. Your application on Square Cloud will be updated.
51 |
52 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
53 |
54 |
--------------------------------------------------------------------------------
/tutorials/how-to-set-up-your-domain.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "How to set up your custom domain"
3 | sidebarTitle: "Custom domains"
4 | description: "Learn how to configure your domain on Square Cloud"
5 | ---
6 |
7 | ## Introduction
8 |
9 | -- To configure your domain, you need to have the Standard plan or higher. You can purchase it on various domain registration platforms like:
10 |
11 | - [Registro.br](https://registro.br/)
12 | - [Square Space](https://squarespace.com/) *previously: Google Domains
13 | - [GoDaddy](https://www.godaddy.com/)
14 | - [Namecheap](https://www.namecheap.com/)
15 |
16 | Choose a platform that suits your needs and purchase your domain.
17 |
18 | ## Configuring DNS on Cloudflare
19 |
20 | - Access the website where you purchased your domain, such as [Hostinger](https://www.hostinger.com.br/) or [Registro.br](https://registro.br/).
21 | - Next, go to [Cloudflare](https://cloudflare.com/), navigate to "Websites" and click on "Add a site".
22 |
23 |
24 |
25 | After entering your domain, copy the provided nameservers and paste them on the website where you purchased the domain, in the DNS/Nameservers section.
26 |
27 | ## Configuring your domain on Square Cloud
28 |
29 | - Choose the site you want to configure the domain for in the [dashboard](https://squarecloud.app/dashboard), then go to the **Settings** option and enter your domain in place of "example.com."
30 |
31 |
32 |
33 |
34 | - Now that the domain is configured on Square Cloud, go back to Cloudflare, select your domain, and choose the DNS option.
35 | - Finally, point your domain to "cname.squareweb.app" with the type "CNAME", replacing "name" with your domain, and another with the type TXT with the value that will appear in "DNS Configuration" after clicking "save".
36 |
37 |
38 |
39 |
40 | ## Good to know
41 | ### www redirect to your domain
42 | - To redirect www to your domain, create a new record with the name "www" and the type "A", pointing to 192.0.2.1 (cloudflare internal IP).
43 | - Go to the "Page Rules" option on Cloudflare and create a new rule with the following settings:
44 |
45 |
46 |
47 |
48 |
49 | ### Troubleshooting
50 |
51 | - If you receive the Unauthorized DNS error, try clearing your browser cache and accessing the site again in 5 minutes. If the issue persists, [contact our team](/company/support).
52 |
53 |
54 |
55 |
56 | - If you receive the Cloudflare 1015 error, it means your domain is not configured correctly. Check your domain configuration and ensure it is correctly pointed to Square Cloud. If the issue persists, [contact our team](/company/support).
--------------------------------------------------------------------------------
/tutorials/managing-teams.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Managing Your Teams on Square Cloud"
3 | sidebarTitle: "Managing Teams"
4 | description: "Learn how the team system works and how to manage your teams"
5 | ---
6 |
7 | ## Introduction
8 |
9 | - Before you start, you will need to create an account on Square Cloud, which can be done through the [sign up page](https://squarecloud.app/signup). You can use your email to create an account.
10 | - Finally, you need to have a paid plan active on your account. You can view our plans and purchase one [here](https://squarecloud.app/pricing).
11 |
12 | ## Creating Your Team
13 |
14 | To create your team, you should go to the [dashboard](https://squarecloud.app/dashboard), click on your profile and choose the "Create a Team" option. Finally, just choose the name of your team and confirm. Thus, it will be created and you can access it by selecting your profile again and choosing the desired team.
15 |
16 |
17 |
18 |
19 |
20 | ## Adding Team Members
21 | To add a new member to the team, follow these steps:
22 |
23 |
24 |
25 | Ask the user you want to add to access the [config](https://squarecloud.app/account) page and trigger the `request team code` button. They should then send you the generated account code. Remember that this code can only be used once and expires after **5 minutes**.
26 |
27 |
28 | Access the [dashboard](https://squarecloud.app/dashboard), navigate to your profile, and select the team where you want to add the user. Then, go to the "Members" tab, click on the "Invite a member" button, and enter the user's account code you wish to invite.
29 |
30 |
31 |
32 |
33 |
34 |
35 | Only share your account code with trusted individuals.
36 |
37 | ### Roles
38 | Each member in the team has a certain role that provides specific permissions to be performed on the applications. Below you can see a list of permissions:
39 |
40 |
41 |
42 | Can view panels, metrics, logs and system alerts to monitor the overall integrity and performance.
43 |
44 |
45 |
46 | In addition to viewing permissions, you can control the lifecycle of applications by starting, stopping, and restarting services.
47 |
48 |
49 |
50 | Beyond manager permissions, you can upload, download, and edit files and application settings.
51 |
52 |
53 |
54 | Has full access, including viewing metrics, managing applications, editing files, accessing confidential data, and performing system backups and restores.
55 |
56 |
57 |
58 |
59 | Only the Admin role can view files such as `.env` `.env.production` and configuration file (`squarecloud.app/.config`)
60 |
61 |
62 | ## Adding Applications to the Team
63 | To add applications to your team, follow these steps:
64 |
65 |
66 |
67 | Access the team to which you want to add a new application.
68 |
69 |
70 |
71 |
72 |
73 | Click on "Add new" and select the application you want to add to the chosen team.
74 |
75 |
76 |
77 |
78 |
79 |
80 | Only the team owner can add applications.
81 |
82 | If you continue to experience any issues, please don't hesitate to [contact our support team](/company/support).
--------------------------------------------------------------------------------