### Install a Database Service Source: https://docs.instapods.com/api-reference/services Initiate the installation of a new database service within a pod. The installation runs in the background; poll the list endpoint to track status changes. ```bash POST /api/pods/{name}/services ``` -------------------------------- ### Install InstaPods CLI Source: https://docs.instapods.com/cli/installation Installs the InstaPods CLI by downloading and executing an installation script. It auto-detects the OS and architecture and installs to a common binary path. ```bash curl -fsSL https://instapods.com/install.sh | sh ``` -------------------------------- ### Install Python Dependencies Source: https://docs.instapods.com/cli/exec-and-ssh Example of installing Python dependencies using a specific pip executable within a pod. ```bash # Install Python dependencies instapods exec my-app -- /home/instapod/app/venv/bin/pip install -r requirements.txt ``` -------------------------------- ### Example package.json for Express App Source: https://docs.instapods.com/presets/nodejs A sample package.json file for an Express application, specifying the 'express' dependency and defining a 'start' script. ```json { "name": "my-app", "main": "index.js", "scripts": { "start": "node index.js" }, "dependencies": { "express": "^4.18.0" } } ``` -------------------------------- ### Python Build Log Example Source: https://docs.instapods.com/guides/deploy-button A successful Python deployment build log shows cloning, dependency installation, service restart, and a health check. If the build fails, errors are displayed for immediate fixing. ```text === Cloning/pulling repository === Cloning into '/home/instapod/app'... === Installing dependencies === Successfully installed fastapi-0.x uvicorn-0.x ... === Restarting services === Set start command (AI): source ~/app/venv/bin/activate && uvicorn app:app --host 0.0.0.0 --port 8000 === Health check === Service app: active === Deploy successful === ``` -------------------------------- ### Install a Database Service Source: https://docs.instapods.com/cli/services Installs a specified database service (e.g., MySQL, PostgreSQL, Redis) for an application. Service installation runs in the background. ```bash instapods services add my-app -s mysql instapods services add my-app -s postgresql instapods services add my-app -s redis ``` -------------------------------- ### MySQL Connection Example Source: https://docs.instapods.com/api-reference/services Command-line example for connecting to a MySQL service using retrieved credentials. ```bash mysql -u instapod -p'PASSWORD' -h localhost instapod ``` -------------------------------- ### PostgreSQL Connection Example Source: https://docs.instapods.com/api-reference/services Command-line example for connecting to a PostgreSQL service using retrieved credentials. ```bash psql -U instapod -h localhost instapod ``` -------------------------------- ### Redis Connection Example Source: https://docs.instapods.com/api-reference/services Command-line example for connecting to a Redis service using retrieved credentials. ```bash redis-cli -h localhost -p 6379 ``` -------------------------------- ### Reload Pod to Install Dependencies and Start App Source: https://docs.instapods.com/ Triggers a reload of the pod to install dependencies and start the application. This is the final step to make the app live. ```bash # Reload to install deps and start your app instapods pods reload my-app ``` -------------------------------- ### Example: Deploying a Node.js App Source: https://docs.instapods.com/cli/deploy This example shows the output of deploying a Node.js application, including pod creation and file upload. ```bash # Deploy a Node.js app (new pod) instapods deploy my-api # → # → Deploying my-api # → Detected nodejs (package.json) # → # → Creating pod ··································· ✓ 1.2s # → 42 files uploaded ································· ✓ 0.8s ``` -------------------------------- ### Install a Service Source: https://docs.instapods.com/api-reference/services Installs a new database service within a specified pod. The installation runs in the background, and the status should be polled using the list endpoint. ```APIDOC ## Install a Service ### Description Installs a new database service within a specified pod. The installation runs in the background, and the status should be polled using the list endpoint. ### Method POST ### Endpoint /api/pods/{name}/services ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod. #### Request Body - **service_type** (string) - Required - The type of service to install. Valid types: mysql, postgresql, redis. ### Request Example ```json { "service_type": "mysql" } ``` ### Response #### Success Response (202 Accepted) Returns the service object with `status: "installing"`. ### Errors - **400**: Invalid service type, pod not running. - **403**: Launch plan - upgrade required. - **409**: Service already installed. ``` -------------------------------- ### Full Git Deployment Example Source: https://docs.instapods.com/guides/git-deployment A comprehensive example demonstrating the creation of a Node.js pod, setting environment variables, adding a database service, connecting a GitHub repository for auto-deployment, and checking deployment status. ```bash # 1. Create the pod instapods pods create my-api --preset nodejs --plan build -w # 2. Set environment variables instapods exec my-api -- "cat > /home/instapod/app/.env << 'EOF'\nDATABASE_URL=postgres://instapod:secret@localhost:5432/instapod\nNODE_ENV=production\nEOF" # 3. Install a database instapods services add my-api -s postgresql -w # 4. Connect the repo (triggers first deploy) instapods git connect my-api --repo https://github.com/you/my-api --deploy # 5. Check deployment status instapods git status my-api # From now on, every push to main auto-deploys. # View deployment history anytime: instapods git deployments my-api ``` -------------------------------- ### Start a Pod using API Source: https://docs.instapods.com/getting-started/managing-pods Initiate a pod start operation via the API using a POST request. ```bash curl -X POST https://app.instapods.com/api/pods/my-app/start \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Start a Pod using CLI Source: https://docs.instapods.com/getting-started/managing-pods Use the CLI to start a specified pod. The operation can be optionally waited upon to complete. ```bash instapods pods start my-app # Wait until the operation completes instapods pods start my-app -w ``` -------------------------------- ### Wait for Service Installation Source: https://docs.instapods.com/cli/services Installs a service and blocks execution until the service is ready. If installation fails, this flag displays the specific error. ```bash instapods services add my-app -s mysql -w ``` -------------------------------- ### Example SSH Connection Source: https://docs.instapods.com/ssh-and-files/ssh-access An example of how to connect to a specific Instapods pod using its SSH host and port. ```bash ssh instapod@nbg1-1.instapods.app -p 2201 ``` -------------------------------- ### Install a service Source: https://docs.instapods.com/api-reference/overview Installs a service onto a specific pod. ```APIDOC ## POST /api/pods/{name}/services ### Description Install a service ### Method POST ### Endpoint /api/pods/{name}/services ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Get Git Configuration Response Source: https://docs.instapods.com/api-reference/git Example successful response for retrieving Git configuration. Includes repository URL, branch, auto-deploy status, and last deployment details. ```json { "repo_url": "https://github.com/you/repo", "branch": "main", "auto_deploy": true, "build_command": "", "last_deployment": { "id": "deploy_abc123", "status": "success", "commit_sha": "a1b2c3d", "commit_message": "fix: update error handling", "created_at": "2026-02-20T10:30:00Z", "finished_at": "2026-02-20T10:30:18Z" }, "created_at": "2026-02-20T09:00:00Z" } ``` -------------------------------- ### Install InstaPods CLI Source: https://docs.instapods.com/ Installs the InstaPods command-line interface using a curl script. ```bash # Install the CLI curl -fsSL https://instapods.com/install.sh | sh ``` -------------------------------- ### Control Pod Lifecycle with Wait and Timeout Source: https://docs.instapods.com/cli/pods Examples of controlling pod lifecycle operations (start, stop, restart) while waiting for completion and specifying custom timeouts. ```bash # Start and wait until running instapods pods start my-app -w # Stop with a custom timeout instapods pods stop my-app -w --timeout 30 # Restart and wait instapods pods restart my-app -w ``` -------------------------------- ### Install Packages and Run App in Pod Source: https://docs.instapods.com/presets/python These commands demonstrate how to install packages using pip and run a Python application directly within the pod's environment. The virtual environment is auto-activated. ```bash # These all work inside the pod pip install flask python app.py ``` -------------------------------- ### Example Live App URL Source: https://docs.instapods.com/ An example of the public URL assigned to a deployed application on InstaPods. ```text # → https://my-app.nbg1-1.instapods.app ``` -------------------------------- ### Quick Start: Create Pod and Connect Git Repo Source: https://docs.instapods.com/guides/git-deployment Create a new pod with a Node.js preset and then connect a GitHub repository, triggering the first deployment. ```bash # Create a pod instapods pods create my-api --preset nodejs -w # Connect a GitHub repo and trigger the first deploy instapods git connect my-api --repo https://github.com/you/my-api --deploy # That's it. Push to main and it auto-deploys. ``` -------------------------------- ### Run Database Migration Source: https://docs.instapods.com/cli/exec-and-ssh Example of running a PHP database migration within a pod. ```bash # Run a database migration instapods exec my-app -- php artisan migrate ``` -------------------------------- ### Remove and Reinstall a Service Source: https://docs.instapods.com/support/troubleshooting If a service gets stuck in the 'installing' state for too long, you can try removing it via the API and then reinstalling it using the CLI. Ensure you replace 'YOUR_TOKEN' with your actual API token. ```bash # Via API curl -X DELETE https://app.instapods.com/api/pods/my-app/services/mysql \ -H "Authorization: Bearer YOUR_TOKEN" instapods services add my-app -s mysql -w ``` -------------------------------- ### Connect to PostgreSQL using Python (psycopg2) Source: https://docs.instapods.com/services/postgresql Example of establishing a database connection using the psycopg2 library in Python. ```python import psycopg2 conn = psycopg2.connect( host='localhost', port=5432, user='instapod', password='YOUR_PASSWORD', dbname='instapod' ) ``` -------------------------------- ### Install Service with Extended Timeout Source: https://docs.instapods.com/cli/services Installs a PostgreSQL service and waits for it to be ready, specifying a maximum timeout of 180 seconds. ```bash # Install with extended timeout instapods services add my-app -s postgresql -w --timeout 180 ``` -------------------------------- ### Start Pod Source: https://docs.instapods.com/getting-started/managing-pods Starts a specified pod. The operation can be optionally waited upon to complete. ```APIDOC ## Start Pod ### Description Starts a specified pod. ### Method POST ### Endpoint /api/pods/{pod_name}/start ### Parameters #### Path Parameters - **pod_name** (string) - Required - The name of the pod to start. #### Query Parameters - **wait** (boolean) - Optional - If true, waits until the operation completes. ### Request Example ```bash curl -X POST https://app.instapods.com/api/pods/my-app/start \ -H "Authorization: Bearer YOUR_TOKEN" ``` ### Response #### Success Response (200) - **status** (string) - The status of the pod after the operation. #### Response Example ```json { "status": "running" } ``` ``` -------------------------------- ### Connect to PostgreSQL using Node.js Source: https://docs.instapods.com/services/postgresql Example of setting up a connection pool for PostgreSQL using the 'pg' library in Node.js. ```javascript const { Pool } = require('pg'); const pool = new Pool({ host: 'localhost', port: 5432, user: 'instapod', password: 'YOUR_PASSWORD', database: 'instapod' }); ``` -------------------------------- ### Start, Stop, and Restart Pods Source: https://docs.instapods.com/cli/pods Commands to control the lifecycle of a pod. These include starting, stopping, and restarting a specified pod. ```bash instapods pods start my-app instapods pods stop my-app instapods pods restart my-app ``` -------------------------------- ### Install Service Request Body Source: https://docs.instapods.com/api-reference/services Specify the type of database service to install. Valid types include MySQL, PostgreSQL, and Redis. ```json { "service_type": "mysql" } ``` -------------------------------- ### Install MySQL Service via API Source: https://docs.instapods.com/services/overview Install a MySQL service for a specific pod using the InstaPods API. Ensure you include your API token and set the correct content type. ```bash curl -X POST https://app.instapods.com/api/pods/my-app/services \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"service_type": "mysql"}' ``` -------------------------------- ### List Installed Services Source: https://docs.instapods.com/cli/services Shows all installed services for a given application, including their status, type, port, and version. Failed services will display their error message. ```bash instapods services list my-app ``` -------------------------------- ### List installed services Source: https://docs.instapods.com/api-reference/overview Lists all services installed on a specific pod. ```APIDOC ## GET /api/pods/{name}/services ### Description List installed services ### Method GET ### Endpoint /api/pods/{name}/services ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Deployment Detail Response Source: https://docs.instapods.com/api-reference/git Example response for a single deployment, including the build log. This provides comprehensive output from the build process. ```json { "id": "deploy_abc123", "status": "success", "commit_sha": "a1b2c3d", "commit_message": "fix: update error handling", "trigger": "push", "build_log": "Pulling latest code...\nnpm install...\nnpm run build...\nRestarting service...\nDeploy complete.", "created_at": "2026-02-20T10:30:00Z", "finished_at": "2026-02-20T10:30:18Z" } ``` -------------------------------- ### Connect to MySQL using Python Source: https://docs.instapods.com/services/mysql Example for connecting to MySQL from a Python application using the 'mysql.connector' library. Remember to substitute 'YOUR_PASSWORD'. ```python import mysql.connector conn = mysql.connector.connect( host='localhost', port=3306, user='instapod', password='YOUR_PASSWORD', database='instapod' ) ``` -------------------------------- ### Create a Pod using InstaPods CLI Source: https://docs.instapods.com/getting-started/creating-a-pod Use the CLI to create a new pod with a specified name and preset. This is a basic example for initiating pod creation. ```bash instapods pods create my-app -p nodejs --plan build ``` -------------------------------- ### Get Deployment Detail Source: https://docs.instapods.com/api-reference/git Retrieve detailed information for a specific deployment, including the full build log. ```bash GET /api/pods/{name}/git/deployments/{id} ``` -------------------------------- ### Connect to PostgreSQL using Python (SQLAlchemy) Source: https://docs.instapods.com/services/postgresql Example of creating a database engine with SQLAlchemy for PostgreSQL connections. ```python from sqlalchemy import create_engine engine = create_engine('postgresql://instapod:YOUR_PASSWORD@localhost:5432/instapod') ``` -------------------------------- ### Connect to MySQL using PHP Source: https://docs.instapods.com/services/mysql Example of establishing a MySQL connection using PHP's PDO. Ensure you replace 'YOUR_PASSWORD' with the actual password. ```php $pdo = new PDO( 'mysql:host=localhost;port=3306;dbname=instapod', 'instapod', 'YOUR_PASSWORD' ); ``` -------------------------------- ### Verify InstaPods CLI Installation Source: https://docs.instapods.com/cli/installation Checks if the InstaPods CLI is installed correctly by printing its version information. This command confirms the CLI is accessible and provides build details. ```bash instapods version ``` -------------------------------- ### Install PostgreSQL Service via CLI Source: https://docs.instapods.com/services/postgresql Use this command to add PostgreSQL 14 as a service to your application within Instapods. ```bash instapods services add my-app -s postgresql -w ``` -------------------------------- ### List Services Response (200 OK) Source: https://docs.instapods.com/api-reference/services Example of a successful response when listing services, showing a running MySQL service. ```json [ { "id": "svc_abc123", "pod_name": "my-app", "service_type": "mysql", "status": "running", "version": "8.0", "port": 3306, "host": "localhost", "created_at": "2026-02-20T10:00:00Z", "updated_at": "2026-02-20T10:05:00Z" } ] ``` -------------------------------- ### Check Disk Usage Source: https://docs.instapods.com/cli/exec-and-ssh Example of checking disk usage within a pod. ```bash # Check disk usage instapods exec my-app -- df -h ``` -------------------------------- ### Get Credentials Source: https://docs.instapods.com/api-reference/services Retrieves the connection credentials for a specific database service within a pod. Credentials are auto-generated during installation. ```APIDOC ## Get Credentials ### Description Retrieves the connection credentials for a specific database service within a pod. Credentials are auto-generated during installation. ### Method GET ### Endpoint /api/pods/{name}/services/{serviceType}/credentials ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod. - **serviceType** (string) - Required - The type of service for which to retrieve credentials (e.g., mysql, postgresql, redis). ### Response #### Success Response (200 OK) - **service_type** (string) - The type of the service. - **status** (string) - The current status of the service. - **host** (string) - The host address for the service. - **port** (integer) - The port the service is running on. - **username** (string) - The username for connecting to the service. - **password** (string) - The auto-generated password for connecting to the service. - **database** (string) - The default database name for the service. ### Response Example ```json { "service_type": "mysql", "status": "running", "host": "localhost", "port": 3306, "username": "instapod", "password": "auto-generated-password", "database": "instapod" } ``` ``` -------------------------------- ### Check Node.js Version Source: https://docs.instapods.com/cli/exec-and-ssh Example of checking the Node.js version within a pod. ```bash # Check Node.js version instapods exec my-app -- node --version ``` -------------------------------- ### Install Redis Service via CLI Source: https://docs.instapods.com/services/redis Use this command to add Redis as a service to your application. The -w flag indicates to wait for the service to be ready. ```bash instapods services add my-app -s redis -w ``` -------------------------------- ### Connect to PostgreSQL using PHP (PDO) Source: https://docs.instapods.com/services/postgresql Example of creating a PDO instance to connect to PostgreSQL in PHP. ```php $pdo = new PDO( 'pgsql:host=localhost;port=5432;dbname=instapod', 'instapod', 'YOUR_PASSWORD' ); ``` -------------------------------- ### manage_pod Source: https://docs.instapods.com/mcp/tools Manages the state of a pod, allowing actions such as starting, stopping, restarting, reloading, or deleting it. The 'reload' action is particularly powerful, as it automatically starts a stopped pod, installs dependencies, detects frameworks, restarts services, and performs a health check. ```APIDOC ## manage_pod ### Description Start, stop, restart, reload, or delete a pod. ### Parameters #### Request Body - **name** (string) - Yes - Pod name - **action** (string) - Yes - `start`, `stop`, `restart`, `reload`, or `delete` ### Returns Updated pod object, reload status with health check, or deletion confirmation. ### Example Prompts "Restart my-api" "Reload my-app after I changed the code" "Delete test-pod" ``` -------------------------------- ### Flask Application Dependencies Source: https://docs.instapods.com/presets/python Example requirements.txt file for a Flask application, including Flask and Gunicorn. ```text # requirements.txt flask>=3.0 gunicorn>=21.2 ``` -------------------------------- ### Restart a Stopped Pod Source: https://docs.instapods.com/support/troubleshooting If an SSH connection times out, the pod might be stopped. Use 'instapods pods get' to check the status and 'instapods pods start' to restart it if necessary. ```bash instapods pods get my-app ``` ```bash instapods pods start my-app ``` -------------------------------- ### Create SetupIntent Source: https://docs.instapods.com/api-reference/billing Creates a SetupIntent for securely collecting payment method details on the frontend. ```APIDOC ## POST /api/billing/setup-intent ### Description Creates a SetupIntent for securely collecting payment method details on the frontend. ### Method POST ### Endpoint /api/billing/setup-intent ### Response #### Success Response (200 OK) - **client_secret** (string) - The client secret for the SetupIntent, used in Stripe Elements. ### Response Example ```json { "client_secret": "seti_xxx_secret_yyy" } ``` ``` -------------------------------- ### List Pods using API Source: https://docs.instapods.com/getting-started/managing-pods Retrieve a list of all pods via the API using a GET request. ```bash curl https://app.instapods.com/api/pods \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### List Deployments Response Source: https://docs.instapods.com/api-reference/git Example response containing a list of deployments. Each deployment includes its ID, status, commit details, trigger type, and timestamps. ```json { "deployments": [ { "id": "deploy_abc123", "status": "success", "commit_sha": "a1b2c3d", "commit_message": "fix: update error handling", "trigger": "push", "created_at": "2026-02-20T10:30:00Z", "finished_at": "2026-02-20T10:30:18Z" } ] } ``` -------------------------------- ### Run Shell Command with Pipes Source: https://docs.instapods.com/cli/exec-and-ssh Example of running a shell command with pipes, such as extracting the first 5 lines of os-release information. ```bash # Run a shell command with pipes instapods exec my-app -- bash -c "cat /etc/os-release | head -5" ``` -------------------------------- ### Example Flask Application Source: https://docs.instapods.com/presets/python A basic Flask application that listens on 0.0.0.0:8000. Ensure your app binds to 0.0.0.0 for external accessibility. ```python # app.py from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello from InstaPods!' if __name__ == '__main__': app.run(host='0.0.0.0', port=8000) ``` -------------------------------- ### Add MySQL Service Source: https://docs.instapods.com/presets/php Add a MySQL database service to your application. The -w flag indicates that the service should be started automatically. ```bash instapods services add my-php-app -s mysql -w ``` -------------------------------- ### Create Pod with Custom Timeout Source: https://docs.instapods.com/cli/pods Creates a pod with a custom timeout for the creation process, specified in seconds. This example sets a 5-minute timeout. ```bash instapods pods create big-app -p nodejs --timeout 300 ``` -------------------------------- ### Connect to Redis with PHP Source: https://docs.instapods.com/services/redis Example of connecting to Redis using the native Redis extension and performing basic set/get operations. Ensure Redis is running on localhost:6379. ```php $redis = new Redis(); $redis->connect('localhost', 6379); $redis->set('key', 'value'); $value = $redis->get('key'); ``` -------------------------------- ### Deploy 1-Click App via API Source: https://docs.instapods.com/guides/one-click-apps Use the API to create a pod for a 1-Click App, specifying the app type and configuration variables. ```bash curl -X POST https://app.instapods.com/api/pods \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "my-memory", "plan_slug": "grow", "app_type": "automem", "app_config": { "EMBEDDING_PROVIDER": "openai", "OPENAI_API_KEY": "sk-your-key" } }' ``` -------------------------------- ### Access Redis via CLI Source: https://docs.instapods.com/services/redis Connect to your pod via SSH and then use the redis-cli tool to interact with Redis. Demonstrates basic SET and GET commands. ```bash instapods ssh my-app redis-cli ``` ```redis 127.0.0.1:6379> SET greeting "hello" OK 127.0.0.1:6379> GET greeting "hello" ``` -------------------------------- ### Create Pod with Build Plan and SSH Key Source: https://docs.instapods.com/cli/pods Demonstrates creating a pod for a Node.js application with the 'build' plan and specifying an SSH public key for access. ```bash instapods pods create api -p nodejs --plan build ``` ```bash instapods pods create ml-service -p python --ssh-key ~/.ssh/id_ed25519.pub ``` -------------------------------- ### Start / Stop / Restart a Pod Source: https://docs.instapods.com/api-reference/pods Performs start, stop, or restart operations on a specified pod. ```APIDOC ## POST /api/pods/{name}/start ## POST /api/pods/{name}/stop ## POST /api/pods/{name}/restart ### Description Performs start, stop, or restart operations on a specified pod. ### Method POST ### Endpoint /api/pods/{name}/start /api/pods/{name}/stop /api/pods/{name}/restart ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod to operate on. ### Response Returns the updated Pod object. ``` -------------------------------- ### Create a Pod Source: https://docs.instapods.com/api-reference/pods Use this snippet to create a new pod. Specify the pod name, preset, plan, region, and optionally SSH keys, descriptions, and environment variables. ```json { "name": "my-app", "preset": "nodejs", "plan_slug": "launch", "region": "eu-nbg", "ssh_key": "ssh-ed25519 AAAA...", "description": "My Node.js app", "customizations": { "env_vars": { "NODE_ENV": "production" } } } ``` -------------------------------- ### Connect and Deploy GitHub Repo via CLI Source: https://docs.instapods.com/guides/git-deployment Connect a GitHub repository to your app and trigger an immediate deployment using the command line interface. ```bash # Connect and deploy immediately instapods git connect my-app --repo https://github.com/you/repo --deploy # Connect to a specific branch instapods git connect my-app --repo https://github.com/you/repo --branch develop # Connect a private repo with a personal access token instapods git connect my-app \ --repo https://github.com/you/private-repo \ --auth-token ghp_your_token_here \ --deploy ``` -------------------------------- ### Download a File Source: https://docs.instapods.com/api-reference/files Initiate a download for a file, returning its raw binary content with `Content-Disposition: attachment`. ```HTTP GET /api/pods/{name}/files/download?path=/home/instapod/app/data.json ``` -------------------------------- ### Deploy to a Specific Plan and Region Source: https://docs.instapods.com/cli/deploy Deploy an application using a specified preset (e.g., Python), plan (e.g., build), and region (e.g., eu-nbg). This is useful for managing different environments or resource requirements. ```bash instapods deploy staging-api --preset python --plan build -r eu-nbg ``` -------------------------------- ### Get Pod Details using API Source: https://docs.instapods.com/getting-started/managing-pods Retrieve detailed information about a specific pod via the API using a GET request. ```bash curl https://app.instapods.com/api/pods/my-app \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Install Composer Dependencies Source: https://docs.instapods.com/presets/php Install PHP project dependencies using Composer within the application pod. The --no-dev flag excludes development dependencies. ```bash instapods exec my-php-app -- composer install --no-dev ``` -------------------------------- ### Example Error Response Source: https://docs.instapods.com/api-reference/overview Errors return an appropriate HTTP status code with a JSON body indicating the error. This example shows a 'Pod not found' error. ```json { "error": "Pod not found" } ``` -------------------------------- ### Create SetupIntent for Payment Method Source: https://docs.instapods.com/api-reference/billing Creates a SetupIntent used by Stripe Elements on the frontend to securely collect payment details. Returns a client secret. ```HTTP POST /api/billing/setup-intent ``` ```JSON { "client_secret": "seti_xxx_secret_yyy" } ``` -------------------------------- ### List Services Source: https://docs.instapods.com/api-reference/services Retrieves a list of all database services installed in a specified pod. Returns an empty array if no services are installed. Failed services may include an error message. ```APIDOC ## List Services ### Description Retrieves a list of all database services installed in a specified pod. Returns an empty array if no services are installed. Failed services may include an error message. ### Method GET ### Endpoint /api/pods/{name}/services ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod. ### Response #### Success Response (200 OK) - **id** (string) - The unique identifier of the service. - **pod_name** (string) - The name of the pod the service belongs to. - **service_type** (string) - The type of the service (e.g., mysql, postgresql, redis). - **status** (string) - The current status of the service (installing, running, stopped, error). - **version** (string) - The version of the service. - **port** (integer) - The port the service is running on. - **host** (string) - The host address for the service. - **created_at** (string) - The timestamp when the service was created. - **updated_at** (string) - The timestamp when the service was last updated. ### Response Example ```json [ { "id": "svc_abc123", "pod_name": "my-app", "service_type": "mysql", "status": "running", "version": "8.0", "port": 3306, "host": "localhost", "created_at": "2026-02-20T10:00:00Z", "updated_at": "2026-02-20T10:05:00Z" } ] ``` ``` -------------------------------- ### Connect to MySQL using Node.js Source: https://docs.instapods.com/services/mysql Demonstrates how to connect to MySQL using the 'mysql2/promise' library in Node.js. Replace 'YOUR_PASSWORD' with your credentials. ```javascript const mysql = require('mysql2/promise'); const connection = await mysql.createConnection({ host: 'localhost', port: 3306, user: 'instapod', password: 'YOUR_PASSWORD', database: 'instapod' }); ``` -------------------------------- ### Get Pod Details in JSON Format Source: https://docs.instapods.com/cli/pods Append the `--json` flag to the `instapods pods get ` command to retrieve specific pod information in a machine-readable format. ```bash instapods pods get my-app --json ``` -------------------------------- ### Basic Deploy to InstaPods Button Source: https://docs.instapods.com/guides/deploy-button This is the standard Markdown for the "Deploy to InstaPods" button. Replace OWNER/REPO with your GitHub repository details. ```markdown [![Deploy to InstaPods](https://instapods.com/deploy-button.svg)](https://app.instapods.com/dashboard/pods/create?repo=https://github.com/OWNER/REPO) ``` -------------------------------- ### Deploy Static Site with Instapods CLI Source: https://docs.instapods.com/presets/static The 'instapods deploy' command can be used to deploy your static site, automatically detecting the preset. It's a convenient alternative to 'sync' for deploying local directories. ```bash instapods deploy my-site --local ./dist ``` -------------------------------- ### Create a Pod with Preset Source: https://docs.instapods.com/cli/pods Creates a new pod with a specified name and preset. The CLI returns immediately after the API accepts the request by default. ```bash instapods pods create my-app -p nodejs ``` -------------------------------- ### Get pod logs Source: https://docs.instapods.com/api-reference/overview Retrieves the logs for a specific pod. ```APIDOC ## GET /api/pods/{name}/logs ### Description Get pod logs ### Method GET ### Endpoint /api/pods/{name}/logs ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Deploy Project Files Source: https://docs.instapods.com/presets/php Deploy your local project files to the application pod. This is an alternative to the files sync command. ```bash instapods deploy my-php-app --local ./my-laravel-project ``` -------------------------------- ### Disconnect Response Source: https://docs.instapods.com/api-reference/git Example response after successfully disconnecting a Git repository. ```json { "status": "disconnected" } ``` -------------------------------- ### Get metrics history Source: https://docs.instapods.com/api-reference/overview Retrieves the historical metrics for a specific pod. ```APIDOC ## GET /api/pods/{name}/metrics/history ### Description Get metrics history ### Method GET ### Endpoint /api/pods/{name}/metrics/history ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Get current metrics Source: https://docs.instapods.com/api-reference/overview Retrieves the current metrics for a specific pod. ```APIDOC ## GET /api/pods/{name}/metrics ### Description Get current metrics ### Method GET ### Endpoint /api/pods/{name}/metrics ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Get service credentials Source: https://docs.instapods.com/api-reference/overview Retrieves the credentials for a specific service on a pod. ```APIDOC ## GET /api/pods/{name}/services/{type}/credentials ### Description Get service credentials ### Method GET ### Endpoint /api/pods/{name}/services/{type}/credentials ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod - **type** (string) - Required - The type of the service ``` -------------------------------- ### InstaPods CLI: Basic Pod Creation Source: https://docs.instapods.com/getting-started/creating-a-pod Create a static pod using the CLI. This command is straightforward and suitable for simple static site deployments. ```bash instapods pods create my-site -p static ``` -------------------------------- ### Get pod details Source: https://docs.instapods.com/api-reference/overview Retrieves detailed information about a specific pod. ```APIDOC ## GET /api/pods/{name} ### Description Get pod details ### Method GET ### Endpoint /api/pods/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Get Pod Details Source: https://docs.instapods.com/getting-started/managing-pods Retrieves detailed information about a specific pod. ```APIDOC ## Get Pod Details ### Description Retrieves detailed information about a specific pod. ### Method GET ### Endpoint /api/pods/{pod_name} ### Parameters #### Path Parameters - **pod_name** (string) - Required - The name of the pod to retrieve details for. ### Response #### Success Response (200) - **pod** (object) - An object containing the details of the pod. - **name** (string) - The name of the pod. - **preset** (string) - The preset of the pod. - **plan** (string) - The plan of the pod. - **cpu** (string) - The CPU allocation of the pod. - **memory** (string) - The memory allocation of the pod. - **disk** (string) - The disk allocation of the pod. - **status** (string) - The current status of the pod. - **domain** (string) - The domain associated with the pod. - **created_at** (string) - The timestamp when the pod was created. - **updated_at** (string) - The timestamp when the pod was last updated. #### Response Example ```json { "pod": { "name": "my-app", "preset": "default", "plan": "build", "cpu": "1 core", "memory": "1GB", "disk": "10GB", "status": "running", "domain": "my-app.instapods.com", "created_at": "2023-01-01T12:00:00Z", "updated_at": "2023-01-01T12:00:00Z" } } ``` ``` -------------------------------- ### Get Subscription Source: https://docs.instapods.com/api-reference/billing Fetches the details of the currently active subscription for the team. ```APIDOC ## GET /api/billing/subscription ### Description Fetches the details of the currently active subscription for the team. ### Method GET ### Endpoint /api/billing/subscription ### Response #### Success Response (200 OK) - **id** (string) - The subscription ID. - **team_id** (string) - The ID of the team the subscription belongs to. - **plan_slug** (string) - The slug of the subscription plan. - **status** (string) - The current status of the subscription (e.g., `active`, `cancelled`, `past_due`, `trialing`). - **current_period_start** (string) - The start date of the current billing period. - **current_period_end** (string) - The end date of the current billing period. - **created_at** (string) - The timestamp when the subscription was created. ### Response Example ```json { "id": "sub_abc123", "team_id": "team_xyz", "plan_slug": "build", "status": "active", "current_period_start": "2026-02-01T00:00:00Z", "current_period_end": "2026-03-01T00:00:00Z", "created_at": "2026-01-15T10:00:00Z" } ``` ``` -------------------------------- ### Get a Pod Source: https://docs.instapods.com/api-reference/pods Retrieves a specific pod object with its live status. ```APIDOC ## GET /api/pods/{name} ### Description Retrieves a specific pod object with its live status synced from the container runtime. ### Method GET ### Endpoint /api/pods/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod to retrieve. ``` -------------------------------- ### Trigger Manual Deploy via CLI Source: https://docs.instapods.com/guides/git-deployment Initiate a manual deployment for your application using the CLI. Options include returning immediately or waiting for the deployment to complete. ```bash instapods git deploy my-app ``` ```bash instapods git deploy my-app -w ``` ```bash instapods git deploy my-app -w --timeout 300s ``` -------------------------------- ### Connect GitHub Repo for Auto-Deployment Source: https://docs.instapods.com/quickstart Connect a GitHub repository to your Instapods pod for automatic deployment on push to the main branch. The `--deploy` flag initiates the first deployment. ```bash instapods git connect my-first-app \ --repo https://github.com/you/your-repo --deploy ``` -------------------------------- ### Get Credits Source: https://docs.instapods.com/api-reference/billing Retrieves the available credits and a list of credit details for the team. ```APIDOC ## GET /api/billing/credits ### Description Retrieves the available credits and a list of credit details for the team. ### Method GET ### Endpoint /api/billing/credits ### Response #### Success Response (200 OK) - **available** (integer) - The total amount of available credits in cents. - **credits** (array) - A list of credit objects. - **id** (string) - The credit ID. - **amount** (integer) - The original amount of the credit in cents. - **remaining** (integer) - The remaining amount of the credit in cents. - **type** (string) - The type of credit (e.g., `promo`, `bonus`, `refund`). - **reason** (string) - The reason for the credit. - **expires_at** (string) - The expiration date of the credit. ### Response Example ```json { "available": 5000, "credits": [ { "id": "cred_abc", "amount": 5000, "remaining": 2000, "type": "promo", "reason": "Welcome bonus", "expires_at": "2026-12-31T23:59:59Z" } ] } ``` ``` -------------------------------- ### Get Invoice Source: https://docs.instapods.com/api-reference/billing Retrieves a specific invoice by its ID, including line items. ```APIDOC ## GET /api/billing/invoices/{invoiceId} ### Description Retrieves a specific invoice by its ID, including line items. ### Method GET ### Endpoint /api/billing/invoices/{invoiceId} ### Parameters #### Path Parameters - **invoiceId** (string) - Required - The ID of the invoice to retrieve. ``` -------------------------------- ### Advanced Pod Directory Sync Options Source: https://docs.instapods.com/cli/files Demonstrates syncing a directory with custom exclusions, dry-run previews, and specifying a remote path. Excludes glob patterns can be repeated. ```bash # Sync current directory (simplest form) instapods files sync my-app # Sync with additional exclusions instapods files sync my-app --local ./project \ --exclude "*.log" \ --exclude "vendor" # Preview before syncing instapods files sync my-app --local ./project --dry-run # Sync to a specific remote path instapods files sync my-app --local ./build --remote /home/instapod/app/public ``` -------------------------------- ### Get Preset Config Source: https://docs.instapods.com/api-reference/pods Retrieves the preset configuration details for a specific pod. ```APIDOC ## GET /api/pods/{name}/preset ### Description Retrieves the preset configuration for this pod, including port, app root, public root, and runtime details. ### Method GET ### Endpoint /api/pods/{name}/preset ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod whose preset configuration is to be retrieved. ``` -------------------------------- ### Get Pod SSH Port Source: https://docs.instapods.com/cli/exec-and-ssh Retrieve the SSH port for a specific pod. ```bash instapods pods get my-app ``` -------------------------------- ### Configure Shell Completion for Fish Source: https://docs.instapods.com/cli/installation Sets up shell completion for the InstaPods CLI in Fish by redirecting the completion script output to the Fish completions directory. ```bash instapods completion fish > ~/.config/fish/completions/instapods.fish ``` -------------------------------- ### Deploy Project via CLI Source: https://docs.instapods.com/guides/deploy-button This command-line interface command deploys a project from a specified GitHub repository. It automatically detects the stack, creates a pod, and monitors the build process. ```bash instapods deploy --repo https://github.com/OWNER/REPO # detects the stack, creates the pod, and follows the first build to completion ``` -------------------------------- ### Get SSH connection info Source: https://docs.instapods.com/api-reference/overview Retrieves SSH connection information for a specific pod. ```APIDOC ## GET /api/pods/{name}/ssh ### Description Get SSH connection info ### Method GET ### Endpoint /api/pods/{name}/ssh ### Parameters #### Path Parameters - **name** (string) - Required - The name of the pod ``` -------------------------------- ### Create Static Site Pod in Specific Region Source: https://docs.instapods.com/cli/pods Creates a pod for a static site and deploys it to a specific geographical region, 'eu-nbg' in this case. ```bash instapods pods create my-site -p static -r eu-nbg ``` -------------------------------- ### Get MySQL Credentials Source: https://docs.instapods.com/presets/php Retrieve the connection credentials for the MySQL service associated with your application. ```bash instapods services creds my-php-app -s mysql ``` -------------------------------- ### Get Deployment Detail Source: https://docs.instapods.com/api-reference/git Fetches the details of a specific deployment, including the build log. ```APIDOC ## GET /api/pods/{name}/git/deployments/{id} ### Description Fetches the details of a specific deployment, including the build log. ### Method GET ### Endpoint /api/pods/{name}/git/deployments/{id} ### Response #### Success Response (200 OK) Returns a single deployment object with a `build_log` field containing the full build output: ```json { "id": "deploy_abc123", "status": "success", "commit_sha": "a1b2c3d", "commit_message": "fix: update error handling", "trigger": "push", "build_log": "Pulling latest code...\nnpm install...\nnpm run build...\nRestarting service...\nDeploy complete.", "created_at": "2026-02-20T10:30:00Z", "finished_at": "2026-02-20T10:30:18Z" } ``` ``` -------------------------------- ### Access Live Application Source: https://docs.instapods.com/introduction Provides the public URL where your application is now live. The URL format includes the pod name and a region identifier. ```bash # That's it — your app is live # → https://my-app.nbg1-1.instapods.app ```