This is the full developer documentation for DockHive # DockHive documentation > DockHive is the first agentic, decentralized AI cloud. Push your code, let Drone deploy it, and run your databases, file storage, realtime messaging, functions, workflows, dev environments and tunnels next to it in ten regions. ## Start here [Section titled “Start here”](#start-here) Apps and Drone Connect GitHub (or upload a folder), click Drone, and get a live HTTPS address. Push to deploy, roll back, add your own domain. [Deploy an app](/apps/) Databases PostgreSQL, MySQL, MariaDB, Redis and RabbitMQ with TLS on by default, an IP allowlist and on-demand backups. [Create a database](/databases/) Hive Buckets S3-compatible object storage for uploads, media and backups. Works with the AWS CLI, boto3, the AWS SDK, Laravel and Django. No request fees. [Create a bucket](/buckets/quickstart/) Hive Realtime Live updates, chat, presence and notifications over WebSockets. Works with `pusher-js`, Laravel Echo and the Pusher server libraries: moving from Pusher is a change of host and keys. [Create a realtime app](/realtime/quickstart/) Hive Functions Run code at your own HTTPS URL on every request or on a schedule, in Rust, Go, TypeScript, JavaScript or Python. Nothing to pay while it sits idle. [Write a function](/hive-functions/quickstart/) n8n workflows Your own n8n workspace with its own address, ready in a minute. Deleted by mistake? Restore it within 7 days. [Create a workspace](/n8n/) HivePods Cloud dev environments in seconds. Pick an OS and a size, open a terminal in the browser or from your own, or install one of hundreds of apps from the App Marketplace. [Create a pod](/hivepods/) CLI and MCP The `hivepod` CLI deploys a folder in one command and includes an MCP server for Claude Code, Cursor and other AI tools. [Install the CLI](/cli/) DockHive Tunnel Put an app running on your computer on a public `https://.dockhive.live` address. [Start a tunnel](/tunnel/) ## Popular pages [Section titled “Popular pages”](#popular-pages) [Custom domains for apps](/apps/custom-domains/) [Environment variables](/apps/environment-variables/) [API keys](/api/api-keys/) [Plans and billing](/billing/) [Limits and troubleshooting](/apps/troubleshooting/) [Deprecated and legacy](/legacy/)Looking for Hive proposals, node setup or Seacure Weave? Start here. # Using the API > The DockHive API base URL, authentication, regions and a few core endpoints. The console, the CLIs and the MCP server all use the same API. You can call it too. All API requests go to `https://api.dockhive.io/api/v1`. | | | | -------------- | ------------------------------------------------------------------ | | Base URL | `https://api.dockhive.io/api/v1` | | Authentication | `Authorization: Bearer ` (see [API keys](/api/api-keys/)) | | Format | JSON | ```sh export DOCKHIVE_API_KEY=dh_pat_... curl https://api.dockhive.io/api/v1/auth/me -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` Note This page covers a few stable endpoints. Other endpoints the console uses may change without notice; build on the ones below. ## Regions [Section titled “Regions”](#regions) List calls return resources from **every region**, each with a `region` field. To target one region (for example when creating something, or acting on a database or n8n workspace), add the `X-Region` header or a `region` query parameter: ```sh curl "https://api.dockhive.io/api/v1/databases?region=eu" -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` ## Core endpoints [Section titled “Core endpoints”](#core-endpoints) | Method and path | What it returns | | --------------------------------------- | ---------------------------------------- | | `GET /api/v1/regions` | Regions and their health. No key needed. | | `GET /api/v1/auth/me` | The signed-in account. | | `GET /api/v1/auth/billing/plans` | The plan catalog. | | `GET /api/v1/auth/billing/subscription` | Your current plan and subscription. | | `GET /api/v1/apps/projects` | Your apps. | | `GET /api/v1/databases` | Your databases. | | `GET /api/v1/hivepods/` | Your HivePods (note the trailing slash). | | `GET /api/v1/n8n/instances` | Your n8n workspaces. | | `GET /api/v1/tunnels` | Your active tunnels. | Product pages show more calls where they’re useful, for example [creating a database](/databases/create/#with-the-api) and [managing its firewall](/databases/firewall/). ## Errors [Section titled “Errors”](#errors) Errors come back as JSON with a message, and often a `code`: | Status | Code | Meaning | | ------ | ------------------- | ---------------------------------------------------------------------------- | | 401 | | Missing, expired or revoked key. | | 402 | `plan_limit` | Your plan’s limit is reached. The message says which. | | 403 | `email_unverified` | Verify your email address first. | | 403 | `account_suspended` | The account is suspended. | | 403 | | A read-only key tried to change something, or a key tried an account action. | | 429 | | Too many requests. Slow down and retry. | ## Limits [Section titled “Limits”](#limits) Requests are rate-limited per account. If you get `429`, wait a moment and retry with backoff. # API keys > Create, scope and revoke DockHive API keys (personal access tokens) for the CLI, CI scripts, MCP clients and the API. API keys (personal access tokens) let the CLI, CI scripts, MCP clients and your own code act on your account without your password. They look like `dh_pat_ab12CD34_…`. ## Create a key [Section titled “Create a key”](#create-a-key) 1. In the console, go to **Settings → API Keys** and click **Create API Key**. 2. Enter a **Key Name** (for example *Production Deploy Key*). 3. Choose the **Access**: * **Full access**: everything you can do, except account, security and billing settings. * **Read only**: view resources only (`GET` and `HEAD` requests). 4. Choose an **Expiration**: 30 days, 90 days, 1 year or never. 5. Click **Create Key** and **copy it now**. You won’t be able to see it again. DockHive emails you whenever a key is created. You can have up to 25 active keys. ## Use a key [Section titled “Use a key”](#use-a-key) | Where | How | | ---------------------------- | ------------------------------------------------------------------------- | | API | `Authorization: Bearer dh_pat_...` | | `hivepod` CLI and MCP server | `export HIVEPODS_TOKEN=dh_pat_...` | | `dockhive` tunnel CLI | `dockhive login --token dh_pat_...` or `export DOCKHIVE_TOKEN=dh_pat_...` | ```sh curl https://api.dockhive.io/api/v1/auth/me \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` Treat keys like passwords: keep them in your CI’s secret store, never in your code. ## What keys can’t do [Section titled “What keys can’t do”](#what-keys-cant-do) For your safety, API keys can’t change your account. These always need a console sign-in: * your profile, email, password and two-factor authentication, * connecting or disconnecting GitHub, and your sessions, * billing: checkout and payment methods (keys can *read* your plan, subscription and invoices), * creating or revoking API keys. A key that tries gets `403` with *“API keys cannot be used for account, security, billing or API-key management.”* ## Revoke a key [Section titled “Revoke a key”](#revoke-a-key) In **Settings → API Keys**, click revoke on the key and confirm. Anything using it (CLI, CI scripts, MCP clients) loses access **within a minute**. The list shows each key’s status (active, expired or revoked), when it was last used and when it expires. If your account is suspended, its keys stop working. # Apps > Deploy web apps, APIs, static sites and full-stack apps on DockHive from GitHub or a local folder, with Drone or a framework preset. An **app** on DockHive is a web service: a website, an API, a static site or a full-stack app that answers HTTP requests. You deploy it from a GitHub repository or from a folder on your computer, and it gets a free HTTPS address such as `https://wonder-web-8ml2.dockhive.app`. ## Ways to deploy [Section titled “Ways to deploy”](#ways-to-deploy) | Source | How | Push to deploy | | ---------------------------------------------- | --------------------------------------------------------------------- | --------------------------- | | **GitHub** (public or private) | Console: **App Hosting** → new app → **Git Provider** | Yes | | **Public Git URL** (GitHub, GitLab, Bitbucket) | Console: **Public Repository** tab | No | | **A local folder** | `hivepod deploy`, or the `deploy` tool in the [MCP server](/cli/mcp/) | No (deploy again to update) | ## How it builds [Section titled “How it builds”](#how-it-builds) For each app you choose a **build mode**: * **Drone** (recommended): DockHive’s AI deploy agent reads your code, builds your app and deploys it, fixing problems along the way. No configuration. * **A framework preset**, such as Next.js, Django or Static site, if you prefer to set install, build and start commands yourself. See [Drone and frameworks](/apps/drone/). ## What every app gets [Section titled “What every app gets”](#what-every-app-gets) * A free address on `dockhive.app` with HTTPS. It always serves the live version. * Zero-downtime deploys: a new version goes live only after it answers requests; until then the previous version keeps serving. * Build and runtime logs, a deployment history and one-click rollbacks. * Encrypted environment variables. * Up to 5 custom domains with automatic HTTPS. ## Guides [Section titled “Guides”](#guides) * [Deploy from GitHub](/apps/deploy-from-github/) * [Deploy a folder from the CLI or MCP](/apps/deploy-a-folder/) * [Environment variables](/apps/environment-variables/) * [Push to deploy](/apps/push-to-deploy/) * [Custom domains](/apps/custom-domains/) * [Limits and troubleshooting](/apps/troubleshooting/) * Framework guides: [Next.js](/apps/guides/nextjs/), [Node.js and Express](/apps/guides/node-express/), [Flask](/apps/guides/flask/), [Django](/apps/guides/django/), [FastAPI](/apps/guides/fastapi/), [React and Vite](/apps/guides/react-vite/), [SvelteKit](/apps/guides/sveltekit/), [Static sites](/apps/guides/static-sites/) Note DockHive app hosting runs HTTP services. Background workers, command-line tools and libraries aren’t apps; run them in a [HivePod](/hivepods/) instead. # Client IP addresses > How your app gets the visitor's real IP address behind the DockHive edge. Requests reach your app through the DockHive edge, so the network peer your app sees is the platform, not the visitor. The visitor’s real address is passed in two headers: * `X-Real-IP`: the visitor’s IP address. * `X-Forwarded-For`: a comma-separated list. The **leftmost** entry is the visitor; entries after it are DockHive’s own hops and can be ignored. **Static sites** (HTML, React, Vue, Svelte, Angular and Vite builds) need no changes: the built-in web server records the visitor’s address in your [runtime logs](/apps/logs/). Redeploy an older site once to pick this up. ## Node.js / Express [Section titled “Node.js / Express”](#nodejs--express) ```js const app = express(); app.set('trust proxy', true); // read the visitor from X-Forwarded-For app.get('/', (req, res) => { res.send(`Hello ${req.ip}`); // the visitor's address }); ``` Without a framework, use `req.headers['x-real-ip']`, or the first item of `req.headers['x-forwarded-for'].split(',')`. ## Flask [Section titled “Flask”](#flask) ```python from werkzeug.middleware.proxy_fix import ProxyFix app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1) # request.remote_addr is now the visitor's address ``` ## Django [Section titled “Django”](#django) Django doesn’t rewrite `REMOTE_ADDR` on its own. Read the header directly: ```python def client_ip(request): real_ip = request.META.get("HTTP_X_REAL_IP") if real_ip: return real_ip forwarded = request.META.get("HTTP_X_FORWARDED_FOR", "") return forwarded.split(",")[0].strip() or request.META.get("REMOTE_ADDR") ``` Also set `SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")` so Django knows requests arrived over HTTPS. ## FastAPI / Uvicorn [Section titled “FastAPI / Uvicorn”](#fastapi--uvicorn) Read `request.headers.get("x-real-ip")`, or start Uvicorn with `--proxy-headers --forwarded-allow-ips="*"` so `request.client.host` is the visitor. Caution Only trust these headers when your app is served through DockHive. If the same app also runs somewhere without a proxy in front, visitors there could set them to anything. # Custom domains > Serve your DockHive app on your own domain. Add a CNAME (or ALIAS for root domains) and a TXT record; HTTPS is automatic. Serve your app on your own domain, such as `www.example.com` or `example.com`. HTTPS certificates are issued and renewed automatically. ## Add a domain [Section titled “Add a domain”](#add-a-domain) 1. Open your app and go to the **Domains & TLS** tab. Under **Add Custom Domain**, enter the domain and click **Add Domain**. (You can also enter a domain when creating the app; it’s added after the first successful deploy.) 2. The console shows two DNS records to create at your DNS provider. Each has a **Copy** button. | Type | Name (host) | Value | | ------- | ---------------------------- | --------------------------------------------------------------------------- | | `CNAME` | `www` | the target shown in the console, like `wonder-web-8ml2.apps.dockhive.cloud` | | `TXT` | `_dockhive-verification.www` | the token shown in the console, like `dockhive-verify-…` | The CNAME sends traffic to your app. The TXT record proves the domain is yours. 3. Wait for the records to appear (usually minutes, sometimes up to 48 hours), then click **Verify DNS & Complete Setup**. 4. Once verified, DockHive issues the HTTPS certificate, usually in under a minute. The domain shows **Active**. Use DNS-only records The records must point straight at DockHive. If your DNS provider offers a proxy, CDN or “orange cloud” mode for records, turn it off (DNS only) for these records. A proxied record never reaches DockHive and can’t get a certificate. ## Root domains (example.com) [Section titled “Root domains (example.com)”](#root-domains-examplecom) Most DNS providers can’t add a normal CNAME at the root of a domain. Add the same target as an **ALIAS**, **ANAME** or **flattened CNAME** record instead; most providers support one of these. If yours supports none of them, point `www` at the target and forward the root domain to `www` with your provider’s redirect feature. ## Statuses [Section titled “Statuses”](#statuses) | Status | Meaning | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | Waiting for DNS | Add the records, then click Verify. | | Issuing certificate | DNS is verified; the certificate is on its way. | | Active | Your domain serves the app over HTTPS. The certificate renews automatically. | | Failed | The certificate couldn’t be issued. The reason is shown, and DockHive retries automatically. Fix DNS and click **Check DNS & Retry Certificate**. | ## If verification fails [Section titled “If verification fails”](#if-verification-fails) The console tells you what it found: * *TXT record … not found or does not match*: check the TXT name and value. Some providers add your domain to the name automatically, so enter only `_dockhive-verification.www`. * *no CNAME or A record found … yet*: new records can take a few minutes to appear. * *… is a CNAME to X, not to …*: update the CNAME to the target shown in the console. * The domain *resolves to a proxy, not to DockHive*: switch the record to DNS only. * The domain *also has AAAA (IPv6) records*: remove them. ## Rules and limits [Section titled “Rules and limits”](#rules-and-limits) * Up to **5 custom domains per app**. * A domain can belong to **only one app** across all DockHive accounts. If someone else has added it, you’ll see *domain is already claimed*. * Verify within **72 hours** of adding a domain. After that the claim lapses, and you’ll need to add it again. This stops anyone from holding a domain they don’t control. * A domain is only routed to your app after its TXT record checks out. * DockHive’s own domains can’t be added. * Up to 5 new certificates per account per day. ## Remove a domain [Section titled “Remove a domain”](#remove-a-domain) Click the trash icon next to the domain and confirm. DockHive removes the route and certificate. Your DNS records are untouched, so delete them at your provider too. Domains for HivePods work the same way; see [Custom domains for HivePods](/hivepods/custom-domains/). # Deploy a folder (CLI and MCP) > Deploy a local folder to DockHive with hivepod deploy or from an AI coding tool through the DockHive MCP server. You don’t need a Git repository to deploy. The [`hivepod` CLI](/cli/) packs up a folder and sends it to Drone. ```sh cd my-app hivepod deploy ``` ```text ✓ Uploaded 42 files (1.2 MB) — deploying my-app drone Reading your code ... ✓ Live https://brave-space-k3x9.dockhive.app ``` Run `hivepod deploy` again from the same folder to update the same app. See [`hivepod deploy`](/cli/deploy/) for every option, including `--env`, `--root` and `--new`. ## From an AI coding tool [Section titled “From an AI coding tool”](#from-an-ai-coding-tool) The DockHive MCP server (`hivepod mcp`) gives tools such as Claude Code and Cursor a `deploy` tool. Ask your assistant to “deploy this folder to DockHive”. See [MCP server](/cli/mcp/). ## What gets uploaded [Section titled “What gets uploaded”](#what-gets-uploaded) The CLI leaves out: * version control folders (`.git`), dependency folders (`node_modules`, `.venv`, `venv`), and caches such as `__pycache__` and `.next/cache`, * `dist/` and `build/` folders larger than 20 MB, * anything matched by `.gitignore` or a `.dockhiveignore` file in the folder’s root, * **secrets, always**: `.env` files (except `.env.example`, `.env.sample` and `.env.template`), private keys and certificates such as `*.pem`, `*.key`, `id_rsa*` and `*.p12`. Set your secrets as [environment variables](/apps/environment-variables/) instead (`hivepod deploy --env KEY=value`). ## Limits [Section titled “Limits”](#limits) * **50 MB** compressed per upload, and **500 MB** unpacked. * At most 20,000 files and folders. * Links (symlinks) aren’t allowed in the upload. If the upload is too large, list folders you don’t need in a `.dockhiveignore` file (same syntax as `.gitignore`). ## Uploaded apps vs GitHub apps [Section titled “Uploaded apps vs GitHub apps”](#uploaded-apps-vs-github-apps) * An app deployed from a folder can’t be rebuilt with the console’s **Redeploy** button; deploy the folder again. * [Push to deploy](/apps/push-to-deploy/) needs a GitHub repository. * Deploying a folder to an app that came from GitHub switches it to uploaded code and turns push to deploy off. # Deploy a container image > Deploy a prebuilt container image from any public registry to DockHive, pinned to an exact digest, with optional registry login for private images. Already build your app in CI? Deploy the finished image instead of building from source. DockHive pulls it, checks that it starts and answers its health check, then switches traffic to it, just like a build from GitHub. Versions, [rollbacks](/apps/rollbacks/), logs, environment variables and [custom domains](/apps/custom-domains/) all work the same way. ## Deploy an image [Section titled “Deploy an image”](#deploy-an-image) 1. In **App Hosting**, click **Deploy an image**. 2. Fill in: * **App name** and **Region**. * **Image**: the image **pinned to a digest**, for example `ghcr.io/team/app@sha256:…`. A tag such as `:latest` on its own isn’t accepted, so you always know exactly what’s running. * **Port**: the port your app listens on. Leave it empty to use the port the image declares (`EXPOSE`). * **Health check path**, **App type** (web or background worker) and **App size**, if you need them. * **Environment variables**, one `NAME=value` per line. * **Registry login (private images only)**: a username and a password or access token. 3. Click **Deploy image**. To find an image’s digest, run: ```sh docker buildx imagetools inspect ghcr.io/team/app:v1.4.0 ``` or copy it from your CI’s build output. ## Images that work [Section titled “Images that work”](#images-that-work) * Built for `linux/amd64`. * From a registry reachable on the internet, such as GitHub Container Registry, Docker Hub, GitLab, Google Artifact Registry or Amazon ECR. * Up to 8 GB unpacked. Your image gets the same protections and limits as every DockHive app. ## Deploy a new version [Section titled “Deploy a new version”](#deploy-a-new-version) Open the app. The **Image** card shows the digest that’s running. Paste a new digest under **Deploy a new digest** and deploy it. The previous version stays available for rollback. ## Private registries [Section titled “Private registries”](#private-registries) Save a registry login on the app’s **Image** card, or when you deploy. It’s stored encrypted, is never shown again, and is only sent to the registry it was saved for. Click **Remove** to delete it. Use a read-only access token where your registry supports one. ## With the API [Section titled “With the API”](#with-the-api) ```sh curl -X POST "https://api.dockhive.io/api/v1/apps/deploy" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "X-Region: eu" \ -H "Content-Type: application/json" \ -d '{ "name": "my-api", "image": "ghcr.io/team/app@sha256:…", "app_port": 8080, "registry_username": "ci-bot", "registry_password": "'"$REGISTRY_TOKEN"'" }' ``` To deploy a new digest to an existing app, send the same request to `/api/v1/apps/projects/PROJECT_ID/deploy` with the new `image`. | Error | Meaning | | ------------------ | ---------------------------------------- | | `image_not_pinned` | Add the `@sha256:…` digest to the image. | | `invalid_image` | The image reference isn’t valid. | # Deploy from GitHub > Connect GitHub, choose a repository, branch and root directory, and deploy your app on DockHive. The console’s new-app wizard has four steps: **Select Repository**, **Choose Framework**, **Domain & Region** and **Configure & Deploy**. ## 1. Connect GitHub and select a repository [Section titled “1. Connect GitHub and select a repository”](#1-connect-github-and-select-a-repository) Open **App Hosting** in the console and start a new app. Under **Git Provider**, click **Connect GitHub**. DockHive asks GitHub for access to: * your profile and email address, * your repositories, including private ones (`repo`), so it can read your code and post deployment status on your commits, * repository webhooks (`admin:repo_hook`), so [push to deploy](/apps/push-to-deploy/) can set itself up. If you signed in to DockHive with GitHub, you may see **Repository access not granted**. Click **Grant repository access** to use private repositories and push to deploy. Then search for your repository and pick it. Private repositories have a **Private** badge. Public repositories No GitHub connection needed: switch to the **Public Repository** tab, paste the repository’s `https://` URL (GitHub, GitLab or Bitbucket) and enter the branch name. To use a different GitHub account, click **Disconnect**, revoke DockHive’s access on GitHub, then connect again. **Manage Access** opens your GitHub settings. ## 2. Choose a build mode [Section titled “2. Choose a build mode”](#2-choose-a-build-mode) Click **Deploy with Drone** to let Drone handle everything, or pick a framework preset. The wizard detects your framework and tells you what it found. See [Drone and frameworks](/apps/drone/). ## 3. Domain and region [Section titled “3. Domain and region”](#3-domain-and-region) * **Custom Domain** (optional): you can add one now or later. Your app always gets a free address. See [Custom domains](/apps/custom-domains/). * **Deployment Region**: choose a region close to your users. See [Regions](/getting-started/regions/). ## 4. Configure and deploy [Section titled “4. Configure and deploy”](#4-configure-and-deploy) * **Project Name**: becomes the app’s id: lowercase letters, digits and `-`, up to 40 characters. It must be unique in your account. * **Branch**: defaults to the repository’s default branch. * **Advanced Settings**: * **Root Directory**: the folder that contains your app, relative to the repository root (for example `apps/web` in a monorepo). Leave it as `./` for the repository root. * For framework presets only: install, build and start commands, and the port your app listens on (leave empty to auto-detect). * **Environment Variables**: one `KEY=value` per line. See [Environment variables](/apps/environment-variables/). Click **Deploy**. The console streams the build log while it works. When the status reads **Live**, open your app’s address. Check before you deploy With Drone selected, **Check my code** lets Drone look at your code first and tell you which settings (such as environment variables) your app needs. This is optional. ## Private repositories you can’t reach with your GitHub account [Section titled “Private repositories you can’t reach with your GitHub account”](#private-repositories-you-cant-reach-with-your-github-account) If the repository belongs to an account your GitHub connection can’t read, add a **Repository Access Token** in the app’s **Builds & Settings**. It is stored encrypted and never shown again. # Drone and frameworks > Deploy with Drone, DockHive's AI deploy agent, or choose a framework preset. Supported frameworks, daily limits and what to do when Drone can't deploy your code. When you create an app, you choose how it’s built: with **Drone** or with a **framework preset**. ## Drone [Section titled “Drone”](#drone) > Drone reads your code, builds your app and deploys it, fixing problems along the way. No configuration. Pick **Deploy with Drone** in the console, or use `hivepod deploy` (Drone is the default there). While it works, you’ll see its progress: * **Reading your code** * **Building** * **Fixing a problem (attempt n)**, if something needs fixing * **Live** On later deploys Drone reuses the setup from your last successful deploy, so redeploys are quick. ### Daily limit [Section titled “Daily limit”](#daily-limit) Each Drone deploy that needs the AI counts as one **run**, however many fixes it makes. **Check my code** previews also count as one run. Redeploys that reuse a saved setup, and code Drone refuses before building, don’t count. There is a daily limit per account (lower for brand-new accounts); if you reach it, the console says so. Try again later, or pick a framework preset instead. ### If your app needs environment variables [Section titled “If your app needs environment variables”](#if-your-app-needs-environment-variables) When Drone sees that your app can’t start without certain variables, it stops and lists them: *“Your app needs these environment variables: …”*. Add them in the app’s settings and click **Save and redeploy**. ### When Drone can’t deploy your code [Section titled “When Drone can’t deploy your code”](#when-drone-cant-deploy-your-code) Drone deploys web apps, APIs, static sites and full-stack apps. It stops **before building** (so no build minutes are used) if your code looks like something else: | Drone says it looks like… | What to do | | ------------------------- | ------------------------------------------------------------------------------------- | | a command-line tool | Run it in a [HivePod](/hivepods/), or add a web interface or API. | | a library | Use it from an app you deploy, or run it in a HivePod. | | a background worker | Run it in a HivePod for now. | | a mobile or desktop app | Deploy its backend or its web build by setting the **Root directory** to that folder. | | a notebook | Turn it into a web app or API (for example with Streamlit, Gradio or FastAPI). | | an empty repository | Push your code, or set the **Root directory** to the folder that contains it. | In a monorepo, Drone often points you at the right folder: *“The `web` folder looks like a web app or API: set the Root directory to `web` and deploy again.”* The console has a **Set root directory** button for this. If Drone tries and still can’t get your app live, you’ll see: > Drone couldn’t get this app live yet. Our team has been alerted and will look into it. The full build log shows what happened. For help, email with your app’s name. You can also try a framework preset. ## Framework presets [Section titled “Framework presets”](#framework-presets) Pick a preset if you want to control the install, build and start commands yourself. The wizard detects your framework and pre-selects it. | Preset | Notes | | ------------- | ---------------------------------------------------------------- | | Next.js | Served by `next start` (or the standalone server). | | Nuxt | Nuxt 3. | | SvelteKit | With `adapter-node`; `adapter-static` is served as static files. | | React | Single-page app (Vite or Create React App). | | Vue | Single-page app. | | Svelte | Svelte (Vite) single-page app. | | Angular | | | Vite | Any Vite static build. | | Express | Also Fastify, Koa and Hapi. | | NestJS | | | Node.js | Any Node.js server started by `npm start` or its main file. | | Django | | | Flask | | | FastAPI | | | Python | Any Python web process. | | Go | A Go module. | | Laravel | Set `APP_KEY` in your environment variables. | | PHP | Plain PHP. | | Ruby on Rails | Set `SECRET_KEY_BASE` in your environment variables. | | Static site | Plain HTML, CSS and JavaScript. | | Dockerfile | Uses your repository’s own Dockerfile. | Runtime versions: Node.js 20, 22 (default) or 24, picked from `engines.node` in `package.json`; Python 3.9 to 3.13 (default 3.12), picked from `.python-version` or `runtime.txt`; Go 1.24; PHP 8.3; Ruby 3.3. ### Preset settings [Section titled “Preset settings”](#preset-settings) Under **Advanced Settings** (and later in **Builds & Settings**) you can set: * **Install, build and start commands.** * **Port**: the port your app listens on. Leave it empty to auto-detect. Your app should listen on `0.0.0.0` and the port in the `PORT` environment variable, which DockHive sets for you. * **Health Check Path**: a new version goes live only after this path answers. You can switch an existing app between Drone and a preset in **Builds & Settings**, then redeploy. # Environment variables > Set environment variables and secrets for your DockHive app. Values are encrypted at rest, hidden in the console and logs, and available at build time and at runtime. Use environment variables for configuration and secrets: database URLs, API keys, feature flags. ## Set variables [Section titled “Set variables”](#set-variables) * **When creating an app:** in **Advanced Settings → Environment Variables**, one `KEY=value` per line. Lines starting with `#` are ignored, and `export `prefixes and surrounding quotes are handled. * **Later:** open the app, go to **Builds & Settings → Environment Variables**, click **Add Variable**, then **Save Environment**. * **From the CLI:** `hivepod deploy --env DATABASE_URL=postgresql://...` (repeat `--env` for each). * **From the MCP server:** the `set_env` tool. Example ```text DATABASE_URL=postgresql://usr_1a2b3c4d:secret@dark-rocket-k3x9.db.dockhive.xyz:10042/app?sslmode=require SESSION_SECRET=change-me NODE_ENV=production ``` ## Rules [Section titled “Rules”](#rules) * Names start with a letter or `_` and contain only letters, digits and `_` (up to 128 characters). * Values are a single line. * Up to 200 variables and 64 KB in total per app. * `PORT` is set for you. ## Secrets stay secret [Section titled “Secrets stay secret”](#secrets-stay-secret) Every value is **encrypted at rest** and hidden in the console: existing values appear as `•••••••• (unchanged)`. Only the app’s owner can read them back, through an explicit reveal request to the API. Values that appear in build or health-check output are replaced with `***`. ## Available at build time and at runtime [Section titled “Available at build time and at runtime”](#available-at-build-time-and-at-runtime) Your variables are available **while your app is built** and **when it runs**. That means values that frameworks inline into the client bundle during the build work as you’d expect: | Framework | Build-time (public) prefix | | -------------------------------- | --------------------------------------------- | | Next.js | `NEXT_PUBLIC_*` | | Vite (React, Vue, Svelte, Solid) | `VITE_*` | | SvelteKit, Astro | `PUBLIC_*` (and `$env/static/*` in SvelteKit) | | Nuxt | `NUXT_PUBLIC_*` | | Create React App | `REACT_APP_*` | | Angular (`@ngx-env`) | `NG_APP_*` | | Gatsby | `GATSBY_*` | Server-side code (API routes, server components, Django or Rails settings read during `collectstatic` or `assets:precompile`) can read every variable during the build, too. Anything in a client bundle is public Values a framework inlines into the browser bundle can be read by anyone who visits your site. Only use the public prefixes for values that are meant to be public (an API base URL, a publishable key). Keep secrets in variables without a public prefix and read them on the server. Secrets you set are passed to the build without being stored in your app’s image or its build history, and they’re masked as `***` in the build log. ### Your own Dockerfile [Section titled “Your own Dockerfile”](#your-own-dockerfile) If you deploy with your own `Dockerfile`, you have two options: * **`ARG` for public values.** Every variable your Dockerfile declares with `ARG` is passed to the build with your app’s value: ```dockerfile ARG NEXT_PUBLIC_API_URL RUN npm run build ``` Docker records `ARG` values in the image history, so use `ARG` only for values that are public anyway. * **The build secret, for everything else.** All of your variables are available as a build secret named `dockhive_env`, a file of `NAME='value'` lines. Mount it on the step that needs it: ```dockerfile RUN --mount=type=secret,id=dockhive_env,mode=0444 \ sh -c 'set -a; . /run/secrets/dockhive_env; set +a; npm run build' ``` The file exists only while that step runs and never ends up in your image. ## When changes take effect [Section titled “When changes take effect”](#when-changes-take-effect) Saving variables doesn’t restart your app. They apply on the **next deploy**, which rebuilds your app with the new values: click **Redeploy** (or push a commit with [push to deploy](/apps/push-to-deploy/) on). The console shows when a redeploy is needed. A [rollback](/apps/rollbacks/) starts an earlier build with your **current** variables. Runtime values update, but values that were inlined into the bundle at build time (for example `NEXT_PUBLIC_*` or `VITE_*`) stay as they were when that build was made. Redeploy to rebuild with the new values. # Deploy a Django app > Deploy a Django project on DockHive with Drone or the Django preset, including ALLOWED_HOSTS and static files. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Or run `hivepod deploy` in the project folder. ## With the Django preset [Section titled “With the Django preset”](#with-the-django-preset) Pick **Django**. DockHive installs `requirements.txt` and serves your project’s WSGI app with gunicorn. Include `gunicorn` in `requirements.txt`. ## Settings to check [Section titled “Settings to check”](#settings-to-check) **`ALLOWED_HOSTS`** must include your app’s address and any custom domains, or Django refuses requests: settings.py ```python import os ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "").split(",") CSRF_TRUSTED_ORIGINS = [f"https://{h}" for h in ALLOWED_HOSTS if h] DEBUG = os.environ.get("DEBUG") == "1" SECRET_KEY = os.environ["SECRET_KEY"] ``` Then set these [environment variables](/apps/environment-variables/): ```text ALLOWED_HOSTS=wonder-web-8ml2.dockhive.app,www.example.com SECRET_KEY=a-long-random-string DATABASE_URL=postgresql://... ``` **Static files:** serve them with [WhiteNoise](https://whitenoise.readthedocs.io/) and run `collectstatic` in your build command. **Migrations:** run `python manage.py migrate` as part of your start command, for example: ```sh python manage.py migrate && gunicorn myproject.wsgi --bind 0.0.0.0:$PORT ``` If the build says it can’t find `wsgi.py`, set the **Start Command** yourself as above. # Deploy a FastAPI app > Deploy a FastAPI app on DockHive with Drone or the FastAPI preset. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Or run `hivepod deploy` in the project folder. ## With the FastAPI preset [Section titled “With the FastAPI preset”](#with-the-fastapi-preset) Pick **FastAPI**. DockHive installs `requirements.txt` and serves your app with uvicorn. main.py ```python from fastapi import FastAPI app = FastAPI() @app.get("/") def index(): return {"hello": "DockHive"} ``` requirements.txt ```text fastapi uvicorn[standard] ``` If your app lives somewhere else, set the **Start Command**, for example: ```sh uvicorn myservice.api:app --host 0.0.0.0 --port $PORT ``` Your interactive API docs are then at `https://.dockhive.app/docs`. For other Python web frameworks, use the **Python** preset with a start command that listens on `0.0.0.0:$PORT`. # Deploy a Flask app > Deploy a Python Flask app on DockHive with Drone or the Flask preset. This guide replaces the old “How to deploy a Flask app on DockHive” page. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Or run `hivepod deploy` in the project folder. ## With the Flask preset [Section titled “With the Flask preset”](#with-the-flask-preset) Pick **Flask**. DockHive installs `requirements.txt` and serves your app with gunicorn. app.py ```python from flask import Flask app = Flask(__name__) @app.get("/") def index(): return "Hello from DockHive" ``` requirements.txt ```text flask gunicorn ``` If your app object isn’t `app` in `app.py`, set the **Start Command** in **Advanced Settings**, for example: ```sh gunicorn --bind 0.0.0.0:$PORT "myproject:create_app()" ``` ## Tips [Section titled “Tips”](#tips) * Don’t use Flask’s development server (`app.run()`) in production. * To pick a Python version (3.9 to 3.13; the default is 3.12), add a `.python-version` file containing, for example, `3.11`. * Put your database URL and secret key in [environment variables](/apps/environment-variables/). # Deploy a Next.js app > Deploy a Next.js app on DockHive with Drone or the Next.js preset. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) 1. Push your Next.js app to GitHub. 2. In the console, start a new app, pick the repository and click **Deploy with Drone**. 3. Add your environment variables and click **Deploy**. Or, from the project folder: `hivepod deploy`. ## With the Next.js preset [Section titled “With the Next.js preset”](#with-the-nextjs-preset) Pick **Next.js** under **Choose Framework**. DockHive installs your dependencies, runs `next build` and serves the app with `next start` (or the standalone server if you set `output: 'standalone'` in `next.config.js`). Make sure `package.json` has the usual scripts: package.json ```json { "scripts": { "dev": "next dev", "build": "next build", "start": "next start" } } ``` `next start` listens on the `PORT` variable DockHive sets, so no extra setup is needed. ## Tips [Section titled “Tips”](#tips) * **Environment variables:** your app’s variables are available both during `next build` and at runtime. `NEXT_PUBLIC_*` values are inlined into the browser bundle at build time, so they’re public and change only when you redeploy. See [Environment variables](/apps/environment-variables/). * **Monorepos:** set **Root Directory** to the Next.js app’s folder, for example `apps/web`. # Deploy a Node.js or Express app > Deploy an Express, Fastify, Koa, Hapi, NestJS or plain Node.js server on DockHive. This guide replaces the old “How to deploy a Node.js app on DockHive” page. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Or run `hivepod deploy` in the project folder. ## With a preset [Section titled “With a preset”](#with-a-preset) Pick **Express** (also for Fastify, Koa and Hapi), **NestJS**, or **Node.js** for any server started by `npm start` or its main file. Your server must listen on `0.0.0.0` and on the port in the `PORT` environment variable: server.js ```js import express from 'express'; const app = express(); app.get('/', (req, res) => res.send('Hello from DockHive')); const port = process.env.PORT || 3000; app.listen(port, '0.0.0.0', () => console.log(`Listening on ${port}`)); ``` package.json ```json { "type": "module", "scripts": { "start": "node server.js" } } ``` ## Tips [Section titled “Tips”](#tips) * Commit your lockfile (`package-lock.json`, `pnpm-lock.yaml` or `yarn.lock`) so installs are repeatable. * To pick a Node.js version (20, 22 or 24; the default is 22), set `engines.node` in `package.json`, for example `"engines": { "node": "20" }`. * Keep secrets in [environment variables](/apps/environment-variables/), not in `.env` files in the repository. # Deploy a React or Vite app > Deploy a React, Vue, Svelte or any Vite single-page app on DockHive. This guide replaces the old “How to deploy React JS app on DockHive” page. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Or run `hivepod deploy` in the project folder. ## With a preset [Section titled “With a preset”](#with-a-preset) Pick **React** (Vite or Create React App), **Vue**, **Svelte**, **Angular** or **Vite**. DockHive runs your build script and serves the built files. package.json ```json { "scripts": { "dev": "vite", "build": "vite build" } } ``` ## Tips [Section titled “Tips”](#tips) * **Client-side routing:** single-page apps get their `index.html` for unknown paths, so React Router and similar work on refresh. * **Don’t deploy the dev server.** `vite` and `vite preview` aren’t meant for production and refuse unknown hostnames. * **Build-time variables:** `VITE_*` variables from your app’s settings are available during the build and baked into the bundle, so they’re visible to anyone and change only when you redeploy. Never put secrets in them. See [Environment variables](/apps/environment-variables/). * **Backends:** deploy your API as a separate app and call it by its address. # Deploy a static site > Deploy plain HTML, CSS and JavaScript on DockHive. A static site is a folder of HTML, CSS, JavaScript and images, with no server code. ## Fastest: from a folder [Section titled “Fastest: from a folder”](#fastest-from-a-folder) ```sh cd my-site hivepod deploy ``` ## From GitHub [Section titled “From GitHub”](#from-github) Start a new app, pick the repository and click **Deploy with Drone**, or pick the **Static site** preset. Make sure `index.html` is in the root, or set **Root Directory** to the folder that contains it (for example `public`). ## Tips [Section titled “Tips”](#tips) * Generated sites (Hugo, Jekyll, Astro, Eleventy and others): Drone builds them for you. With a preset, use the **Vite** or **Static site** preset with a build command that produces the site. * Add [your own domain](/apps/custom-domains/); HTTPS is automatic. # Deploy a SvelteKit app > Deploy a SvelteKit app on DockHive with Drone or the SvelteKit preset. ## With Drone (recommended) [Section titled “With Drone (recommended)”](#with-drone-recommended) Push your code to GitHub, start a new app, pick the repository and click **Deploy with Drone**. Drone handles SvelteKit apps that use `adapter-auto`. Or run `hivepod deploy` in the project folder. ## With the SvelteKit preset [Section titled “With the SvelteKit preset”](#with-the-sveltekit-preset) Pick **SvelteKit**. Use [`@sveltejs/adapter-node`](https://svelte.dev/docs/kit/adapter-node) for a server-rendered app: svelte.config.js ```js import adapter from '@sveltejs/adapter-node'; export default { kit: { adapter: adapter() }, }; ``` ```sh npm install -D @sveltejs/adapter-node ``` Apps that use `adapter-static` are served as static files. ## Tips [Section titled “Tips”](#tips) * Set `ORIGIN` to your public address (for example `https://wonder-web-8ml2.dockhive.app`) so form actions pass SvelteKit’s CSRF check. * Private variables (`$env/dynamic/private`) come from your app’s settings at runtime. # Build and runtime logs > Follow build and deploy logs live, export them, and read your app's runtime logs on DockHive. ## Build and deploy logs [Section titled “Build and deploy logs”](#build-and-deploy-logs) Open your app, go to the **Deployments** tab and pick a deployment. The **Deployment Logs** panel shows: * a **Live** badge while the deployment runs (it refreshes every couple of seconds), and **Archived** once it’s done, * for Drone deploys, Drone’s steps; switch on **Show full build log** for everything, * an **Export** button that downloads the log as a `.txt` file. A deployment moves through these statuses: *Queued*, *Fetching code*, *Building*, *Starting*, *Checking health*, *Going live*, then *Live* (or *Failed*). Older versions that were replaced show *Replaced*. The end of each deployment’s log is kept with the deployment for as long as the app exists. From the CLI, `hivepod deploy -v` prints the full build log. MCP clients can use the `build_logs` and `deployment_status` tools. ## Runtime logs [Section titled “Runtime logs”](#runtime-logs) The **Logs** tab shows what your running app prints (the last 500 lines). Choose a window (*Any time*, *Last 15 minutes*, *Last hour*, *Last 24 hours*), filter by level, or switch on **Refresh every 5 seconds**. If the app isn’t running, you’ll see “Your app is not running, so there are no logs to show.” MCP clients can read runtime logs with the `app_logs` tool. # Redeploy and delete apps > Redeploy the latest commit, change build settings, choose an app size, or permanently delete a DockHive app. ## Redeploy [Section titled “Redeploy”](#redeploy) Click **Redeploy** in the app’s header to rebuild and deploy the latest commit of the app’s branch. Your environment variables and settings are kept. Only one deployment runs at a time per app. For apps deployed from a folder, run `hivepod deploy` again from that folder. ## Change build settings [Section titled “Change build settings”](#change-build-settings) **Builds & Settings** holds the repository and branch, root directory, build mode (Drone or a framework preset), commands, port, health check path, environment variables and push to deploy. Changes apply on the next deploy: “Build settings saved. Redeploy to apply them.” Note Changing the repository turns push to deploy off and removes its webhook. ## Choose an app size [Section titled “Choose an app size”](#choose-an-app-size) Every app gets **512 MB of memory and 0.5 vCPU**, included in your plan. Apps that need more can run at a larger size: | Size | Memory | vCPU | Price while running | | ------ | ------ | ---- | ------------------- | | 512 MB | 512 MB | 0.5 | Included | | 1 GB | 1 GB | 1 | $2 per month | | 2 GB | 2 GB | 2 | $4 per month | | 4 GB | 4 GB | 2 | $4 per month | Larger sizes are billed at **$2 per vCPU-month**, by the hour, only while the app is running (memory is included). See [Usage and overage](/billing/usage/). | Plan | Sizes | | ----------------------------- | ---------- | | Free Tier | 512 MB | | Developer Plan, pay as you go | Up to 2 GB | | Pro and Scale | Up to 4 GB | Pick the size in **Builds & Settings → App size**, or when you [deploy an image](/apps/deploy-an-image/). The new size applies on the next deploy: “Saved. Redeploy the app to run it at the new size.” Some regions offer fewer sizes; the picker shows what you can choose. ## Delete an app [Section titled “Delete an app”](#delete-an-app) 1. Click **Delete** in the app’s header. 2. Type the project name to confirm. Deleting an app permanently removes its deployments, environment variables, logs, settings, custom domains and certificates, and the push-to-deploy webhook. Its address stops working. You can’t delete an app while a deployment is in progress. From the MCP server, `delete_app` needs `confirm: true`. ## Not available yet [Section titled “Not available yet”](#not-available-yet) Pausing apps and preview deployments are coming soon. # Push to deploy > Turn on GitHub auto-deploy so every push to a branch deploys that exact commit, with deployment status on GitHub and an optional approval step. With **push to deploy**, every push to your chosen branch deploys that exact commit. GitHub shows the deployment status on the commit. DockHive sets up the webhook for you. ## Turn it on [Section titled “Turn it on”](#turn-it-on) 1. Open your app and go to **Builds & Settings → GitHub Auto-Deploy**. 2. Pick the **Branch** (it defaults to the app’s branch) and click **Save branch**. 3. Switch on **Auto-deploy on push**. You’ll see “Pushes to `` now deploy automatically.” ### Requirements [Section titled “Requirements”](#requirements) * The repository is on github.com. * Your GitHub connection has repository and webhook access, and you’re an admin of the repository. If not, the console shows a **Reconnect GitHub** link; reconnect and grant access. * Apps deployed [from a folder](/apps/deploy-a-folder/) can’t use push to deploy. ## What deploys [Section titled “What deploys”](#what-deploys) * Only pushes to the selected branch. Tags, other branches and branch deletions are ignored. * If a deploy is already running, the next push waits and deploys when it finishes. If several pushes arrive meanwhile, the latest one wins. The settings card shows the webhook status and the **Last delivery**, for example `deploying abc1234 as v7` or `ignored: push to feature-x, auto-deploy branch is main`. ## Require approval [Section titled “Require approval”](#require-approval) In a team workspace you can make pushes wait for a person to approve them. In **Builds & Settings**, turn on approval and set **Requests expire after (hours)** (1 to 720, 72 by default). “Pushes now wait for an owner or admin to approve them.” When a push arrives: 1. A deployment is created for that exact commit and waits. Nothing is built yet, and GitHub shows the commit as *pending*. 2. The app page shows a banner: “A workspace owner or admin must approve it.” 3. An **owner** or **admin** clicks **Approve** or **Reject**, with an optional note. Approved deployments build and go live as usual. A newer push replaces a waiting one. A request that isn’t decided in time expires, and you can push again. While approval is on, developers can’t deploy any other way: new images wait for approval too, and redeploys, rollbacks and changes to settings, environment variables or registry logins are refused. Owners and admins deploy directly. Each deployment records who asked, who decided, when, and the note. ## Status on GitHub [Section titled “Status on GitHub”](#status-on-github) Each commit gets a **DockHive** status that links to the deployment in the console: * pending: *Deploying v7* * success: *v7 is live* * failure: *v7 failed while building* (or another stage) ## Turn it off [Section titled “Turn it off”](#turn-it-off) Switch off **Auto-deploy on push**. DockHive removes the webhook from GitHub. Changing the app’s repository or deleting the app also turns it off. # Versions and rollbacks > Every DockHive deploy creates a version. Roll back to an earlier version instantly, without rebuilding. Every deploy creates a new **version** (v1, v2, v3…). The **Deployments** tab lists your recent deployments with how each was triggered: *Triggered by push*, *Manual deploy* or *Rollback*. ## Roll back [Section titled “Roll back”](#roll-back) 1. Open your app and go to the **Rollbacks** tab. **Deployment History** lists each version with its branch and commit. 2. Click **Rollback** on the version you want. 3. Confirm. The version goes live as a **new deployment** (for example v8, marked *Rollback of v5*). A rollback reuses the version’s existing build, so it’s quick and uses no build minutes. It runs with your **current** settings and environment variables. ## What you can roll back to [Section titled “What you can roll back to”](#what-you-can-roll-back-to) * Only versions that deployed successfully. * Not the version that’s already live. * DockHive keeps three versions ready: your live version plus the two most recent successful versions before it. Older versions can’t be restored; redeploy their commit instead. From the MCP server, use the `rollback` tool. # Limits and troubleshooting > Build and runtime limits for DockHive apps, what the "Nothing is live here" and "App unreachable" pages mean, and fixes for common deploy errors. ## Limits [Section titled “Limits”](#limits) | Limit | Value | | ---------------------- | ----------------------------------------------------------------------------------------------------- | | Build time | 20 minutes per build | | Build with no output | Stopped after 10 minutes of silence (“build stalled”) | | Deploys | 30 per hour per account; one at a time per app | | Memory and CPU per app | 512 MB and 0.5 vCPU by default; larger [app sizes](/apps/manage/#choose-an-app-size) on paid plans | | Container images | 8 GB unpacked, `linux/amd64`, pinned to a digest ([Deploy a container image](/apps/deploy-an-image/)) | | Custom domains | 5 per app | | Folder uploads | 50 MB compressed, 500 MB unpacked | | Environment variables | 200 per app, 64 KB total | Your plan also sets how many apps you can have and how many build minutes are included each month. See [Plans](/billing/). Apps don’t sleep: they keep running until you delete them. ## “Nothing is live here” [Section titled ““Nothing is live here””](#nothing-is-live-here) > **404 · Not found** — Nothing is live here. *\* isn’t connected to anything on DockHive. You see this page when an address isn’t connected to anything on DockHive. Common reasons: * the app (or tunnel, or workspace) was deleted or renamed, * the address was never deployed, or there’s a typo, * a [custom domain](/apps/custom-domains/) points at DockHive but isn’t verified yet, or was added to a different app. If it’s your app, open the console and check the app’s address and its **Domains & TLS** tab. ## “This app is unreachable right now” [Section titled ““This app is unreachable right now””](#this-app-is-unreachable-right-now) > **Unreachable** — *\* is on DockHive, but it isn’t responding. The address belongs to an app, but the app didn’t answer. It may be offline, restarting, or crashing on start. For a tunnel, the computer behind it may be asleep or disconnected. This is usually temporary. If it’s your app: 1. Check the **Logs** tab for errors when the app starts. 2. Check the latest deployment’s status and log. 3. Redeploy, or [roll back](/apps/rollbacks/) to the last version that worked. For a HivePod’s address, the page says what the pod is doing instead: *This pod is running, but nothing is answering on port N* means the pod is up and you need to start your app so it listens on that port on all interfaces (`0.0.0.0`, not `localhost`). *This pod is stopped* and *This pod is starting* mean what they say. Error pages your own app returns (such as its own 404) are shown as-is. ## Common deploy errors [Section titled “Common deploy errors”](#common-deploy-errors) ### Health check failed: no HTTP response [Section titled “Health check failed: no HTTP response”](#health-check-failed-no-http-response) The app started but didn’t answer in time. * Make it listen on `0.0.0.0` (not `127.0.0.1` or `localhost`) and on the port in the `PORT` environment variable. * With a framework preset, set the **Port** in **Builds & Settings** if your app uses a fixed port. * Read the app output shown under the error for the real cause (a missing variable, a crash on start). ### The app refuses its public address [Section titled “The app refuses its public address”](#the-app-refuses-its-public-address) Some frameworks only answer to hostnames you allow: * **Django:** add your `.dockhive.app` address and custom domains to `ALLOWED_HOSTS`. * **Rails:** add them to `config.hosts`. * **Vite dev or preview server:** serve the production build instead. * *Invalid Host header*: configure your server to accept your public hostname. ### Access to the repository was denied [Section titled “Access to the repository was denied”](#access-to-the-repository-was-denied) The repository is private and DockHive can’t read it. In the new-app wizard, use **Grant repository access** (or reconnect GitHub), or add a **Repository Access Token** in **Builds & Settings**. ### Your app needs environment variables [Section titled “Your app needs environment variables”](#your-app-needs-environment-variables) Add the listed variables and redeploy. See [Environment variables](/apps/environment-variables/). ### Root directory does not exist [Section titled “Root directory does not exist”](#root-directory-does-not-exist) Set **Root Directory** to the folder that contains your app, relative to the repository root. ### Build minutes used up [Section titled “Build minutes used up”](#build-minutes-used-up) On the Free Tier, builds stop when the month’s included build minutes are used. Running apps aren’t affected. Upgrade, or wait for the next billing period. ### Interrupted by a restart [Section titled “Interrupted by a restart”](#interrupted-by-a-restart) Rarely, a deploy is interrupted by platform maintenance. Click **Redeploy**. ## Still stuck? [Section titled “Still stuck?”](#still-stuck) Email with your app’s name and what you tried. # Plans > DockHive's Free Tier, Developer Plan ($3/month), Pro Plan ($15/month) and Scale Plan, what each includes, and how limits work across regions. Every account starts on the **Free Tier**. Before you create anything, a one-time **$1 card check** confirms your account; the $1 isn’t refunded or turned into credit, and you’re not charged anything else unless you upgrade or top up. Upgrade when you need more. | | Free Tier | Developer Plan | Pro Plan | Scale Plan | | --------------------------------------------- | ------------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- | | Price | Free | **$3 / month** | **$15 / month** | Based on specification ([contact sales](https://www.dockhive.io/contact-sales)) | | Usage beyond the allowance | Capped, never billed | Billed at [overage rates](/billing/usage/) | Billed at [overage rates](/billing/usage/) | Billed | | Team members | Just you | Up to 5 (owner included) | Up to 15 (owner included) | Custom | | Apps | 10 | 20 | 60 | Custom | | [App sizes](/apps/manage/#choose-an-app-size) | 512 MB | Up to 2 GB | Up to 4 GB | Up to 4 GB | | Build time per month | 100 hours | 500 hours | 1,500 hours | Custom | | Bandwidth per month | 500 MB | 100 GB | 500 GB | Custom | | Databases | 10 | 20 | 60 | Custom | | Database storage | 500 MB (up to 5 databases at the 100 MB minimum) | 50 GB | 150 GB | Custom | | Database connections | 1 | 5 | 20 | Custom | | Hive Buckets storage | 5 GB | 25 GB | 250 GB | Custom | | Hive Buckets downloads (egress) | 10 GB per month | Counts toward bandwidth | Counts toward bandwidth | Custom | | Hive Buckets buckets | 10 | 25 | 100 | Custom | | n8n workspaces | 1 | 3 | 8 | Custom | | HivePods | 1 | 5 | 15 | Custom | | HivePod vCPU / memory / disk (total) | 1 / 1 GB / 10 GB | 4 / 8 GB / 100 GB | 12 / 24 GB / 300 GB | Custom | | HivePod vCPU-hours per month | 365 (about one Nano pod always on) | 730 (one vCPU always on) | 2,190 (three vCPUs always on) | Custom | | Tunnels at once | 1 (random names) | 5 (3 reserved names) | 15 (10 reserved names) | 100 (50 reserved names) | | Custom domains | 5 per app or pod | 5 per app or pod | 5 per app or pod | 5 per app or pod | | Support | Community | Email | Priority email | Custom | On the Free Tier, Hive Buckets storage and downloads are hard limits: uploads beyond 5 GB stored and downloads beyond 10 GB in a month are refused until the next month or until you upgrade. On paid plans, bucket downloads share the plan’s bandwidth allowance, and storage beyond the included amount costs $0.02 per GB-month. See [Hive Buckets pricing and allowances](/buckets/pricing/). The **Scale Plan** has custom limits and pricing; DockHive’s team sets it up for you. ## Limits apply across all regions [Section titled “Limits apply across all regions”](#limits-apply-across-all-regions) Your plan’s limits count everything you run **in all regions combined**. For example, on the Free Tier you can have one HivePod in total, not one per region. The console’s **Overview** shows your usage against these limits, *across every region*. When you reach a limit, the console, CLI and API say so (for example *“Your Free plan includes 10 databases. Delete a database or upgrade your plan to create another.”*) and nothing is charged. ## Free Tier [Section titled “Free Tier”](#free-tier) The Free Tier has hard limits and is never billed. When you use up a monthly allowance, wait for the next month or upgrade. For example, when the included build time runs out, new builds stop until then (your running apps aren’t affected). ## Pay as you go (prepaid credits) [Section titled “Pay as you go (prepaid credits)”](#pay-as-you-go-prepaid-credits) Prefer no subscription? **Pay as you go** has no monthly fee: top up prepaid credits (from $5) and pay only for usage beyond the free allowances, at the Developer Plan’s rates. While your balance is positive you get the Developer Plan’s limits. See [Pay as you go](/billing/pay-as-you-go/). ## Next [Section titled “Next”](#next) * [Usage, overage and bandwidth](/billing/usage/) * [Pay as you go (prepaid credits)](/billing/pay-as-you-go/) * [Manage your subscription](/billing/manage/) # Manage your subscription > Upgrade, change or cancel your DockHive plan, update your payment method and download invoices. All billing lives on the **Billing & Payment** page in the console. ## Upgrade [Section titled “Upgrade”](#upgrade) 1. Click **Upgrade Plan** and choose the **Developer Plan** or the **Pro Plan**. 2. Pay through secure checkout. 3. Back in the console you’ll see *“Payment received. Activating your plan…”*, then a message that you’re now on your new plan. If you cancel at checkout, you aren’t charged. For the Scale Plan, [contact sales](https://www.dockhive.io/contact-sales). ## Change plan, payment method or invoices [Section titled “Change plan, payment method or invoices”](#change-plan-payment-method-or-invoices) Click **Manage payment & invoices** to open the secure billing portal. There you can: * update your payment method, * download invoices, * change or cancel your plan. **Recent Invoices** in the console also lists your invoices. ## Cancel [Section titled “Cancel”](#cancel) Cancel from the billing portal. Your plan stays active until the end of the period you’ve paid for, then your account moves to the Free Tier. You can resume from the billing portal before then. If you’re using more than the Free Tier allows when it ends, you won’t be able to create more resources until you’re back under the limits. ## If a payment fails [Section titled “If a payment fails”](#if-a-payment-fails) Your plan stays active while the payment is retried. You’ll get an email and see a banner in the console: *“Your last payment failed… Update your payment method to keep your plan.”* Click **Update payment method**. If payment keeps failing, the account moves to the Free Tier. ## Questions about a charge? [Section titled “Questions about a charge?”](#questions-about-a-charge) Email . # Pay as you go (prepaid credits) > Top up prepaid credits and pay only for what you use, with no monthly fee. Balances, auto-recharge, low balance and what happens at zero. New Pay as you go is new. If you don’t see it on your **Billing & Payment** page yet, it’s still rolling out to your account. **Pay as you go** has no monthly fee. You load money onto your account as prepaid **credits**, and usage beyond the free allowances is paid from that balance. ## How it works [Section titled “How it works”](#how-it-works) * You get the **Free Tier’s monthly allowances** (100 build hours, 500 MB bandwidth, 500 MB database storage and 365 vCPU-hours). * Usage beyond them is deducted from your credits at the same rates as the Developer Plan: $2 per vCPU-month of compute (billed by the hour), $0.05 per build hour, $0.10 per GB-month of database storage and $0.02 per GB of bandwidth. See [Usage and overage](/billing/usage/). * **While your balance is positive** you get the Developer Plan’s limits (for example 20 apps and 5 HivePods). * There are no invoices: you pay when you top up. ## Start Pay as you go [Section titled “Start Pay as you go”](#start-pay-as-you-go) 1. Go to **Billing & Payment** and choose **Pay as you go**. 2. Top up: pick $10, $25 or $50, or enter any amount from $5 to $500. 3. Pay through secure checkout. The credit appears on your balance when you return. If you’re on the Developer Plan, cancel it in the billing portal first, then top up. ## Your balance [Section titled “Your balance”](#your-balance) The Billing page shows your **balance**, what you’ve spent this month, and an estimate of how many days it will last. The credit history lists every top-up and usage charge. ### Auto-recharge [Section titled “Auto-recharge”](#auto-recharge) Tick **Save card for auto-recharge** when you top up, then turn on auto-recharge to top up automatically with your saved card when the balance runs low. If a recharge payment is declined, auto-recharge turns itself off. ## Low balance and zero [Section titled “Low balance and zero”](#low-balance-and-zero) | Balance | What happens | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | $2 or less | You get an email and a reminder in the console. | | $0 | Running resources keep running. New resources are limited to the Free Tier’s limits. | | Below $0 | Usage keeps being recorded. You have **72 hours** to top up; until then, new resources beyond the Free Tier’s limits are blocked. | | Below $0 for more than 72 hours | Your account is marked for non-payment and running resources may be paused. Topping up restores it straight away. | A top-up pays off any negative balance first. ## Credits on other plans [Section titled “Credits on other plans”](#credits-on-other-plans) If you’re on the Developer Plan and have credits, usage beyond your plan’s allowance is paid from your credits first, before it’s added to your invoice. ## Refunds [Section titled “Refunds”](#refunds) Questions about a top-up or a refund? Email . Refunded top-ups are taken back off your balance. # Usage, overage and bandwidth > How DockHive measures usage, overage rates on paid plans, and how bandwidth is metered. ## What’s measured [Section titled “What’s measured”](#whats-measured) | Metric | What counts | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | **Build time** | Minutes spent building your apps, including failed builds. Rollbacks and code Drone refuses before building are free. | | **HivePod vCPU-hours** | vCPU × hours for running pods. Memory is included. | | **App vCPU-hours** | vCPU × hours for running apps on a [larger size](/apps/manage/#choose-an-app-size). Apps at the default 512 MB size aren’t counted. | | **Database storage** | GB actually used, averaged over the month (GB-months), not the limit you set. | | **Bandwidth** | Data sent from DockHive to the internet. | ## Overage rates (paid plans) [Section titled “Overage rates (paid plans)”](#overage-rates-paid-plans) Usage beyond your plan’s monthly allowance is billed at: | Metric | Rate | | -------------------------- | ----------------------------------------------------------------------- | | Compute (HivePods) | **$2** per vCPU-month, billed by the hour (about $0.0027 per vCPU-hour) | | Compute (larger app sizes) | **$2** per vCPU-month, billed by the hour | | Build time | **$0.05** per build hour | | Database storage | **$0.10** per GB-month | | Hive Buckets storage | **$0.02** per GB-month (see [Hive Buckets pricing](/buckets/pricing/)) | | Bandwidth | **$0.02** per GB | On the Free Tier, usage is capped and never billed. ## Bandwidth [Section titled “Bandwidth”](#bandwidth) Bandwidth is the data your apps, databases, n8n workspaces, HivePods, tunnels and Hive Buckets (on paid plans) **send out** to visitors and clients (egress), measured in GB (1 GB = 1,000,000,000 bytes). One allowance covers all products and all regions: * Free Tier: 500 MB per month. When it’s used up: *“Included bandwidth used up. Upgrade for more.”* * Developer Plan: 100 GB per month, then $0.02 per GB. * Pro Plan: 500 GB per month, then $0.02 per GB. Data coming in (uploads to your app, requests) isn’t counted. ## See your usage [Section titled “See your usage”](#see-your-usage) The **Billing & Usage** page in the console shows: * **Real-Time Cost** and **Next Invoice** estimates, * **Service Usage & Performance**, per metric, against your allowance, * **Export Usage**, which downloads this period’s usage as a CSV file. From an AI assistant, the [MCP server](/cli/mcp/)’s `usage_and_cost` tool returns the same figures. # Hive Buckets > S3-compatible object storage on DockHive. Store files, images, backups and user uploads, and use them from the AWS CLI, any S3 SDK, Laravel or Django. **Hive Buckets** is S3-compatible object storage. Create a bucket, create an access key, and use the tools you already know: the AWS CLI, boto3, the AWS SDK for JavaScript, Laravel’s `s3` disk, django-storages or any other S3 client. Your files are encrypted and stored across multiple regions, so a whole region can go down without losing data. ## At a glance [Section titled “At a glance”](#at-a-glance) | | | | --------------------- | ----------------------------------------------------------------------------------------- | | Endpoint | `https://s3.dockhive.io` (or a [regional endpoint](/buckets/endpoints/)) | | Signing region | `auto` | | Addressing | Path style: `https://s3.dockhive.io//` | | Authentication | AWS Signature Version 4 with a Hive Buckets [access key](/buckets/access-keys/) (`DH...`) | | Largest single upload | 100 MB per request; use multipart for bigger files (up to about 1 TB) | | Request fees | None | | Uploads | Free | ## What you can do [Section titled “What you can do”](#what-you-can-do) * Upload, download, list, copy and delete objects, including [multipart uploads](/buckets/limits/#large-files-and-multipart-uploads). * Keep buckets [private, or make them public](/buckets/public-access/) with Block Public Access as a safety switch. * Share files and accept uploads with [presigned URLs and browser POST forms](/buckets/presigned-urls/). * Allow uploads straight from the browser with [CORS](/buckets/cors/). * Keep every version of a file with [versioning](/buckets/versioning/), and make files undeletable with [object lock](/buckets/versioning/#object-lock). * Grant access with [bucket policies](/buckets/policies/) and clean up old files with [lifecycle rules](/buckets/lifecycle/). ## In this section [Section titled “In this section”](#in-this-section) * [Quickstart](/buckets/quickstart/): create a bucket and upload a file in a few minutes * [Endpoints and regions](/buckets/endpoints/) * [Access keys and permissions](/buckets/access-keys/) * Tools: [AWS CLI](/buckets/aws-cli/), [Python and JavaScript SDKs](/buckets/sdks/), [Laravel and Django](/buckets/frameworks/) * [Public and private buckets](/buckets/public-access/) * [Presigned URLs and browser uploads](/buckets/presigned-urls/) * [CORS](/buckets/cors/) * [Versioning and object lock](/buckets/versioning/) * [Bucket policies](/buckets/policies/) * [Lifecycle rules](/buckets/lifecycle/) * [S3 compatibility](/buckets/s3-compatibility/) * [Limits](/buckets/limits/) * [Pricing and allowances](/buckets/pricing/) # Access keys and permissions > Create Hive Buckets access keys for S3 tools, choose read, read-write or admin permission, limit a key to some buckets, and revoke keys. S3 tools sign their requests with an **access key**: an access key ID that starts with `DH` and a secret access key. Access keys are separate from your [DockHive API keys](/api/api-keys/) (`dh_pat_...`), which work with the DockHive REST API but not with S3 tools. ## Create an access key [Section titled “Create an access key”](#create-an-access-key) 1. In the console, open **Hive Buckets → Access keys** and click **Create access key**. 2. Enter a **Name**, for example `production-app`. 3. Under **Buckets**, choose **All buckets** or **Selected buckets** and tick the buckets the key may use. 4. Choose a **Permission** (see below). 5. Click **Create key**. Copy the **Access key ID** and the **Secret access key**. Caution The secret access key is shown **only once**. Store it in your app’s [environment variables](/apps/environment-variables/) or your CI’s secret store, never in your code. If you lose it, create a new key and revoke the old one. You can also create keys with the [REST API](#rest-api). ## Permissions [Section titled “Permissions”](#permissions) | Permission | In the console | What the key can do | | ------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `read` | **Read only** | Download objects and their versions (GET, HEAD), list objects, versions, multipart uploads and parts, and read ACLs, tags, retention, legal holds and bucket settings. | | `read-write` | **Read & write** | Everything `read` can, plus upload (PUT, POST, copy, multipart), delete objects and versions, and set object tags, retention and legal holds. | | `admin` | **Admin** | Everything `read-write` can, plus bucket and object ACLs (including uploads with `x-amz-acl: public-read`), CORS, lifecycle, Block Public Access, versioning, object lock settings, bucket policies, bucket tags, deleting buckets and bypassing governance retention. | Give each app the least it needs: a site that only serves files needs **Read only**; an app that stores user uploads needs **Read & write**. Keep **Admin** keys for setup scripts and infrastructure tools. ## Bucket scope [Section titled “Bucket scope”](#bucket-scope) * A key for **All buckets** works with every bucket you own, including ones you create later. * A key for **Selected buckets** works only with those buckets, and `ListBuckets` shows only them. * Creating a bucket over S3 (`CreateBucket`) needs an **Admin** key for **All buckets**. Creating buckets in the console is usually simpler. ## Revoke a key [Section titled “Revoke a key”](#revoke-a-key) In **Hive Buckets → Access keys**, revoke the key. Requests signed with it stop working within a minute. The list shows when each key was last used, which helps you find keys nobody needs any more. ## REST API [Section titled “REST API”](#rest-api) With a [DockHive API key](/api/api-keys/), manage buckets and access keys through the [DockHive API](/api/) under `/api/v1/buckets/`. Pass the bucket’s region with `?region=`. ```sh # List your buckets in eu curl "https://api.dockhive.io/api/v1/buckets/buckets?region=eu" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Create a read-write access key for two buckets (the secret is returned only in this response) curl -X POST "https://api.dockhive.io/api/v1/buckets/keys?region=eu" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "production-app", "permission": "read-write", "buckets": ["my-app-uploads", "my-app-assets"]}' ``` Use `"all_buckets": true` instead of `"buckets"` for a key that works with every bucket. # AWS CLI > Use the AWS CLI with Hive Buckets - configure a profile, then copy, list, sync and manage buckets with s3 and s3api commands. The [AWS CLI](https://aws.amazon.com/cli/) works with Hive Buckets. You need an [access key](/buckets/access-keys/). ## Configure a profile [Section titled “Configure a profile”](#configure-a-profile) ```sh aws configure --profile dockhive # AWS Access Key ID: DH... # AWS Secret Access Key: # Default region name: auto # Default output format: json aws configure set s3.addressing_style path --profile dockhive ``` Point every command at the endpoint with `--endpoint-url`, or save it in the profile (AWS CLI 2.13 and later) so you can leave it out: \~/.aws/config ```ini [profile dockhive] region = auto endpoint_url = https://s3.dockhive.io s3 = addressing_style = path multipart_threshold = 64MB multipart_chunksize = 16MB ``` The examples below assume `export AWS_PROFILE=dockhive` and pass `--endpoint-url` for clarity. ## Everyday commands [Section titled “Everyday commands”](#everyday-commands) ```sh EP=https://s3.dockhive.io # Upload a file and a folder aws s3 cp ./report.pdf s3://my-app-uploads/reports/report.pdf --endpoint-url $EP aws s3 cp ./images s3://my-app-uploads/images/ --recursive --endpoint-url $EP # List aws s3 ls --endpoint-url $EP # your buckets aws s3 ls s3://my-app-uploads/reports/ --endpoint-url $EP # Download aws s3 cp s3://my-app-uploads/reports/report.pdf . --endpoint-url $EP # Mirror a folder (only changed files are sent; --delete removes files that are gone locally) aws s3 sync ./public s3://my-app-assets/ --delete --endpoint-url $EP # Delete aws s3 rm s3://my-app-uploads/reports/report.pdf --endpoint-url $EP aws s3 rm s3://my-app-uploads/tmp/ --recursive --endpoint-url $EP # Share a file for one hour aws s3 presign s3://my-app-uploads/reports/report.pdf --expires-in 3600 --endpoint-url $EP ``` `aws s3 cp` and `aws s3 sync` switch to multipart uploads for large files automatically. Keep `multipart_chunksize` at 100 MB or less; the default of 8 MB is fine. See [Limits](/buckets/limits/). ## Lower-level commands (s3api) [Section titled “Lower-level commands (s3api)”](#lower-level-commands-s3api) `aws s3api` exposes individual S3 operations: ```sh # Object details and tags aws s3api head-object --bucket my-app-uploads --key reports/report.pdf --endpoint-url $EP aws s3api put-object-tagging --bucket my-app-uploads --key reports/report.pdf \ --tagging 'TagSet=[{Key=team,Value=finance}]' --endpoint-url $EP # Create a bucket (needs an Admin key for all buckets) aws s3api create-bucket --bucket my-new-bucket --endpoint-url $EP # Turn on versioning (needs an Admin key) aws s3api put-bucket-versioning --bucket my-app-uploads \ --versioning-configuration Status=Enabled --endpoint-url $EP aws s3api list-object-versions --bucket my-app-uploads --prefix reports/ --endpoint-url $EP ``` More `s3api` examples are on the [CORS](/buckets/cors/), [versioning](/buckets/versioning/), [bucket policy](/buckets/policies/) and [lifecycle](/buckets/lifecycle/) pages. ## Other S3 tools [Section titled “Other S3 tools”](#other-s3-tools) Tools such as rclone, s3cmd, Cyberduck and restic work too. Use the same settings everywhere: endpoint `https://s3.dockhive.io`, region `auto`, path-style addressing, and your `DH...` access key. ### Fast listings with rclone [Section titled “Fast listings with rclone”](#fast-listings-with-rclone) By default rclone sends one extra request per file to read its content type and modification time, so listing thousands of files takes minutes. Add these flags and a listing of thousands of files takes a second or two: ```bash rclone lsjson -R --fast-list --no-mimetype --use-server-modtime dockhive:my-bucket/backups/ ``` `--use-server-modtime` uses the upload time Hive Buckets already returns in the listing. For `rclone sync` and `rclone copy`, use `--fast-list` and compare by size (`--size-only`) or checksum (`--checksum`) instead of modification time. # CORS > Allow web pages to upload to and download from Hive Buckets directly, by adding CORS rules in the console or with PutBucketCors. Browsers block a web page from calling another domain unless that domain allows it. To let your site upload to or read from a bucket with JavaScript (for example with a [presigned PUT URL](/buckets/presigned-urls/#upload-links-put)), add a **CORS rule** to the bucket. You don’t need CORS for plain links, `` tags or downloads, or for requests made from your server. ## In the console [Section titled “In the console”](#in-the-console) Open the bucket’s settings, find **CORS**, and enter your site’s addresses under **Allowed origins (one per line)**, for example: ```text https://app.example.com http://localhost:5173 ``` Choose the methods to allow and save. ## With S3 tools [Section titled “With S3 tools”](#with-s3-tools) Setting CORS needs an **Admin** key. cors.json ```json { "CORSRules": [ { "AllowedOrigins": ["https://app.example.com", "http://localhost:5173"], "AllowedMethods": ["GET", "PUT", "POST", "HEAD"], "AllowedHeaders": ["*"], "ExposeHeaders": ["ETag", "x-amz-version-id"], "MaxAgeSeconds": 3600 } ] } ``` ```sh EP=https://s3.dockhive.io aws s3api put-bucket-cors --bucket my-app-uploads --cors-configuration file://cors.json --endpoint-url $EP aws s3api get-bucket-cors --bucket my-app-uploads --endpoint-url $EP aws s3api delete-bucket-cors --bucket my-app-uploads --endpoint-url $EP ``` Or from code: ```python s3.put_bucket_cors( Bucket="my-app-uploads", CORSConfiguration={ "CORSRules": [{ "AllowedOrigins": ["https://app.example.com"], "AllowedMethods": ["GET", "PUT", "POST", "HEAD"], "AllowedHeaders": ["*"], "ExposeHeaders": ["ETag"], "MaxAgeSeconds": 3600, }] }, ) ``` ## Tips [Section titled “Tips”](#tips) * List exact origins (scheme, host and port). Use `"*"` only for public, read-only buckets. * Expose `ETag` if your page does multipart uploads from the browser; it needs each part’s ETag to finish the upload. * Changes apply to new requests straight away, but browsers cache preflight answers for `MaxAgeSeconds`. # Endpoints and regions > Hive Buckets S3 endpoints, the global and regional hostnames, the signing region to use, and path-style or virtual-hosted addressing. ## Endpoints [Section titled “Endpoints”](#endpoints) | Endpoint | Hostname | | ------------------------------------- | --------------------------------- | | Global (recommended default) | `https://s3.dockhive.io` | | `us`: United States (Los Angeles) | `https://s3-us.dockhive.io` | | `virginia`: United States (Virginia) | `https://s3-virginia.dockhive.io` | | `eu`: Europe (London) | `https://s3-eu.dockhive.io` | | `de`: Germany (Frankfurt) | `https://s3-de.dockhive.io` | | `asia`: Asia (Singapore) | `https://s3-asia.dockhive.io` | | `mumbai`: India (Mumbai) | `https://s3-mumbai.dockhive.io` | | `africa`: South Africa (Johannesburg) | `https://s3-africa.dockhive.io` | | `ng`: Nigeria (Lagos) | `https://s3-ng.dockhive.io` | | `abuja`: Nigeria (Abuja) | `https://s3-abuja.dockhive.io` | **Any endpoint can read and write any bucket.** You never have to match an endpoint to a bucket for things to work. A bucket’s region, chosen when you create it, is its **home**: the bucket’s regional endpoint is its home endpoint and the fastest place to read it from. If your app runs in one region, create its buckets in the same region and use that regional endpoint. If you don’t know where your users or servers are, use the global endpoint. ## Signing region [Section titled “Signing region”](#signing-region) Sign requests with the region **`auto`**. `dockhive` and `us-east-1` are accepted too, which helps with tools that insist on an AWS region name. ## Path-style or virtual-hosted addressing [Section titled “Path-style or virtual-hosted addressing”](#path-style-or-virtual-hosted-addressing) Both styles work. Pick the one your tool or framework expects. **Path style** puts the bucket in the path, `https://s3.dockhive.io//`. It works with every endpoint above. Turn it on in your tool: | Tool | Setting | | ------------------------- | ----------------------------------------------------------- | | AWS CLI | `aws configure set s3.addressing_style path` | | boto3 | `Config(s3={"addressing_style": "path"})` | | AWS SDK for JavaScript v3 | `forcePathStyle: true` | | Laravel | `'use_path_style_endpoint' => true` | | django-storages | `AWS_S3_ADDRESSING_STYLE = "path"` | | Other SDKs | look for `path style`, `UsePathStyle` or `s3ForcePathStyle` | **Virtual-hosted style** puts the bucket in the hostname, `https://.dockhivestore.xyz/`. Use the endpoint `https://dockhivestore.xyz` and leave your tool on its default (virtual-hosted) addressing. It’s the global endpoint under another name, so any bucket in any region works there. Bucket names with dots (`my.bucket`) need path style. ## Faster reads in this region [Section titled “Faster reads in this region”](#faster-reads-in-this-region) Each bucket has an optional setting, **Faster reads in this region**. When it’s on, Hive Buckets keeps an extra copy of the bucket’s files in its home region, so reads from there are quicker. That extra copy is billed as storage, which roughly doubles the stored size of that bucket. It’s off by default; turn it on in the bucket’s settings for buckets that are read often and where read latency matters. See [Pricing and allowances](/buckets/pricing/). ## Durability [Section titled “Durability”](#durability) Your files are encrypted and stored across multiple regions, so a whole region can go down without losing data. # Laravel and Django > Store uploads and static files in Hive Buckets from Laravel (the s3 filesystem disk) and Django (django-storages). Both frameworks talk to Hive Buckets through their standard S3 storage backends. You need a bucket and an [access key](/buckets/access-keys/) with **Read & write** permission. Put the values in your app’s [environment variables](/apps/environment-variables/). ## Laravel [Section titled “Laravel”](#laravel) Install the S3 driver: ```sh composer require league/flysystem-aws-s3-v3 "^3.0" ``` Set the environment variables: .env ```ini FILESYSTEM_DISK=s3 AWS_ACCESS_KEY_ID=DH... AWS_SECRET_ACCESS_KEY=... AWS_DEFAULT_REGION=auto AWS_BUCKET=my-app-uploads AWS_ENDPOINT=https://s3.dockhive.io AWS_USE_PATH_STYLE_ENDPOINT=true AWS_URL=https://s3.dockhive.io/my-app-uploads ``` Check the `s3` disk in `config/filesystems.php`. Recent Laravel versions already read these variables: config/filesystems.php ```php 's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION', 'auto'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT', 'https://s3.dockhive.io'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', true), 'throw' => false, ], ``` Use it like any disk: ```php use Illuminate\Support\Facades\Storage; $path = $request->file('avatar')->store('avatars', 's3'); // upload $contents = Storage::disk('s3')->get($path); // read $url = Storage::disk('s3')->temporaryUrl($path, now()->addMinutes(30)); // presigned link Storage::disk('s3')->delete($path); ``` `Storage::url($path)` builds a public link from `AWS_URL`; it only works for files in a [public bucket](/buckets/public-access/). For private buckets, use `temporaryUrl()`. ## Django [Section titled “Django”](#django) Install [django-storages](https://django-storages.readthedocs.io/) with boto3: ```sh pip install "django-storages[s3]" ``` settings.py ```python import os AWS_ACCESS_KEY_ID = os.environ["HIVE_BUCKETS_ACCESS_KEY_ID"] AWS_SECRET_ACCESS_KEY = os.environ["HIVE_BUCKETS_SECRET_ACCESS_KEY"] AWS_STORAGE_BUCKET_NAME = "my-app-uploads" AWS_S3_ENDPOINT_URL = "https://s3.dockhive.io" AWS_S3_REGION_NAME = "auto" AWS_S3_ADDRESSING_STYLE = "path" AWS_S3_SIGNATURE_VERSION = "s3v4" AWS_DEFAULT_ACL = None # files inherit the bucket's visibility AWS_QUERYSTRING_AUTH = True # file.url returns presigned links (private bucket) AWS_QUERYSTRING_EXPIRE = 3600 STORAGES = { "default": {"BACKEND": "storages.backends.s3.S3Storage"}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}, } ``` Now `FileField` and `ImageField` uploads go to your bucket, and `instance.file.url` returns a presigned link that works for an hour. * Private bucket (default) Keep `AWS_QUERYSTRING_AUTH = True`. Every `.url` is a presigned link, so files stay private. * Public bucket For a [public bucket](/buckets/public-access/), set `AWS_QUERYSTRING_AUTH = False`. `.url` then returns a plain link such as `https://s3.dockhive.io/my-app-uploads/avatars/me.png`. To serve `collectstatic` output from a bucket as well, point `"staticfiles"` at `storages.backends.s3.S3Storage` with a public bucket of its own (pass the bucket in `"OPTIONS": {"bucket_name": "my-app-static", "querystring_auth": False}`). Note HTML and SVG files are served as downloads from public links and presigned URLs, so a bucket can’t host a website or serve SVG images inline yet. Serve those from your app (see [Static sites](/apps/guides/static-sites/)). See [Public and private buckets](/buckets/public-access/#html-and-svg-files). # Lifecycle rules > Expire old files, old versions and unfinished multipart uploads in Hive Buckets automatically with S3 lifecycle rules. Lifecycle rules delete things for you on a schedule: temporary files after a few days, old versions after a month, unfinished multipart uploads after a week. Setting rules needs an **Admin** key. ## Supported rules [Section titled “Supported rules”](#supported-rules) | Rule | What it does | Buckets | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------- | | `Expiration` with `Days` or `Date` | Deletes current objects after a number of days or on a date. On a versioned bucket it adds a delete marker instead. | All | | `AbortIncompleteMultipartUpload` | Cancels multipart uploads that weren’t finished after `DaysAfterInitiation` days, freeing their parts. | All | | `NoncurrentVersionExpiration` | Permanently deletes noncurrent versions `NoncurrentDays` after they were replaced, optionally keeping the newest `NewerNoncurrentVersions`. | Versioned | | `Expiration` with `ExpiredObjectDeleteMarker` | Removes delete markers that no longer have any versions behind them. | Versioned | **Filters:** by key prefix and by object size (`ObjectSizeGreaterThan`, `ObjectSizeLessThan`) on every bucket; by tags as well on buckets with [versioning](/buckets/versioning/). Days are counted like S3: rounded up to the next midnight UTC. Rules run in the background, so an object can stay a little while after its expiry time. Versions under [object lock](/buckets/versioning/#object-lock) are never deleted by a rule. **Transitions** (moving objects to another storage class) aren’t supported: Hive Buckets has one storage class, so a rule with a `Transition` is refused. ## Example [Section titled “Example”](#example) lifecycle.json ```json { "Rules": [ { "ID": "expire-tmp", "Status": "Enabled", "Filter": { "Prefix": "tmp/" }, "Expiration": { "Days": 7 } }, { "ID": "abort-unfinished-uploads", "Status": "Enabled", "Filter": { "Prefix": "" }, "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 3 } }, { "ID": "old-versions", "Status": "Enabled", "Filter": { "Prefix": "" }, "NoncurrentVersionExpiration": { "NoncurrentDays": 30, "NewerNoncurrentVersions": 3 } } ] } ``` The `old-versions` rule only applies to a bucket with versioning; leave it out otherwise. ```sh EP=https://s3.dockhive.io aws s3api put-bucket-lifecycle-configuration --bucket my-app-uploads \ --lifecycle-configuration file://lifecycle.json --endpoint-url $EP aws s3api get-bucket-lifecycle-configuration --bucket my-app-uploads --endpoint-url $EP aws s3api delete-bucket-lifecycle --bucket my-app-uploads --endpoint-url $EP ``` # Limits > Hive Buckets limits - request and object sizes, multipart uploads, presigned URL lifetime, bucket names and buckets per plan. | Limit | Value | | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | Size of one request (a single `PUT`, a POST upload, or one multipart part) | **100 MB** | | Parts per multipart upload | 10,000 | | Largest object (with multipart) | About **1 TB** (10,000 parts of 100 MB) | | Keys in one `DeleteObjects` request | 1,000 | | Presigned URL lifetime | Up to **7 days** | | Bucket tags | 50 per bucket | | Bucket name | 3-63 characters; lowercase letters, numbers, hyphens and dots; unique across DockHive | | Request fees | None | ## Buckets per account [Section titled “Buckets per account”](#buckets-per-account) | Plan | Buckets | | -------------- | ------- | | Free Tier | 10 | | Developer Plan | 25 | | Pro Plan | 100 | | Scale Plan | Custom | Storage and downloads per plan are on [Pricing and allowances](/buckets/pricing/). ## Large files and multipart uploads [Section titled “Large files and multipart uploads”](#large-files-and-multipart-uploads) Any single request can carry at most 100 MB, so **upload files larger than 100 MB with multipart uploads**. The AWS CLI and SDKs do this for you; just make sure their part size and multipart threshold are 100 MB or less. Their defaults are fine: | Tool | Default part size | Setting | | --------------------------------- | ----------------- | ------------------------------------------------------------------ | | AWS CLI | 8 MB | `multipart_threshold`, `multipart_chunksize` in `~/.aws/config` | | boto3 | 8 MB | `TransferConfig(multipart_threshold=..., multipart_chunksize=...)` | | AWS SDK for JavaScript (`Upload`) | 5 MB | `partSize` | | rclone | 5 MB | `--s3-chunk-size`, `--s3-upload-cutoff` | A request bigger than 100 MB is refused before it reaches your bucket. Unfinished multipart uploads keep their parts (and count as storage) until they’re completed or aborted; add an [`AbortIncompleteMultipartUpload` lifecycle rule](/buckets/lifecycle/) to clean them up. ## Bucket names [Section titled “Bucket names”](#bucket-names) * 3 to 63 characters: lowercase letters, numbers, hyphens (`-`) and dots (`.`), starting and ending with a letter or number. * Not formatted like an IP address, and some prefixes are reserved. * Names are **unique across all DockHive accounts**; if a name is taken, pick another. * A bucket’s name and region can’t be changed. To rename, create a new bucket and copy the files (`aws s3 sync s3://old s3://new`). * A bucket must be empty before you delete it. # Bucket policies > Grant or deny access to a Hive Buckets bucket with an S3 bucket policy - supported elements, conditions and examples. A **bucket policy** is a JSON document attached to a bucket that allows or denies S3 actions. Use it to give another access key (even one from another DockHive account) access to part of a bucket, to make one folder public, or to deny requests from outside your network. Setting and removing a policy needs an **Admin** key. ## How access is decided [Section titled “How access is decided”](#how-access-is-decided) 1. An explicit **`Deny`** in the bucket policy refuses the request. 2. Otherwise the request is allowed if the access key’s own [permission and scope](/buckets/access-keys/) allow it, if the bucket or object is [public](/buckets/public-access/) (anonymous downloads only), or if the policy has a matching **`Allow`**. 3. Anything else is denied. A `Deny` can’t lock you out of the policy itself: the bucket owner’s Admin keys can always read, replace or delete it. Policies can grant **object operations and listing**, to anonymous callers and to other access keys. Bucket settings (CORS, versioning, policies, and so on) always stay with the owner’s keys. Requests allowed by a policy are billed to the bucket owner. ## Supported elements [Section titled “Supported elements”](#supported-elements) | Element | Supported values | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Version` | `2012-10-17` or `2008-10-17` | | `Statement` | One statement object or a list | | `Sid` | Any | | `Effect` | `Allow`, `Deny` | | `Principal` | `"*"` (anyone, including anonymous), or `{"AWS": ["DH..."]}` with Hive Buckets access key IDs that exist | | `Action` | S3 actions such as `s3:GetObject`, `s3:PutObject`, `s3:ListBucket`, with wildcards (`s3:Get*`, `s3:*`) | | `Resource` | `arn:aws:s3:::` and `arn:aws:s3:::/` (wildcards allowed in the pattern) | | `Condition` | `IpAddress` / `NotIpAddress` on `aws:SourceIp`; `StringEquals`, `StringNotEquals`, `StringLike`, `StringNotLike` on `s3:prefix`; `Bool` on `aws:SecureTransport` | `NotPrincipal`, `NotAction`, `NotResource`, IAM user or role ARNs, `...IfExists` operators and other condition keys aren’t supported. A policy that uses them is refused with `MalformedPolicy` and a reason. ## Apply a policy [Section titled “Apply a policy”](#apply-a-policy) ```sh EP=https://s3.dockhive.io aws s3api put-bucket-policy --bucket my-app-uploads --policy file://policy.json --endpoint-url $EP aws s3api get-bucket-policy --bucket my-app-uploads --endpoint-url $EP aws s3api delete-bucket-policy --bucket my-app-uploads --endpoint-url $EP ``` ## Examples [Section titled “Examples”](#examples) ### Make one folder public [Section titled “Make one folder public”](#make-one-folder-public) Block Public Access must be off for public statements to work (a policy granting access to `"*"` is refused while it’s on). ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "PublicImages", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-app-uploads/public/*" } ] } ``` ### Give another access key read access to a prefix [Section titled “Give another access key read access to a prefix”](#give-another-access-key-read-access-to-a-prefix) ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": ["DHEXAMPLEKEYID"] }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-app-uploads/shared/*" }, { "Effect": "Allow", "Principal": { "AWS": ["DHEXAMPLEKEYID"] }, "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::my-app-uploads", "Condition": { "StringLike": { "s3:prefix": "shared/*" } } } ] } ``` ### Deny everything from outside your network [Section titled “Deny everything from outside your network”](#deny-everything-from-outside-your-network) ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": ["arn:aws:s3:::my-app-uploads", "arn:aws:s3:::my-app-uploads/*"], "Condition": { "NotIpAddress": { "aws:SourceIp": ["203.0.113.0/24"] } } } ] } ``` ### Require HTTPS [Section titled “Require HTTPS”](#require-https) ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": ["arn:aws:s3:::my-app-uploads", "arn:aws:s3:::my-app-uploads/*"], "Condition": { "Bool": { "aws:SecureTransport": "false" } } } ] } ``` ## Block Public Access and policies [Section titled “Block Public Access and policies”](#block-public-access-and-policies) A statement that allows `"*"` is public unless it’s limited with an `aws:SourceIp` condition. While [Block Public Access](/buckets/public-access/#block-public-access) is on, such a policy is refused, and public statements in an existing policy are ignored if you turn it on later. `get-bucket-policy-status` shows whether the bucket is public. # Presigned URLs and browser uploads > Share private Hive Buckets files and accept uploads with presigned GET and PUT URLs (up to 7 days) and browser POST policy forms. A **presigned URL** carries a signature made with your access key, so whoever holds it can do one thing (download or upload one object) until it expires, without seeing your key. Presigned URLs last **up to 7 days** (604,800 seconds). The key that signs the URL must be allowed to do the action: a **Read only** key can presign downloads; uploads need **Read & write**. Revoking the key also stops its URLs from working. ## Download links (GET) [Section titled “Download links (GET)”](#download-links-get) * AWS CLI ```sh aws s3 presign s3://my-app-uploads/reports/report.pdf --expires-in 86400 \ --endpoint-url https://s3.dockhive.io ``` * Python (boto3) ```python url = s3.generate_presigned_url( "get_object", Params={ "Bucket": "my-app-uploads", "Key": "reports/report.pdf", # Optional: the file name the browser saves it as "ResponseContentDisposition": 'attachment; filename="Q3 report.pdf"', }, ExpiresIn=86400, ) ``` * JavaScript (AWS SDK v3) ```js import { GetObjectCommand } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; const url = await getSignedUrl( s3, new GetObjectCommand({ Bucket: 'my-app-uploads', Key: 'reports/report.pdf', ResponseContentDisposition: 'attachment; filename="Q3 report.pdf"', }), { expiresIn: 86400 }, ); ``` See the [Python and JavaScript SDKs](/buckets/sdks/#create-a-client) page for how `s3` is created. ## Upload links (PUT) [Section titled “Upload links (PUT)”](#upload-links-put) Let a browser or another service upload one file straight to your bucket. Your server creates the URL; the client sends the file with `PUT`. * Python (boto3) ```python url = s3.generate_presigned_url( "put_object", Params={"Bucket": "my-app-uploads", "Key": "avatars/user-42.png", "ContentType": "image/png"}, ExpiresIn=600, ) ``` * JavaScript (AWS SDK v3) ```js import { PutObjectCommand } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; const url = await getSignedUrl( s3, new PutObjectCommand({ Bucket: 'my-app-uploads', Key: 'avatars/user-42.png', ContentType: 'image/png' }), { expiresIn: 600 }, ); ``` Upload with the same `Content-Type` you signed: ```sh curl -X PUT -H "Content-Type: image/png" --upload-file avatar.png "$URL" ``` ```js // In the browser await fetch(url, { method: 'PUT', headers: { 'Content-Type': file.type }, body: file }); ``` Uploads from a web page need a [CORS rule](/buckets/cors/) on the bucket that allows your site’s origin and the `PUT` method. A single presigned PUT can carry up to 100 MB; for bigger files, presign each part of a multipart upload or upload from your server. ## Browser upload forms (POST policy) [Section titled “Browser upload forms (POST policy)”](#browser-upload-forms-post-policy) A **POST policy** lets an HTML form upload directly to a bucket, with rules you set: the key prefix, the content type, and a size range. Your server signs the policy and puts its fields into the form. ```python post = s3.generate_presigned_post( Bucket="my-app-uploads", Key="uploads/${filename}", Fields={"Content-Type": "image/jpeg"}, Conditions=[ ["starts-with", "$key", "uploads/"], {"Content-Type": "image/jpeg"}, ["content-length-range", 1, 10 * 1024 * 1024], # 1 byte to 10 MB ], ExpiresIn=900, ) # post["url"] is the bucket URL; post["fields"] are the hidden form fields ``` ```html
``` The `file` field must come last. POST uploads can be up to 100 MB. To submit the form with JavaScript (`fetch` with `FormData`), add a [CORS rule](/buckets/cors/) that allows `POST` from your site. ## HTML and SVG [Section titled “HTML and SVG”](#html-and-svg) Presigned links to HTML and SVG files download the file instead of displaying it. See [HTML and SVG files](/buckets/public-access/#html-and-svg-files). # Pricing and allowances > Hive Buckets storage and download allowances on each DockHive plan, overage rates, Pay as you go, and how storage and egress are measured. Hive Buckets has **no request fees** and **uploads are free**. You pay for what you store and what you download beyond your plan’s allowance. ## Allowances by plan [Section titled “Allowances by plan”](#allowances-by-plan) | | Free Tier | Developer Plan ($3/month) | Pro Plan ($15/month) | Scale Plan | | -------------------- | --------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ---------- | | Storage included | 5 GB | 25 GB | 250 GB | Custom | | Downloads (egress) | 10 GB / month for buckets | Counts toward the plan’s bandwidth: 100 GB / month | Counts toward the plan’s bandwidth: 500 GB / month | Custom | | Beyond the allowance | Refused until next month or you upgrade | Billed at overage rates | Billed at overage rates | Custom | | Buckets | 10 | 25 | 100 | Custom | On paid plans, bandwidth is one allowance shared by all your products (apps, databases, tunnels and buckets). See [Usage, overage and bandwidth](/billing/usage/). ## Overage rates (paid plans) [Section titled “Overage rates (paid plans)”](#overage-rates-paid-plans) | Metric | Rate | | ------------------------------------------------- | ---------------------- | | Storage beyond the included amount | **$0.02** per GB-month | | Downloads (egress) beyond the bandwidth allowance | **$0.02** per GB | | Uploads (ingress) | Free | | Requests | Free | 1 GB = 1,000,000,000 bytes. ## Free Tier [Section titled “Free Tier”](#free-tier) The Free Tier is never billed. Its limits are hard: * Once you store **5 GB**, new uploads are refused until you delete files or upgrade. * Once your buckets have served **10 GB of downloads** in a month, further downloads are refused until the next month or until you upgrade. ## Pay as you go [Section titled “Pay as you go”](#pay-as-you-go) With [Pay as you go](/billing/pay-as-you-go/), the first **5 GB of storage is free**; storage beyond that costs $0.02 per GB-month, paid from your credits. Downloads are charged at the bandwidth rate. If your prepaid credit runs out and your account is suspended, **uploads and downloads are paused** until you top up. You can still list and delete files. ## How usage is measured [Section titled “How usage is measured”](#how-usage-is-measured) * **Storage** is measured every hour and averaged over the month (GB-months). Every stored object counts, including noncurrent [versions](/buckets/versioning/) and parts of unfinished multipart uploads. * **Faster reads in this region**, when turned on for a bucket, keeps an extra copy of that bucket’s files that is billed as storage, roughly doubling the bucket’s stored size. See [Endpoints and regions](/buckets/endpoints/#faster-reads-in-this-region). * **Downloads (egress)** are the bytes sent out of Hive Buckets: downloads with access keys, presigned URLs and [public links](/buckets/public-access/), all billed to the bucket owner. * Failed requests aren’t counted. Your storage and downloads appear on the **Billing & Payment** page with your other usage. ## Example [Section titled “Example”](#example) On the Developer Plan you store 40 GB on average for the month and serve 30 GB of downloads, while your apps use 80 GB of bandwidth: * Storage: 40 GB − 25 GB included = 15 GB × $0.02 = **$0.30** * Bandwidth: 30 + 80 = 110 GB − 100 GB included = 10 GB × $0.02 = **$0.20** * Total for the month: $3 plan + $0.50 overage = **$3.50** # Public and private buckets > Hive Buckets are private by default with Block Public Access on. Make a bucket public for images and downloads, and how ACLs and HTML/SVG files behave. ## Private by default [Section titled “Private by default”](#private-by-default) New buckets are **private** and have **Block Public Access** turned on. Only you (in the console) and your [access keys](/buckets/access-keys/) can read their files. To share a single file from a private bucket, use a [presigned URL](/buckets/presigned-urls/). ## Make a bucket public [Section titled “Make a bucket public”](#make-a-bucket-public) A public bucket lets **anyone with the link download its files**, which suits images, downloads and assets for a website. Uploading, deleting and listing still need an access key. **In the console:** open the bucket’s settings and click **Make public** (or choose **Public** when you create the bucket). This also turns Block Public Access off. **With S3 tools:** an **Admin** key turns Block Public Access off, then sets the bucket ACL to `public-read`: ```sh EP=https://s3.dockhive.io aws s3api delete-public-access-block --bucket my-app-assets --endpoint-url $EP aws s3api put-bucket-acl --bucket my-app-assets --acl public-read --endpoint-url $EP ``` Files are then available at: ```text https://s3.dockhive.io// https://s3.dockhive.io/my-app-assets/images/logo.png ``` Downloads through public links count toward your [download allowance (egress)](/buckets/pricing/), billed to you as the bucket owner. ### Make one object public [Section titled “Make one object public”](#make-one-object-public) When Block Public Access is off, an **Admin** key can upload a single object as public in an otherwise private bucket with the `public-read` canned ACL: ```sh aws s3 cp logo.png s3://my-app-uploads/public/logo.png --acl public-read --endpoint-url $EP ``` ## Make a bucket private again [Section titled “Make a bucket private again”](#make-a-bucket-private-again) Click **Make private** in the bucket’s settings, or set the ACL back: ```sh aws s3api put-bucket-acl --bucket my-app-assets --acl private --endpoint-url $EP ``` ## Block Public Access [Section titled “Block Public Access”](#block-public-access) Block Public Access is a safety switch that overrides everything else: while it’s on, nothing in the bucket can be read anonymously, whatever the ACLs or [bucket policy](/buckets/policies/) say. * Turning it on makes public ACLs and public policy statements stop working straight away. * While it’s on, a bucket policy that grants access to everyone (`"Principal": "*"` not limited to certain IP addresses) is refused. * Manage it in the bucket’s settings, or with `put-public-access-block`, `get-public-access-block` and `delete-public-access-block` (Admin keys). ```sh aws s3api put-public-access-block --bucket my-app-uploads --endpoint-url $EP \ --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true ``` `get-bucket-policy-status` tells you whether a bucket is public through its ACL or its policy. ## ACLs [Section titled “ACLs”](#acls) Hive Buckets supports the canned ACLs **`private`** and **`public-read`**, on buckets and objects. `x-amz-grant-*` headers are accepted only when they amount to one of those two. Other canned ACLs and grants to other accounts aren’t supported; use a [bucket policy](/buckets/policies/) to give other access keys access. ## HTML and SVG files [Section titled “HTML and SVG files”](#html-and-svg-files) For your security, HTML and SVG files are served as **downloads** (`Content-Disposition: attachment`) from public links and presigned URLs, so a browser saves them instead of displaying them. This stops a bucket from being used to run scripts on a DockHive address. Static website hosting from a bucket isn’t available yet (`PutBucketWebsite` returns `NotImplemented`); it’s coming later. To host a site today, deploy it as an [app](/apps/guides/static-sites/) and keep large media in a bucket. # Quickstart: your first bucket > Create a Hive Buckets bucket in the console, create an access key, and upload a file with the AWS CLI. This takes about three minutes. You need a [DockHive account](/getting-started/create-account/) and the [AWS CLI](https://aws.amazon.com/cli/) installed. ## 1. Create a bucket [Section titled “1. Create a bucket”](#1-create-a-bucket) 1. In the [console](https://console.dockhive.io), open **Hive Buckets** and click **Create bucket**. 2. Enter a **Bucket name**, for example `my-app-uploads`. Names are unique across DockHive: 3-63 characters, lowercase letters, numbers, hyphens and dots. 3. Pick a **Region** close to your users. See [Endpoints and regions](/buckets/endpoints/). 4. Leave **Visibility** on **Private** (you can change it later) and click **Create bucket**. ## 2. Create an access key [Section titled “2. Create an access key”](#2-create-an-access-key) 1. Open **Hive Buckets → Access keys** and click **Create access key**. 2. Give it a **Name** (for example `laptop`), choose **All buckets** or **Selected buckets**, and pick a **Permission**: **Read & write** is right for most apps. 3. Click **Create key** and copy the **Access key ID** (it starts with `DH`) and the **Secret access key**. **The secret is shown only once.** ## 3. Configure the AWS CLI [Section titled “3. Configure the AWS CLI”](#3-configure-the-aws-cli) ```sh aws configure --profile dockhive # AWS Access Key ID: DH... # AWS Secret Access Key: # Default region name: auto # Default output format: json aws configure set s3.addressing_style path --profile dockhive ``` ## 4. Upload, list and download [Section titled “4. Upload, list and download”](#4-upload-list-and-download) ```sh export AWS_PROFILE=dockhive EP=https://s3.dockhive.io echo "hello from Hive Buckets" > hello.txt aws s3 cp hello.txt s3://my-app-uploads/hello.txt --endpoint-url $EP aws s3 ls s3://my-app-uploads/ --endpoint-url $EP aws s3 cp s3://my-app-uploads/hello.txt - --endpoint-url $EP ``` Your file also shows up in the bucket’s file browser in the console. ## Next steps [Section titled “Next steps”](#next-steps) * Use your bucket from code: [Python and JavaScript](/buckets/sdks/), [Laravel and Django](/buckets/frameworks/) * Share a file for a limited time with a [presigned URL](/buckets/presigned-urls/) * [Make a bucket public](/buckets/public-access/) for images and downloads # S3 compatibility > Which parts of the Amazon S3 API Hive Buckets supports - authentication, objects, multipart, checksums, tagging, ACLs, versioning, object lock, policies, CORS and lifecycle - and what isn't available. Hive Buckets speaks the Amazon S3 API, so standard S3 tools and SDKs work with their default settings once you set the [endpoint, region `auto` and path style](/buckets/endpoints/). ## Authentication [Section titled “Authentication”](#authentication) * **AWS Signature Version 4**, in the `Authorization` header or as a [presigned URL](/buckets/presigned-urls/) (up to 7 days). * Streaming uploads: `aws-chunked` signed and unsigned payloads, with signed or unsigned trailers. * **Browser POST policy** uploads. * Signing region `auto` (also accepted: `dockhive`, `us-east-1`). * Signature Version 2 isn’t supported. ## Supported features [Section titled “Supported features”](#supported-features) | Area | What’s supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Buckets | Create, list, head, delete (when empty), `GetBucketLocation` | | Objects | `PutObject`, `GetObject` (including ranges and conditional requests), `HeadObject`, `CopyObject`, `DeleteObject`, `DeleteObjects` (up to 1,000 keys), `ListObjects`, `ListObjectsV2` | | Multipart uploads | Create, upload part, upload part copy, complete, abort, `ListMultipartUploads`, `ListParts` | | Checksums | `Content-MD5`, `x-amz-content-sha256`, and flexible checksums: CRC32, CRC32C, CRC64NVME, SHA-1, SHA-256 (`GetObject` with `ChecksumMode=ENABLED` returns the stored checksum) | | Object tagging | `PutObjectTagging`, `GetObjectTagging`, `DeleteObjectTagging` | | Bucket tagging | Up to 50 tags per bucket | | ACLs | Canned `private` and `public-read` on buckets and objects. See [Public and private buckets](/buckets/public-access/#acls) | | Block Public Access | `Put`/`Get`/`DeletePublicAccessBlock`, `GetBucketPolicyStatus` | | Versioning | Enable and suspend, `ListObjectVersions`, version ids on reads, copies, tags, ACLs and deletes. See [Versioning](/buckets/versioning/) | | Object lock | Default retention, `GOVERNANCE` and `COMPLIANCE` retention, legal holds, governance bypass. See [Object lock](/buckets/versioning/#object-lock) | | Bucket policies | A subset of the policy language. See [Bucket policies](/buckets/policies/) | | CORS | `Put`/`Get`/`DeleteBucketCors`. See [CORS](/buckets/cors/) | | Lifecycle | Expiration, noncurrent version expiration, expired delete markers, aborting unfinished multipart uploads. See [Lifecycle rules](/buckets/lifecycle/) | ## Not available [Section titled “Not available”](#not-available) | Feature | Notes | | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Virtual-hosted style (`.s3.dockhive.io`) | Not available yet. Use path style. | | Static website hosting | Coming later. `PutBucketWebsite` returns `NotImplemented`. HTML and SVG files are served as downloads; see [HTML and SVG files](/buckets/public-access/#html-and-svg-files). | | Storage classes and lifecycle transitions | There’s one storage class. | | Replication configuration | Not needed for durability: your files are encrypted and stored across multiple regions, so a whole region can go down without losing data. | | MFA delete | Not supported. Use [object lock](/buckets/versioning/#object-lock) to protect files. | | IAM users, roles and ARNs as principals | Use Hive Buckets [access keys](/buckets/access-keys/) and [bucket policies](/buckets/policies/). | | ACL grants beyond `private` and `public-read` | Use bucket policies. | Unsupported operations return the standard S3 error `NotImplemented`. ## Behavior to know about [Section titled “Behavior to know about”](#behavior-to-know-about) * `GetObjectLegalHold` returns `OFF` for a version that never had a legal hold (Amazon S3 returns an error). * Access keys from other DockHive accounts can’t read through public-read ACLs; give them access with a bucket policy. * Very high request rates are slowed down with `503 SlowDown`. SDKs retry these automatically. # Python and JavaScript SDKs > Use Hive Buckets from Python with boto3 and from Node.js with the AWS SDK for JavaScript v3, including uploads, downloads, listing and presigned URLs. Any AWS S3 SDK works with Hive Buckets. Set three things: the **endpoint**, the region **`auto`** and **path-style** addressing. Keep your [access key](/buckets/access-keys/) in environment variables: ```sh export HIVE_BUCKETS_ENDPOINT=https://s3.dockhive.io export HIVE_BUCKETS_ACCESS_KEY_ID=DH... export HIVE_BUCKETS_SECRET_ACCESS_KEY=... ``` ## Create a client [Section titled “Create a client”](#create-a-client) * Python (boto3) ```sh pip install boto3 ``` ```python import os import boto3 from botocore.config import Config s3 = boto3.client( "s3", endpoint_url=os.environ["HIVE_BUCKETS_ENDPOINT"], aws_access_key_id=os.environ["HIVE_BUCKETS_ACCESS_KEY_ID"], aws_secret_access_key=os.environ["HIVE_BUCKETS_SECRET_ACCESS_KEY"], region_name="auto", config=Config(signature_version="s3v4", s3={"addressing_style": "path"}), ) ``` * JavaScript (AWS SDK v3) ```sh npm install @aws-sdk/client-s3 @aws-sdk/lib-storage @aws-sdk/s3-request-presigner ``` ```js import { S3Client } from '@aws-sdk/client-s3'; export const s3 = new S3Client({ endpoint: process.env.HIVE_BUCKETS_ENDPOINT, region: 'auto', forcePathStyle: true, credentials: { accessKeyId: process.env.HIVE_BUCKETS_ACCESS_KEY_ID, secretAccessKey: process.env.HIVE_BUCKETS_SECRET_ACCESS_KEY, }, }); ``` ## Upload, download, list and delete [Section titled “Upload, download, list and delete”](#upload-download-list-and-delete) * Python (boto3) ```python from boto3.s3.transfer import TransferConfig BUCKET = "my-app-uploads" # Small object from memory s3.put_object(Bucket=BUCKET, Key="notes/hello.txt", Body=b"hello", ContentType="text/plain") # Any size file from disk: multipart is used automatically above the threshold transfer = TransferConfig(multipart_threshold=64 * 1024**2, multipart_chunksize=16 * 1024**2) s3.upload_file("video.mp4", BUCKET, "videos/video.mp4", Config=transfer) # Download obj = s3.get_object(Bucket=BUCKET, Key="notes/hello.txt") print(obj["Body"].read()) s3.download_file(BUCKET, "videos/video.mp4", "copy.mp4") # List (paginated) for page in s3.get_paginator("list_objects_v2").paginate(Bucket=BUCKET, Prefix="videos/"): for item in page.get("Contents", []): print(item["Key"], item["Size"]) # Delete s3.delete_object(Bucket=BUCKET, Key="notes/hello.txt") ``` * JavaScript (AWS SDK v3) ```js import { createReadStream } from 'node:fs'; import { PutObjectCommand, GetObjectCommand, DeleteObjectCommand, paginateListObjectsV2, } from '@aws-sdk/client-s3'; import { Upload } from '@aws-sdk/lib-storage'; import { s3 } from './s3.js'; const Bucket = 'my-app-uploads'; // Small object await s3.send(new PutObjectCommand({ Bucket, Key: 'notes/hello.txt', Body: 'hello', ContentType: 'text/plain' })); // Any size file: Upload splits it into 16 MB parts await new Upload({ client: s3, params: { Bucket, Key: 'videos/video.mp4', Body: createReadStream('video.mp4') }, partSize: 16 * 1024 * 1024, queueSize: 4, }).done(); // Download const obj = await s3.send(new GetObjectCommand({ Bucket, Key: 'notes/hello.txt' })); console.log(await obj.Body.transformToString()); // List (paginated) for await (const page of paginateListObjectsV2({ client: s3 }, { Bucket, Prefix: 'videos/' })) { for (const item of page.Contents ?? []) console.log(item.Key, item.Size); } // Delete await s3.send(new DeleteObjectCommand({ Bucket, Key: 'notes/hello.txt' })); ``` Keep part sizes at 100 MB or less. The SDK defaults (8 MB for boto3, 5 MB for `Upload`) are fine. See [Limits](/buckets/limits/). ## Presigned URLs [Section titled “Presigned URLs”](#presigned-urls) Give someone a link that works for a limited time, up to 7 days, without sharing your key. See [Presigned URLs and browser uploads](/buckets/presigned-urls/) for uploads and POST forms. * Python (boto3) ```python url = s3.generate_presigned_url( "get_object", Params={"Bucket": "my-app-uploads", "Key": "reports/report.pdf"}, ExpiresIn=3600, # seconds; at most 604800 (7 days) ) ``` * JavaScript (AWS SDK v3) ```js import { GetObjectCommand } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; const url = await getSignedUrl( s3, new GetObjectCommand({ Bucket: 'my-app-uploads', Key: 'reports/report.pdf' }), { expiresIn: 3600 }, // seconds; at most 604800 (7 days) ); ``` ## Other languages [Section titled “Other languages”](#other-languages) Go (`aws-sdk-go-v2`, set `UsePathStyle: true`), PHP (`aws/aws-sdk-php`, `use_path_style_endpoint`), Java, .NET, Ruby and Rust SDKs work the same way: endpoint, region `auto`, path style, your `DH...` key. # Versioning and object lock > Keep every version of your files with Hive Buckets versioning, restore old versions, and make files undeletable with object lock retention and legal holds. ## Versioning [Section titled “Versioning”](#versioning) With versioning on, every upload to an existing key keeps the old file as a **noncurrent version**, and deleting a file adds a **delete marker** instead of removing data. You can list, download and restore any version. ### Turn it on [Section titled “Turn it on”](#turn-it-on) Versioning needs an **Admin** key. Once on, it can be **suspended** but never turned fully off. ```sh EP=https://s3.dockhive.io aws s3api put-bucket-versioning --bucket my-app-uploads \ --versioning-configuration Status=Enabled --endpoint-url $EP aws s3api get-bucket-versioning --bucket my-app-uploads --endpoint-url $EP ``` Use `Status=Suspended` to stop creating new versions; existing versions are kept. ### Work with versions [Section titled “Work with versions”](#work-with-versions) ```sh # List versions and delete markers, newest first aws s3api list-object-versions --bucket my-app-uploads --prefix reports/ --endpoint-url $EP # Download an old version aws s3api get-object --bucket my-app-uploads --key reports/report.pdf \ --version-id old-report.pdf --endpoint-url $EP # Restore it: copy the old version over the current one aws s3api copy-object --bucket my-app-uploads --key reports/report.pdf \ --copy-source "my-app-uploads/reports/report.pdf?versionId=" --endpoint-url $EP # Delete one version permanently (deleting a delete marker brings the file back) aws s3api delete-object --bucket my-app-uploads --key reports/report.pdf \ --version-id --endpoint-url $EP ``` * `GET` and `HEAD` without a version id return the current version, or `404 NoSuchKey` if the current version is a delete marker. * Copy, tagging, ACL, retention and legal hold requests accept a `versionId`. * **Every stored version counts as storage**, including noncurrent ones. Use a [lifecycle rule](/buckets/lifecycle/) to expire old versions automatically. * A multipart upload gets its version when it starts: an upload started while versioning was on completes as a new version even if versioning was suspended in the meantime. ## Object lock [Section titled “Object lock”](#object-lock) Object lock makes versions impossible to delete or overwrite for a period (**retention**) or until you remove a **legal hold**. Use it for backups, audit logs and records you must keep. ### Turn it on [Section titled “Turn it on”](#turn-it-on-1) Object lock needs versioning. Turn it on when you create the bucket, or later on a bucket with versioning **Enabled**. **It can’t be turned off**, and versioning can no longer be suspended. ```sh # New bucket with object lock (needs an Admin key for all buckets) aws s3api create-bucket --bucket my-backups --object-lock-enabled-for-bucket --endpoint-url $EP # Default retention for new uploads: 30 days, governance mode aws s3api put-object-lock-configuration --bucket my-backups --endpoint-url $EP \ --object-lock-configuration '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"GOVERNANCE","Days":30}}}' ``` ### Retention modes [Section titled “Retention modes”](#retention-modes) | Mode | Who can shorten or remove it | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `GOVERNANCE` | An **Admin** key of the bucket owner, by sending `x-amz-bypass-governance-retention: true` (`--bypass-governance-retention` in the CLI). Nobody else. | | `COMPLIANCE` | **Nobody**, not even you. The retention can only be extended. Choose it only when you’re sure. | Set retention on one version, or when uploading: ```sh aws s3api put-object-retention --bucket my-backups --key db/2026-10-11.sql.gz --endpoint-url $EP \ --retention '{"Mode":"COMPLIANCE","RetainUntilDate":"2027-10-11T00:00:00Z"}' aws s3api put-object --bucket my-backups --key db/today.sql.gz --body today.sql.gz --endpoint-url $EP \ --object-lock-mode GOVERNANCE --object-lock-retain-until-date 2026-12-31T00:00:00Z ``` ### Legal hold [Section titled “Legal hold”](#legal-hold) A legal hold blocks deletion of a version, with no end date, until it’s removed. It works independently of retention. **Read & write** keys can set and remove it. ```sh aws s3api put-object-legal-hold --bucket my-backups --key db/2026-10-11.sql.gz \ --legal-hold Status=ON --endpoint-url $EP aws s3api put-object-legal-hold --bucket my-backups --key db/2026-10-11.sql.gz \ --legal-hold Status=OFF --endpoint-url $EP ``` ### What’s enforced [Section titled “What’s enforced”](#whats-enforced) * A locked version can’t be deleted or overwritten, by S3 tools, the console, the API or lifecycle rules. Deleting the bucket fails while it holds locked versions. * Adding a delete marker is always allowed, so a “deleted” file disappears from listings but the locked version stays and can be restored. * Locked versions are billed as storage until they can be deleted. * MFA delete isn’t supported. # Changelog > Recent DockHive launches and changes. ## November 2026 [Section titled “November 2026”](#november-2026) ### HivePods see their own limits [Section titled “HivePods see their own limits”](#hivepods-see-their-own-limits) *2026-11-04.* * **`free`, `top` and `nproc` show your pod’s own memory and CPUs**, not the whole machine’s, so build tools, databases and language runtimes size themselves for the pod. `df /home/hivepod/data` and `df /home/hivepod/projects` show each folder’s size. See [Your pod’s limits](/hivepods/environment/#your-pods-limits). * **Disk sizes are hard limits**: the pod’s folders can’t grow past its size; writing more fails with *No space left on device*. See [Disk usage](/hivepods/environment/#disk-usage). * **A clearer page on a pod’s address**: when nothing is listening, visitors see *This pod is running, but nothing is answering on port N* instead of a generic error, and stopped or starting pods say so. See [Connect](/hivepods/connect/). ## October 2026 [Section titled “October 2026”](#october-2026) ### Automatic database backups, users and roles, container images, approvals and larger apps [Section titled “Automatic database backups, users and roles, container images, approvals and larger apps”](#automatic-database-backups-users-and-roles-container-images-approvals-and-larger-apps) *2026-10-29.* * **Automatic database backups**: daily or weekly, at the hour you choose, keeping up to 30. Backups can now be **downloaded** too. See [Backups and restore](/databases/backups/). * **Database users and password rotation**: rotate a database’s password in one click (MySQL can keep the old one working for a grace period), and add users with **read-only**, **read/write** or **admin** roles to PostgreSQL, MySQL and MariaDB databases. See [Users and passwords](/databases/users-and-passwords/). * **Deploy a container image**: deploy a prebuilt image from any registry, pinned to its digest, with an optional private-registry login. See [Deploy a container image](/apps/deploy-an-image/). * **Approvals for push to deploy**: make pushes wait for a workspace owner or admin to approve them. See [Push to deploy](/apps/push-to-deploy/#require-approval). * **Larger app sizes**: run apps with 1 GB, 2 GB or 4 GB of memory and up to 2 vCPU, at $2 per vCPU-month while running. See [App sizes](/apps/manage/#choose-an-app-size). * **Team audit log**: owners and admins can see invitations, role changes, removals, API keys and member access, filter them and download them as CSV. See [Team audit log](/security/audit-log/). ### New regions: India (Mumbai) and United States (Virginia) [Section titled “New regions: India (Mumbai) and United States (Virginia)”](#new-regions-india-mumbai-and-united-states-virginia) *2026-10-25.* DockHive now runs in ten regions: `us`, `eu`, `asia`, `africa`, `de`, `ng`, `abuja`, `pt` and, newest, `mumbai` (India, Mumbai) and `virginia` (United States, Virginia). Apps, databases, n8n workspaces, HivePods, tunnels, Hive Realtime, Hive Functions and Hive Buckets are available there too: pick `mumbai` or `virginia` in the console, use `--region mumbai` or `--region virginia` with `hivepod` or `dockhive`, or send `X-Region: mumbai` to the API. Hive Buckets adds the regional endpoints `https://s3-mumbai.dockhive.io` and `https://s3-virginia.dockhive.io`, and Hive Realtime the hosts `realtime-mumbai.dockhive.io` and `realtime-virginia.dockhive.io`. See [Regions](/getting-started/regions/). ### $1 card check for Free accounts [Section titled “$1 card check for Free accounts”](#1-card-check-for-free-accounts) *2026-10-23.* Free Tier accounts confirm a card once, with a one-time $1 check, before creating anything. You can still look around the console first. See [Create an account](/getting-started/create-account/#verify-a-card). ### Hive Functions [Section titled “Hive Functions”](#hive-functions) *2026-10-20.* **Hive Functions** is live: run code at `https://.fn.dockhive.app` on every request or on a schedule, written in Rust, Go, TypeScript, JavaScript or Python. Per-function storage, outbound HTTP, secrets, logs and one-click rollback to the last 10 versions. Every plan, including Free, has a monthly allowance. Start with the [quickstart](/hive-functions/quickstart/). ### Hive Realtime [Section titled “Hive Realtime”](#hive-realtime) *2026-10-18.* **Hive Realtime** is live: realtime messaging for live updates, chat, presence and notifications, compatible with Pusher libraries (`pusher-js`, Laravel Echo and the Pusher server libraries). Moving from Pusher is a change of host and keys. Start with the [quickstart](/realtime/quickstart/) or [move from Pusher](/realtime/migrate-from-pusher/). ### HivePods App Marketplace and lower pod prices [Section titled “HivePods App Marketplace and lower pod prices”](#hivepods-app-marketplace-and-lower-pod-prices) *2026-10-12.* Start a pod from a ready-made app: WordPress, Uptime Kuma and hundreds more, or any image from Docker Hub. See [App Marketplace](/hivepods/app-marketplace/). Pod compute beyond your plan’s allowance now costs **$2 per vCPU-month**, billed by the hour, with memory included. See [Usage and overage](/billing/usage/). ### Hive Buckets: S3-compatible object storage [Section titled “Hive Buckets: S3-compatible object storage”](#hive-buckets-s3-compatible-object-storage) *2026-10-11.* **Hive Buckets** is live: S3-compatible object storage at `https://s3.dockhive.io`, with regional endpoints. Use the AWS CLI, boto3, the AWS SDK for JavaScript, Laravel, Django or any S3 tool. Buckets are private by default, with public buckets, presigned URLs, CORS, versioning, object lock, bucket policies and lifecycle rules. Your files are encrypted and stored across multiple regions, so a whole region can go down without losing data. No request fees, and uploads are free. Start with the [quickstart](/buckets/quickstart/) and see [Pricing and allowances](/buckets/pricing/). ### New region: Portugal (Lisbon) [Section titled “New region: Portugal (Lisbon)”](#new-region-portugal-lisbon) *2026-10-11.* DockHive now runs in seven regions: `us`, `eu`, `asia`, `africa`, `de`, `ng` and, newest, `pt` (Portugal, Lisbon). Apps, databases, n8n workspaces, HivePods and tunnels are available there too: pick `pt` in the console, use `--region pt` with `hivepod` or `dockhive expose`, or send `X-Region: pt` to the API. See [Regions](/getting-started/regions/). ### API host is now api.dockhive.io [Section titled “API host is now api.dockhive.io”](#api-host-is-now-apidockhiveio) *2026-10-10.* API host is now api.dockhive.io: all API requests go to `https://api.dockhive.io/api/v1`. The old host `gw.dockhive.sh` stops accepting public API calls on **2026-10-17**, so update any scripts, CI jobs and integrations that call it. Update your CLIs too: `hivepod` 0.4.3 and `dockhive` 0.2.5 use the new host by default and move a saved old address over for you. See [Using the API](/api/). ### New region: Nigeria (Lagos) [Section titled “New region: Nigeria (Lagos)”](#new-region-nigeria-lagos) *2026-10-10.* DockHive now runs in six regions: `us`, `eu`, `asia`, `africa`, `de` and, newest, `ng` (Nigeria, Lagos). Apps, databases, n8n workspaces, HivePods and tunnels are available there too: pick `ng` in the console, use `--region ng` with `hivepod` or `dockhive expose`, or send `X-Region: ng` to the API. See [Regions](/getting-started/regions/). ### HivePods for CI/CD [Section titled “HivePods for CI/CD”](#hivepods-for-cicd) * **Background jobs**: `hivepod exec --detach` runs long commands in a pod, for up to 6 hours. They keep running when you disconnect. `hivepod job status --follow` streams a job and exits with its exit code, so it’s ready for CI. See [CI/CD to a pod](/hivepods/ci-cd/). * **Temporary files on the data volume**: `TMPDIR` and the npm and pip caches now live in `/home/hivepod/data`, so pip, npm and native builds no longer fail on `/tmp`. * **Real limits inside a pod**: run `hivepod-info` to see your pod’s CPU, memory and disk. `free` and `df` show the whole machine. `hivepod status` shows disk used against the pod’s size. * **Disk sizes are enforced**: a pod more than 10% over its size is stopped until you free space. See [Disk usage](/hivepods/environment/#disk-usage). * **`~/.ssh` is kept** when the pod is re-created, and the CLI says clearly what applying settings resets. See [Files, limits and environment](/hivepods/environment/). * **`hivepod deploy --region`** puts a new app in the region you choose, for example next to its pod. * The CLI retries temporary errors on safe requests, and error messages now include the HTTP status and a request id. ### Database firewall: default deny, visible and app-aware [Section titled “Database firewall: default deny, visible and app-aware”](#database-firewall-default-deny-visible-and-app-aware) Databases are never reachable before their firewall is in place, and DockHive re-checks every database’s rules every minute. A database that any internet address can reach now carries a red **Open to the internet** badge in the console, `hivepod db list` and the MCP tools. You can allow your own apps and pods in the database’s region by name (they keep access when redeployed), manage the firewall with `hivepod db firewall`, and let AI agents manage it through MCP. Viewers and read-only API keys can no longer read database passwords. See [Firewall and allowlist](/databases/firewall/). ### Pay as you go [Section titled “Pay as you go”](#pay-as-you-go) A new way to pay with no monthly fee: top up prepaid credits and pay only for usage beyond the free allowances. See [Pay as you go](/billing/pay-as-you-go/). ### New documentation [Section titled “New documentation”](#new-documentation) These docs replace the old documentation. Hive proposals, the node-provider program and Seacure Weave are retired; see [Deprecated and legacy](/legacy/). ### Five regions [Section titled “Five regions”](#five-regions) DockHive now runs in five regions: `us`, `eu`, `asia`, `africa` and, newest, `de` (Frankfurt). Apps, databases, n8n workspaces, HivePods and tunnels are available in all of them, and your plan’s limits count across all regions combined. See [Regions](/getting-started/regions/). ### Custom domain protection [Section titled “Custom domain protection”](#custom-domain-protection) A custom domain can belong to only one app or pod, is only routed after its TXT record checks out, and an unverified claim lapses after 72 hours. Root domains use ALIAS, ANAME or flattened CNAME records. See [Custom domains](/apps/custom-domains/). ### Branded error pages [Section titled “Branded error pages”](#branded-error-pages) Addresses that aren’t connected to anything now show *Nothing is live here*, and apps that aren’t responding show *This app is unreachable right now*, across apps, workspaces, pods and tunnels. See what they mean in [Limits and troubleshooting](/apps/troubleshooting/). ### DockHive Tunnel v0.2 [Section titled “DockHive Tunnel v0.2”](#dockhive-tunnel-v02) * Automatic region failover that keeps your URL (`--no-failover` to opt out). * `dockhive doctor` checks your sign-in, regions and local app. * `--log` and `--log-level` for connection logs. * Sign in with an API key (`dockhive login --token`, `DOCKHIVE_TOKEN`). * Tunnels appear in the console under **Tunnels**. See [DockHive Tunnel](/tunnel/). ### Drone improvements [Section titled “Drone improvements”](#drone-improvements) Drone tells you when code isn’t a web app (and doesn’t charge build minutes for it), lists the environment variables your app needs, and can check your code before you deploy. ### Bandwidth metering [Section titled “Bandwidth metering”](#bandwidth-metering) Bandwidth is measured across apps, databases, n8n workspaces, HivePods and tunnels, with one allowance per plan. See [Usage, overage and bandwidth](/billing/usage/). ### Account security [Section titled “Account security”](#account-security) Email verification for every new account, bot protection on sign-up and sign-in, and API keys with read-only scope. See [Account security](/security/). ### Drone launch [Section titled “Drone launch”](#drone-launch) Drone, DockHive’s AI deploy agent, is live: pick it when you create an app and it reads your code, builds your app and deploys it, fixing problems along the way. See [Drone and frameworks](/apps/drone/). ### HivePods CLI and MCP [Section titled “HivePods CLI and MCP”](#hivepods-cli-and-mcp) The `hivepod` CLI deploys a folder with `hivepod deploy`, and `hivepod mcp` lets Claude Code, Cursor and other MCP clients deploy and manage DockHive for you. See [CLI and MCP](/cli/). ### Push to deploy [Section titled “Push to deploy”](#push-to-deploy) Turn on GitHub auto-deploy and every push to your branch goes live, with status on the commit. See [Push to deploy](/apps/push-to-deploy/). # Install the hivepod CLI > Install the hivepod CLI on macOS, Linux or Windows, sign in, and start deploying apps and managing HivePods from your terminal. `hivepod` is DockHive’s command-line tool. It deploys folders as apps, manages HivePods and their backups, and runs the [DockHive MCP server](/cli/mcp/) for AI coding tools. It needs Python 3.9 or later. ## Install [Section titled “Install”](#install) * macOS and Linux ```sh curl -fsSL https://dockhive.io/install.sh | sh ``` The script installs `hivepod` in `~/.hivepods` and adds `~/.hivepods/bin` to your PATH. Open a new terminal afterwards. * Windows (PowerShell) ```powershell irm https://dockhive.io/install.ps1 | iex ``` The script installs `hivepod` in `%USERPROFILE%\.hivepods` and adds it to your user PATH. * pipx / pip ```sh pipx install hivepods-cli ``` `pip install hivepods-cli` also works, but may put `hivepod` in a folder that isn’t on your PATH; `python3 -m hivepods_cli` always works. Check it: ```sh hivepod --version ``` To upgrade, run the install command again. ### Installer options [Section titled “Installer options”](#installer-options) | Variable | Meaning | | --------------------------- | ------------------------------------------------ | | `HIVEPODS_VERSION` | Install a specific version, for example `0.2.1`. | | `HIVEPODS_HOME` | Install somewhere other than `~/.hivepods`. | | `HIVEPODS_NO_MODIFY_PATH=1` | Don’t edit your shell profile (macOS and Linux). | | `PYTHON` | The Python 3.9+ interpreter to use. | No Python? On macOS run `xcode-select --install` (or `brew install python`); on Debian or Ubuntu, `sudo apt install python3 python3-venv`; on Windows, `winget install Python.Python.3.12`. ## Sign in [Section titled “Sign in”](#sign-in) ```sh hivepod login ``` Your browser opens the DockHive console. Approve the request and return to the terminal. Your email address must be verified. * **No browser on this machine?** `hivepod login --no-browser` signs in with your email and password (and a two-factor code if you use one). * **CI and servers:** create an [API key](/api/api-keys/) and set it in the environment. It’s used instead of a stored sign-in and never written to disk: ```sh export HIVEPODS_TOKEN=dh_pat_... ``` Sign out with `hivepod logout`. ## Configuration [Section titled “Configuration”](#configuration) Settings live in `~/.hivepods/config.yaml` (readable only by you). View and change them with: ```sh hivepod config list hivepod config set default_size small ``` | Environment variable | Meaning | | --------------------- | --------------------------------------------------------------------- | | `HIVEPODS_TOKEN` | Use an API key instead of the stored sign-in. | | `HIVEPODS_CONFIG_DIR` | Use another config folder (default `~/.hivepods`). | | `HIVEPODS_MCP_LOG` | Log level for the MCP server, written to stderr (for example `INFO`). | ## Next [Section titled “Next”](#next) * [Command reference](/cli/commands/) * [Deploy a folder with `hivepod deploy`](/cli/deploy/) * [Set up the MCP server](/cli/mcp/) # Command reference > Every hivepod CLI command with its options. Run `hivepod --help` for details on any command. Wherever a command takes a pod, you can use its name or id. ## Account [Section titled “Account”](#account) | Command | What it does | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `hivepod login [--no-browser] [-e EMAIL]` | Sign in to your DockHive account. | | `hivepod logout` | Sign out on this computer. | | `hivepod config list` | Show the current configuration. | | `hivepod config set KEY VALUE` | Set a configuration value, such as `default_size` or `region` (your default region for new pods and apps). | ## Apps [Section titled “Apps”](#apps) | Command | What it does | | ----------------------- | ------------------------------------------------------------------------- | | `hivepod deploy [PATH]` | Deploy a folder as an app with Drone. See [hivepod deploy](/cli/deploy/). | ## HivePods [Section titled “HivePods”](#hivepods) | Command | What it does | | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | `hivepod os [--all] [--family linux\|windows\|bsd]` | Operating systems you can launch. | | `hivepod list` | List your pods. | | `hivepod create [NAME]` | Create a pod: an interactive wizard, or pass `--os` to script it. | | `hivepod status POD` | Show a pod’s status, disk used against its size, and live metrics. | | `hivepod start POD` | Start a stopped pod. | | `hivepod stop POD` | Stop a running pod (your data stays). | | `hivepod restart POD` | Restart a pod. | | `hivepod suspend POD` | Suspend (pause) a running pod. | | `hivepod resume POD` | Resume a suspended pod. | | `hivepod connect POD` | Open an interactive terminal in a pod. | | `hivepod exec POD COMMAND...` | Run one command in a pod and print the output (up to 20 seconds). | | `hivepod exec --detach [--timeout S] [--follow] POD COMMAND...` | Run a command as a background job (up to 6 hours) and print its id. | | `hivepod jobs POD` | List a pod’s recent background jobs. | | `hivepod job status POD ID [--wait] [--follow]` | A job’s status and output. `--wait`/`--follow` wait for it to end and exit with its exit code (124 timed out, 130 cancelled). | | `hivepod job cancel POD ID` | Stop a running job and everything it started. | | `hivepod cp SRC DEST` | Copy files or folders to or from a pod (`POD:PATH` on one side). See [Copy files](/hivepods/connect/#copy-files). | | `hivepod logs POD [--tail N] [-f]` | Show (or follow) a pod’s logs. | | `hivepod env POD [KEY=VALUE ...] [--unset KEY] [--cmd "..."] [--apply [-y]]` | Show or change environment variables and the startup command. | | `hivepod apply POD [-y]` | Apply pending environment and startup-command changes. This re-creates the pod: only `/home/hivepod/data` and `/home/hivepod/projects` are kept. | | `hivepod rm POD [-y]` | Delete a pod permanently. Its backups are kept for 7 days so you can restore them into a new pod; the prompt says how many and until when. | `create` shows the estimated monthly vCPU-hours of the size and what your plan includes versus bills; see [What it costs](/hivepods/create/#what-it-costs). `create` options: | Option | Meaning | | ----------------------------------- | ------------------------------------------------------------------ | | `--os SLUG` | Operating system, for example `ubuntu-24.04`. | | `--size nano\|micro\|small\|medium` | Preset size (default `micro`). | | `--cpu N --ram 8g --disk 80g` | Custom size (all three needed). | | `--region R` | Region, for example `eu` (default: your `region` setting, if any). | | `--subdomain S` | The pod’s web address subdomain. | | `--env KEY=VALUE` | Environment variable (repeatable). | | `--cmd "..."` | Startup command. | Lifecycle commands (`start`, `stop`, `restart`, `suspend`, `resume`, `apply`, `rm`) wait until done; add `--no-wait` to return immediately, or `--timeout SECONDS` to change how long they wait. ## Backups [Section titled “Backups”](#backups) | Command | What it does | | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `hivepod backup create POD [--name LABEL] [--description TEXT]` | Back up a pod’s data and projects folders. | | `hivepod backup list [POD]` | List backups. | | `hivepod backup list --deleted` | List backups of deleted pods and the date each is kept until (7 days after the delete). | | `hivepod backup restore BACKUP_ID NAME [--subdomain S] [--size T]` | Create a new pod from a backup, including a deleted pod’s backup while it is kept. | | `hivepod backup rm BACKUP_ID [-y]` | Delete a backup. | ## Databases [Section titled “Databases”](#databases) | Command | What it does | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | | `hivepod db list` | List your databases; the firewall column flags any that are **open to the internet**. | | `hivepod db info DB` | A database’s details and firewall state (never the password). | | `hivepod db firewall DB` | Its firewall rules, and the addresses app/pod rules use right now. | | `hivepod db firewall DB allow IP_OR_CIDR` | Allow an IPv4 address or range. | | `hivepod db firewall DB allow --app ID` / `--pod NAME` / `--all-apps` / `--all-pods` | Allow your apps or pods in the database’s region. | | `hivepod db firewall DB remove RULE_ID` | Remove a rule. | | `hivepod db firewall DB deny-all` | Close it: remove `0.0.0.0/0` rules and set the default to deny. | | `hivepod db firewall DB open [--yes]` | Open it to the whole internet (asks first; not recommended). | `DB` is a database’s name or id. See [Firewall and allowlist](/databases/firewall/). ## MCP [Section titled “MCP”](#mcp) | Command | What it does | | ---------------------------- | -------------------------------------------------------------------- | | `hivepod mcp` | Run the DockHive MCP server over stdio. See [MCP server](/cli/mcp/). | | `hivepod mcp --print-config` | Print ready-made config snippets for Claude, Cursor and Windsurf. | # hivepod deploy > Deploy a local folder to DockHive with one command. Options, ignore files, secrets and output. `hivepod deploy` packs up a folder and deploys it with Drone, DockHive’s AI deploy agent. Drone reads your code, builds your app and deploys it, fixing problems along the way. ```sh hivepod deploy # the current folder hivepod deploy ./web # another folder ``` ## Options [Section titled “Options”](#options) | Option | Meaning | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--name NAME` | Name for a new app. | | `--env KEY=VALUE` | Set an environment variable (repeatable). | | `--root SUBDIR` | Deploy a subfolder of the upload (for monorepos). | | `--framework ID` | Use a framework preset instead of Drone, for example `nextjs` or `static`. See [Drone and frameworks](/apps/drone/#framework-presets). | | `--new` | Create a new app instead of updating the one linked to this folder. | | `--app ID` | Deploy to a specific existing app. | | `--region R` | Region for a new app, for example `eu`. Put an app in the same region as the pod or database it talks to. Default: your `region` setting (`hivepod config set region eu`), else DockHive’s default region. | | `--no-wait` | Return right after uploading; the build continues in the background. | | `--timeout SECONDS` | How long to wait for the deploy (default 900). | | `-v`, `--verbose` | Show the full build log. | ## Redeploys [Section titled “Redeploys”](#redeploys) The first deploy links the folder to the new app. Running `hivepod deploy` again from the same folder updates the same app, in the same region. Use `--new` for a separate app. An app can’t move regions. If you pass `--region` and the folder’s app is in another region, the deploy stops and tells you which region it’s in. Deploy with that region, or add `--new` to create a new app in the region you asked for. The output shows the region the app is in. ## What’s uploaded [Section titled “What’s uploaded”](#whats-uploaded) * `.gitignore` and `.dockhiveignore` in the folder’s root are respected (`*`, `**`, `!negation` and so on). * Version control, dependency and cache folders are always left out, as are `dist/` and `build/` folders over 20 MB. * **Secrets are never uploaded**, even if your ignore files don’t mention them: `.env` files (except `.env.example`, `.env.sample` and `.env.template`), `*.pem`, `*.key`, SSH keys, `*.p12` and `*.pfx`. Pass secrets with `--env` instead. The upload is limited to 50 MB compressed. If it’s too large, add folders you don’t need to `.dockhiveignore`. ## Output [Section titled “Output”](#output) ```text ✓ Uploaded 42 files (1.2 MB) — deploying my-app left out: node_modules, .env drone Reading your code drone Building your app ✓ Live https://brave-space-k3x9.dockhive.app ``` If the deploy fails, the CLI prints Drone’s summary, any environment variables your app needs (“Deploy again with –env NAME=value for each”) and the last lines of the build log. If the folder isn’t a web app (for example a command-line tool or a library), you’ll see *Not deployable as an app* with suggestions. Nothing was built, so no build minutes were used. See [When Drone can’t deploy your code](/apps/drone/#when-drone-cant-deploy-your-code). # MCP server > Let Claude Code, Cursor, Windsurf, Claude Desktop and other MCP clients deploy apps and manage HivePods and databases on DockHive with hivepod mcp. The `hivepod` CLI includes an [MCP](https://modelcontextprotocol.io) server, so AI coding tools can deploy your code and manage your DockHive resources for you. Ask your assistant something like *“Deploy this folder to DockHive”* and it uses Drone to get it live. ## Before you start [Section titled “Before you start”](#before-you-start) 1. [Install the CLI](/cli/). 2. Sign in: `hivepod login`. The MCP server uses this sign-in (or `HIVEPODS_TOKEN`, if set). ## Add it to your tool [Section titled “Add it to your tool”](#add-it-to-your-tool) Run `hivepod mcp --print-config` to print ready-made snippets with the full path to `hivepod` filled in. * Claude Code ```sh claude mcp add dockhive -- hivepod mcp ``` To make it available in every project: ```sh claude mcp add --scope user dockhive -- hivepod mcp ``` If `hivepod` isn’t on your PATH, use its full path, for example `~/.hivepods/bin/hivepod`. * Cursor Add this to `~/.cursor/mcp.json`: ```json { "mcpServers": { "dockhive": { "command": "/Users/you/.hivepods/bin/hivepod", "args": ["mcp"] } } } ``` * Claude Desktop Open **Settings → Developer → Edit Config** and add to `claude_desktop_config.json`: ```json { "mcpServers": { "dockhive": { "command": "/Users/you/.hivepods/bin/hivepod", "args": ["mcp"] } } } ``` * Windsurf Add this to `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { "dockhive": { "command": "/Users/you/.hivepods/bin/hivepod", "args": ["mcp"] } } } ``` Desktop apps don’t see your shell’s PATH, so use the full path to `hivepod`. With the installer it’s `~/.hivepods/bin/hivepod` on macOS and Linux, and `%USERPROFILE%\.hivepods\cli\Scripts\hivepod.exe` on Windows. Any other MCP client that can run a local stdio server works the same way. ## Tools [Section titled “Tools”](#tools) | Tool | What it does | | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `deploy` | Deploy a folder or a GitHub repository with Drone and return the live URL. A new app can be placed in a `region`. | | `deployment_status` | Status, URL and Drone’s progress for a deployment. | | `build_logs` | A deployment’s build log. | | `list_apps` | Your apps with their addresses, regions and domains. | | `app_logs` | An app’s runtime logs. | | `set_env` | Set or unset environment variables (values are write-only), optionally redeploying. | | `redeploy` | Rebuild an app from its repository. | | `rollback` | Put an earlier version back live. | | `add_domain`, `domain_status`, `remove_domain` | Custom domains for apps. | | `list_pods`, `create_pod`, `exec_in_pod`, `delete_pod` | HivePods. `exec_in_pod` is for quick commands (about 20 seconds). | | `start_pod_job`, `pod_job_status`, `cancel_pod_job` | Long-running commands in a pod as background jobs (builds, installs, tests). | | `pod_upload`, `pod_download` | Copy files and folders to or from a pod’s `projects` and `data` folders. | | `list_databases`, `create_database`, `database_connection` | Databases, with their firewall state; a database open to the internet is flagged. | | `database_firewall`, `database_firewall_allow`, `database_firewall_remove`, `database_firewall_default` | A database’s [firewall](/databases/firewall/): list rules, allow an IPv4 address, an app or a pod, remove a rule, set the default (opening to the internet needs `confirm: true`). | | `usage_and_cost` | Your plan, usage and estimated bill. | | `delete_app` | Delete an app. | Every app tool takes `app_id`: the app’s id as `list_apps` and `deploy` return it (such as `my-shop`) or its name (such as `My Shop`). `project_id` is accepted as another name for the same field. `create_pod` also returns the estimated monthly vCPU-hours of the size and how many your plan includes versus bills as overage. Destructive tools (`delete_app`, `delete_pod`) only act when called with `confirm: true`; otherwise they describe what would be deleted. Deleting a pod keeps its backups for 7 days, and `delete_pod` says how many and until when; restore them into a new pod with `hivepod backup restore` before then. ## Troubleshooting [Section titled “Troubleshooting”](#troubleshooting) * **“Not signed in to DockHive”**: run `hivepod login` in a terminal, then retry. * **The tool doesn’t appear**: check the full path to `hivepod`, then restart your MCP client. * **A deploy upload fails**: the error says what happened. *“timed out on this machine”* means your connection was too slow or was interrupted; leave out large folders with a `.dockhiveignore` file. *“took too long to process”* means DockHive didn’t reply in time; if the deployment had started anyway, the tool finds it and follows it. *“temporarily unavailable”* is only shown when DockHive is actually down. Uploads report progress while they’re sent. * **See what’s happening**: set `HIVEPODS_MCP_LOG=INFO` in the server’s environment; logs go to stderr. # Databases > Managed PostgreSQL, MySQL, MariaDB, Redis and RabbitMQ on DockHive, with TLS on by default, an IP allowlist and on-demand backups. DockHive runs managed databases in every [region](/getting-started/regions/). Each database gets its own hostname, a generated username and password, TLS, and a firewall that’s closed until you allow your addresses. ## Engines [Section titled “Engines”](#engines) | Engine | Versions | TLS | Backups | | ---------- | ---------------------------- | --- | ------------------ | | PostgreSQL | 14, 15, 16, 17 (default), 18 | Yes | Backup and restore | | MySQL | 8.0, 8.4 (default) | Yes | Backup and restore | | MariaDB | 10.11, 11.4 (default) | Yes | Backup and restore | | Redis | Valkey 8 (default), Redis 7 | Yes | Backup only | | RabbitMQ | 3, 4 (default) | Yes | Not available | You choose the version when you create the database. The version can’t be changed later. To move to a newer PostgreSQL version, see [Upgrade PostgreSQL](/databases/backups/#upgrade-postgresql-to-a-newer-version). | PostgreSQL | Notes | | ---------- | -------------------------------------------------------------------------- | | 14 | Community support ends 12 November 2026. Only pick it if your app needs 14 | | 15 | Databases created before you could choose a version run 15 | | 16 | Stable and widely supported | | 17 | Recommended, and the default | | 18 | Newest. Backups of an 18 database can only be restored into 18 | MySQL 8.0 is kept for existing apps (community support ended April 2026); new databases should use 8.4. MySQL isn’t offered in the **us** region yet. Note Oracle Database XE 21 is available through the [API](/api/) only. It doesn’t support TLS or backups. Moving from another provider? [Import your database](/databases/import/) from Supabase, Neon, AWS RDS, Heroku and others. ## In this section [Section titled “In this section”](#in-this-section) * [Create a database](/databases/create/) * [Connect](/databases/connect/): connection strings, TLS and client commands * [Firewall and allowlist](/databases/firewall/): **new databases accept no connections until you allow an address** * [Backups and restore](/databases/backups/) * [Import from another provider](/databases/import/): copy a PostgreSQL, MySQL or MariaDB database into DockHive * [Storage, limits and lifecycle](/databases/storage-and-limits/) # Backups and restore > Schedule automatic backups of your DockHive database, take backups on demand, download them, restore them in place or into a new database, and upgrade PostgreSQL. Take backups **on demand**, or turn on **automatic backups** to take one every day or every week. You can restore a backup, restore it into a new database, or download it. ## Automatic backups [Section titled “Automatic backups”](#automatic-backups) In the database’s **Backups** tab, switch on **Enable automatic backups** and choose: * **Backup Frequency**: *Daily* or *Weekly* (pick the day for weekly). * **Backup Time (UTC)**: the hour the backup starts. * **Keep (backups)**: how many automatic backups to keep, up to 30. When a new one finishes, the oldest automatic backup beyond that number is deleted. The tab shows **Next Scheduled**. Automatic backups appear in the list next to the ones you take yourself. Backups you take on demand are never deleted by the schedule. If the database is stopped or a backup is already running at the scheduled time, that backup is skipped and the next one runs as planned. After a pause, one catch-up backup is taken, not one for every missed slot. Automatic backups work for PostgreSQL, MySQL, MariaDB and Redis. ## Create a backup [Section titled “Create a backup”](#create-a-backup) Open the database and click **Backup** in the header, or **Create Backup** in the **Backups** tab. The database must be running. The backup appears as *Queued*, then *In progress*, then shows its size when it’s done. One backup per database runs at a time. | Engine | Backup | Restore | | ---------- | -------------- | ------- | | PostgreSQL | Yes (SQL dump) | Yes | | MySQL | Yes (SQL dump) | Yes | | MariaDB | Yes (SQL dump) | Yes | | Redis | Yes (snapshot) | Not yet | | RabbitMQ | No | No | ## Restore a backup [Section titled “Restore a backup”](#restore-a-backup) In the **Backups** tab, click the restore icon on a backup and confirm. The backup is restored **into the same database** and overwrites its current data. You can’t restore while a backup is running. PostgreSQL backups are taken with the `pg_dump` of the database’s own version, and each backup shows the version it came from (for example *PostgreSQL 16*). ## Restore into a new database [Section titled “Restore into a new database”](#restore-into-a-new-database) PostgreSQL only, with the API. Create a database with `restore_from` naming a finished backup of another of your databases **in the same region**: ```sh curl -X POST "https://api.dockhive.io/api/v1/databases?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"engine": "postgresql", "db_name": "app", "restore_from": {"db_id": "'$DB'", "backup_id": "BACKUP_ID"}}' ``` * Without `version`, the new database runs the **same PostgreSQL version as the backup**. * You can pass a **newer** `version` (see below). An older version is refused. * The new database gets its own hostname, user and password; tables and other objects owned by the old database’s user are owned by the new user. Roles you created yourself aren’t copied, so a backup that grants privileges to them can’t be restored into a new database: create the database, add the roles, then restore with the restore icon instead. * If the restore fails, the new database is deleted again and the response says why. The original database and backup are untouched. ## Upgrade PostgreSQL to a newer version [Section titled “Upgrade PostgreSQL to a newer version”](#upgrade-postgresql-to-a-newer-version) A database keeps the PostgreSQL version it was created with: there are no in-place upgrades. To move to a newer version: 1. Take a backup of the current database and wait until it’s done. 2. Create a new database on the newer version from that backup (above), with `"version": "17"` for example. 3. Check your app against the new database, then switch its connection string over and allow your addresses on the new database’s **Firewall** tab. 4. Delete the old database when you no longer need it. Writes made to the old database after the backup aren’t copied, so stop writes (or plan a short maintenance window) before step 1. ## Keep and delete backups [Section titled “Keep and delete backups”](#keep-and-delete-backups) Backups you take on demand are kept until you delete them. Automatic backups are kept up to the number you chose. Deleting the database deletes all its backups too. ## Download a backup [Section titled “Download a backup”](#download-a-backup) In the **Backups** tab, click the download icon on a finished backup. Only the database’s owner, and workspace members who can see database passwords, can download backups. | Engine | File | | ---------- | -------------------------------------------- | | PostgreSQL | Plain SQL (`pg_dump`), restore with `psql` | | MySQL | SQL (`mysqldump`), restore with `mysql` | | MariaDB | SQL (`mariadb-dump`), restore with `mariadb` | | Redis | RDB snapshot | For example, to load a PostgreSQL backup into another server: ```sh psql "postgresql://USER:PASSWORD@HOST:PORT/DBNAME?sslmode=require" < backup.sql ``` Each download link works **once** and expires after 5 minutes. Downloads show up in the database’s activity. ## With the API [Section titled “With the API”](#with-the-api) ```sh # Start a backup (returns a backup_id) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/backups?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # List backups curl "https://api.dockhive.io/api/v1/databases/$DB/backups?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Restore one (overwrites current data) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/backups/BACKUP_ID/restore?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Turn on daily backups at 02:00 UTC, keep 7 curl -X PUT "https://api.dockhive.io/api/v1/databases/$DB/backups/schedule?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"frequency": "daily", "hour_utc": 2, "retention": 7}' # Weekly on Sunday instead (weekday: 0 = Monday ... 6 = Sunday); "off" turns it off # -d '{"frequency": "weekly", "weekday": 6, "hour_utc": 3, "retention": 4}' # Get a one-time download link for a backup curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/backups/BACKUP_ID/download?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` # Connect to a database > Find your DockHive database's host, port and credentials, and connect with TLS using a connection string or a client. Open the database in the console. The **Overview** tab’s **Connection Info** card shows the host, port, database, username and password (click the eye to reveal it), plus **Copy Connection String** and a ready-made client command. Caution Before you can connect, allow your IP address on the database’s **Firewall** tab (**Add My Current IP** does it in one click). See [Firewall and allowlist](/databases/firewall/). ## Connection details [Section titled “Connection details”](#connection-details) | Detail | Example | | -------- | ------------------------------------------------------------------------------------- | | Host | `dark-rocket-k3x9.db.dockhive.xyz`, one per database | | Port | A port between 10000 and 19999, unique to your database (not the engine’s usual port) | | Username | `usr_1a2b3c4d` (Redis: `default`, see below) | | Password | Generated for you | | Database | The name you chose (for RabbitMQ, the virtual host) | Always copy the host and port from the console. ## Connection strings [Section titled “Connection strings”](#connection-strings) With TLS on (the default): | Engine | Connection string | | -------------- | ------------------------------------------------------------- | | PostgreSQL | `postgresql://USER:PASSWORD@HOST:PORT/DBNAME?sslmode=require` | | MySQL, MariaDB | `mysql://USER:PASSWORD@HOST:PORT/DBNAME?ssl-mode=REQUIRED` | | Redis | `rediss://default:PASSWORD@HOST:PORT/0` | | RabbitMQ | `amqps://USER:PASSWORD@HOST:PORT/VHOST` | Put the string in your app’s [environment variables](/apps/environment-variables/), for example as `DATABASE_URL`. ## Client commands [Section titled “Client commands”](#client-commands) PostgreSQL ```sh psql "host=HOST port=PORT user=USER dbname=DBNAME sslmode=require" ``` MySQL ```sh mysql -h HOST -P PORT -u USER -p DBNAME --ssl-mode=REQUIRED ``` MariaDB ```sh mariadb -h HOST -P PORT -u USER -p DBNAME --ssl ``` Redis ```sh redis-cli -h HOST -p PORT --tls --insecure --askpass ``` Redis uses a password only: don’t pass `--user`. In a connection string the user is `default`. `--insecure` skips certificate verification; to verify, download the CA certificate below and use `--cacert dockhive-db-ca.pem` instead. With TLS off, drop `--tls --insecure`. ## TLS [Section titled “TLS”](#tls) TLS is **on and required** by default for every engine except Oracle. * `sslmode=require` (PostgreSQL) or `ssl-mode=REQUIRED` (MySQL) encrypts the connection. * To also verify the server’s identity, download DockHive’s database CA certificate and use full verification (for example `sslmode=verify-full&sslrootcert=dockhive-db-ca.pem`): ```sh curl -o dockhive-db-ca.pem https://api.dockhive.io/api/v1/databases/tls/ca.pem ``` If this returns 404, your region’s database certificates are publicly trusted: use your system’s CA store. ### Turn TLS off [Section titled “Turn TLS off”](#turn-tls-off) In the database’s **Settings** tab, switch **Force SSL Connections** off and click **Update Settings**. * PostgreSQL, MySQL and MariaDB keep offering TLS, but also accept plain connections. * Redis and RabbitMQ switch to plain connections only (use `redis://` and `amqp://`). The database restarts briefly to apply the change; your data is kept. We recommend leaving TLS on. ## Passwords [Section titled “Passwords”](#passwords) The password is shown in the console whenever you open the database. It can’t be changed yet, so keep it out of your code and share it through environment variables. ## PostgreSQL extensions [Section titled “PostgreSQL extensions”](#postgresql-extensions) PostgreSQL databases include **PostGIS**. Turn it on once per database before your app uses it: ```sql CREATE EXTENSION IF NOT EXISTS postgis; SELECT postgis_full_version(); ``` `postgis_topology`, `pg_trgm` and `uuid-ossp` are available the same way. Django (GeoDjango), SQLAlchemy/GeoAlchemy and Rails apps that check for PostGIS at startup need the `CREATE EXTENSION` step first. # Create a database > Create a managed database on DockHive from the console or the API. ## In the console [Section titled “In the console”](#in-the-console) 1. Go to **Databases** and click to create a database. 2. **Choose Database Engine**: PostgreSQL, MySQL, MariaDB, Redis or RabbitMQ. 3. **Database Configuration**: enter a **Database Name** (or click **Generate**). The name becomes the actual database name, so it’s normalised to lowercase letters, digits and `_`: `my-awesome-database` becomes `my_awesome_database`. For PostgreSQL, pick a **Version** (14, 15, 16 or 17; 16 is selected by default). Other engines show their fixed version. 4. **Instance & Storage**: choose a **Deployment Region** close to your app, and a storage size. MySQL isn’t offered in the **us** region yet; that region is greyed out when you pick MySQL. 5. Click **Create Database**. The success screen shows the connection string and password. Next: open the firewall A new database accepts **no connections** until you allow an IP address on its **Firewall** tab. See [Firewall and allowlist](/databases/firewall/). The database is usually ready within a minute. If the screen says it’s still starting, give it a moment. ## With the API [Section titled “With the API”](#with-the-api) ```sh curl -X POST "https://api.dockhive.io/api/v1/databases?region=eu" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"engine": "postgresql", "version": "16", "db_name": "app", "storage_limit_mb": 1024}' ``` | Field | Required | Notes | | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `engine` | Yes | `postgresql`, `mysql`, `mariadb`, `redis`, `rabbitmq` or `oracle` | | `version` | No | PostgreSQL only: `"14"`, `"15"`, `"16"` or `"17"`. Default `"16"`. Other engines accept only their fixed version (or leave it out) | | `db_name` | Yes | Starts with a letter or `_`; letters, digits and `_`; up to 63 characters | | `storage_limit_mb` | No | 100 to 1,000,000 (1 TB). Default 1024 | | `require_tls` | No | Default `true` | | `restore_from` | No | PostgreSQL only: `{"db_id": "...", "backup_id": "..."}` to start from a backup of another of your databases in the same region. See [Restore into a new database](/databases/backups/#restore-into-a-new-database) | The response includes `db_id`, `engine_version`, `db_host`, `db_port`, `db_user`, `db_password`, `db_name` and a ready-made `connection_uri`. See [API keys](/api/api-keys/) to create `DOCKHIVE_API_KEY`. To list the versions you can pick, call `GET /api/v1/databases/engines`: each engine has `versions` (with `default`, `deprecated`, `eol` and `notes`), `default_version` and `version_selectable`. From the MCP server, use the `create_database` tool (it takes an optional `version`). # Firewall and allowlist > DockHive databases are closed by default. Allow your apps, pods, CI runners and your own IP address from the Firewall tab, the CLI, MCP or the API. Every new database has its firewall **on**, with a default of **deny**: nothing can connect until you add an **allow** rule. ## Default deny is guaranteed [Section titled “Default deny is guaranteed”](#default-deny-is-guaranteed) * A database is never reachable before its firewall is in place: the rules are installed before the database’s port opens, and if they can’t be, the database is not created. * DockHive keeps every database’s rules in place and repairs anything that goes missing. * Anything that lets *any* internet address connect (a default of **allow**, an allow rule for `0.0.0.0/0`, or a disabled firewall) is flagged with a red **Open to the internet** badge in the console, in `hivepod db list` and in the MCP tools. * Databases accept **IPv4** connections only. ## Who can I allow? [Section titled “Who can I allow?”](#who-can-i-allow) | Who connects | What to allow | | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | Your DockHive **app** or **HivePod** in the **same region** as the database | The app or pod itself (see [Allow your apps and pods](#allow-your-apps-and-pods)). It keeps access when it is redeployed. | | Your computer | **Add My Current IP**, or `hivepod db firewall allow ` | | An office, server or VPN with a fixed address | Its public IPv4 address or range | | A CI runner | See [CI runners](#ci-runners) | | An app or pod in **another region** | That region’s shared outbound address, which other customers also use. Prefer creating the database in the app’s region. | ## In the console [Section titled “In the console”](#in-the-console) Open the database and go to the **Firewall** tab. Until you add a rule it shows **All connections are blocked**. ### Allow an address [Section titled “Allow an address”](#allow-an-address) 1. Under **Allow an IP Address**, enter an IPv4 address such as `203.0.113.4`, or a range in CIDR notation such as `203.0.113.0/24`. 2. Optionally add a **Label** (for example *Office* or *CI runner*) so you remember what the rule is for. 3. Click **Add Rule**. The rule appears in **Firewall Rules** and applies immediately. If you type an address with a range (`203.0.113.77/24`), it’s saved as the range it belongs to (`203.0.113.0/24`); the form shows this before you add it. ### Allow your current IP [Section titled “Allow your current IP”](#allow-your-current-ip) Click **Add My Current IP** to allow the public address your browser is using right now, labelled *My IP*. This is what you want when you connect from your own computer with a database client. If your network reached DockHive over IPv6, the console tells you so instead: databases accept **IPv4 connections only**, so look up your IPv4 address (for example with `curl -4 ifconfig.me`) and add it by hand. Note Your public address can change, for example on home broadband, mobile data or a VPN. If you suddenly can’t connect, add your new address. ### Allow your apps and pods [Section titled “Allow your apps and pods”](#allow-your-apps-and-pods) Under **Allow Your Apps and Pods**: * **Allow All My Apps** lets every app you deploy in the database’s region connect. * **Allow All My Pods** does the same for your HivePods. * Or pick **App id** or **Pod id** and enter one app’s id (for example `my-shop`) or one pod’s id. These rules name the app or pod, not an address: DockHive follows its current internal address on the database’s server as it is redeployed or restarted, and only ever for apps and pods that belong to you. The rule shows the address it uses right now, or *Not running on this database’s server right now*. The internet stays blocked. They work for apps and pods in the **same region** as the database. A workload in another region reaches the database from its region’s shared outbound address, which other customers also use. In the **US** region, HivePods connect to databases from the region’s shared pod address. A pod rule there allows that address while you have a matching pod, so other workloads using the same address can reach the database’s port too. Your password and TLS still protect it. ### CI runners [Section titled “CI runners”](#ci-runners) * **Self-hosted runner or fixed egress IP:** allow that address or range once. * **Hosted runners (for example GitHub Actions):** their addresses change on every run and their published ranges are huge. Add the runner’s address at the start of the job and remove it at the end with an [API key](/api/api-keys/): ```sh IP=$(curl -4 -s https://ifconfig.me) RULE=$(curl -s -X POST "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" -H "Content-Type: application/json" \ -d "{\"ip_address\": \"$IP\", \"action\": \"allow\", \"description\": \"CI run\"}" | jq -r .rule_id) # ... run migrations or tests ... curl -s -X DELETE "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules/$RULE?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` ### Allow from anywhere [Section titled “Allow from anywhere”](#allow-from-anywhere) **Allow From Anywhere (0.0.0.0/0)** lets every IPv4 address connect. The console asks you to confirm and then shows a red **Open to the internet** warning, and the database carries the same badge in the list, for as long as the rule exists. Only the database password (and TLS) then protects your data. Avoid it: allow your apps, pods and addresses instead. **Close to the internet** in that warning removes the `0.0.0.0/0` rule and sets the default back to **deny**. ### Remove a rule [Section titled “Remove a rule”](#remove-a-rule) Click the bin icon next to a rule and confirm. The address can no longer connect, including connections that are already open. Removing the last allow rule closes the database again. The **Settings** tab also shows the firewall state (for example *Closed until an allowed IP address is added*) with a **Manage** link to this tab. ### Teams [Section titled “Teams”](#teams) In a team workspace, viewers can see the rules but not change them. Owners, admins and developers can add and remove rules. ## With the CLI [Section titled “With the CLI”](#with-the-cli) ```sh hivepod db list # the firewall column flags OPEN TO INTERNET hivepod db firewall shop # rules, and the addresses app/pod rules use now hivepod db firewall shop allow 203.0.113.4 # an IPv4 address or CIDR range hivepod db firewall shop allow --app my-shop # one app (or --pod , --all-apps, --all-pods) hivepod db firewall shop remove 7 # remove rule 7 hivepod db firewall shop deny-all # close it: only the allow rules can connect ``` ## With an AI agent (MCP) [Section titled “With an AI agent (MCP)”](#with-an-ai-agent-mcp) [`hivepod mcp`](/cli/mcp/) gives agents `database_firewall`, `database_firewall_allow` (an IPv4 address, an app, a pod, or all your apps/pods), `database_firewall_remove` and `database_firewall_default`. Opening a database to the internet needs an explicit `confirm`, and `list_databases` warns about any open database. ## With the API [Section titled “With the API”](#with-the-api) You can manage the same rules with the [API](/api/) and an [API key](/api/api-keys/), for example from a deploy script. Add `?region=` (the database’s region) to each call. ```sh export DOCKHIVE_API_KEY=dh_pat_... export DB=3f2a9c1b7e4d # the database id, from the console URL or GET /api/v1/databases export REGION=eu ``` ### Allow an address [Section titled “Allow an address”](#allow-an-address-1) ```sh curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"ip_address": "203.0.113.4", "action": "allow", "description": "office"}' ``` | Field | Notes | | ------------- | ---------------------------------------------------------------------------------------------------------------- | | `ip_address` | Required. An IPv4 address (`203.0.113.4`) or range (`203.0.113.0/24`). IPv6 is not supported. | | `action` | Required. `allow` or `deny`. | | `cidr_mask` | Optional prefix length for a bare address, default `32` (a single address). Use `24` for a `/24` range. | | `priority` | 1 to 10000, default 100. Lower numbers are checked first; the first match wins. The default action applies last. | | `description` | Optional label, up to 255 characters. | The response contains the saved `rule`. A second rule for the same range is refused, and a database can have up to 100 rules. ### Allow an app or pod [Section titled “Allow an app or pod”](#allow-an-app-or-pod) ```sh curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"source": "platform:app:my-shop"}' ``` | `source` | Allows | | --------------------------- | ---------------------------------------------- | | `platform:app:` | That app, in the database’s region | | `platform:app:*` | All your apps in the database’s region | | `platform:hivepod:` | That pod (its id from `GET /api/v1/hivepods/`) | | `platform:hivepod:*` | All your pods in the database’s region | An app or pod id that isn’t yours answers `404`. Listed rules have `"type": "platform"` and `resolved_ips` (the addresses in use right now). ### Is it open? [Section titled “Is it open?”](#is-it-open) `GET /api/v1/databases` and `GET /api/v1/databases/$DB` include `firewall`: `enabled`, `default_action`, `rules_count` and `open_to_internet` (with `open_reason` when it is true). ### List and remove rules [Section titled “List and remove rules”](#list-and-remove-rules) ```sh curl "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" curl -X DELETE "https://api.dockhive.io/api/v1/databases/$DB/firewall/rules/RULE_ID?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` ### Shortcuts [Section titled “Shortcuts”](#shortcuts) | Call | Effect | | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `POST …/firewall/allow-all` | Allows every address (`0.0.0.0/0`). | | `POST …/firewall/deny-all` | Denies every address. | | `POST …/firewall/default-action` with `{"action": "deny"}` or `"allow"` | Changes what happens when no rule matches. `allow` opens the database to the internet; the answer carries a `warning`. | | `POST …/firewall/toggle` with `{"enabled": false}` | Turns filtering off entirely. The database is then open to every address. | | `GET …/firewall/status` | Shows whether the firewall is on, the default action and rule counts. | All paths start with `https://api.dockhive.io/api/v1/databases/$DB` and need `?region=$REGION`. # Import from another provider > Copy a PostgreSQL, MySQL or MariaDB database, once or kept in sync until you switch over, from Supabase, Neon, AWS RDS, Heroku, Railway, Render, DigitalOcean, PlanetScale or any other provider into DockHive. Move an existing **PostgreSQL**, **MySQL** or **MariaDB** database to DockHive in a few clicks. DockHive connects to your current database, copies everything into a DockHive database and checks that every table arrived complete. Importing is free: incoming data isn’t billed. It works with any provider that lets you connect over the internet: Supabase, Neon, AWS RDS and Aurora, Google Cloud SQL, Azure, Heroku, Railway, Render, DigitalOcean, PlanetScale, or your own server. ## Before you start [Section titled “Before you start”](#before-you-start) 1. **Get a connection string** for your current database. A **read-only user is enough**: it only needs to read every table you want to copy. 2. **Allow DockHive’s address** in your current provider’s firewall or IP allow list. When you click **Check connection**, the console shows the address to allow for the region you picked. 3. **Pick how to move.** * **One-time copy**: copies everything once. Changes made to your old database after the copy starts aren’t included, so stop your app’s writes (or use a short maintenance window) before you import. * **Copy and keep in sync**: copies everything, then keeps applying new changes until you switch over, so you can move with almost no downtime. See [Keep in sync, then switch over](#keep-in-sync-then-switch-over). ## Import into a new database [Section titled “Import into a new database”](#import-into-a-new-database) 1. On **Databases**, click **Import a database**. 2. Paste your connection string (or fill in host, port, database, user and password) and pick the **region** for the new database. 3. Click **Check connection**. DockHive connects to your database and shows its version, size, tables and schemas, plus anything that needs your attention. 4. Review the suggested engine, version and storage size, then click **Create database and import**. DockHive creates the database, waits until it’s running and starts the copy. You land on the new database’s **Migration** tab, where you can follow the copy. ## Import into an existing database [Section titled “Import into an existing database”](#import-into-an-existing-database) Open the database, go to **Migration** → **Import Data**, paste the connection string, click **Check connection**, then **Start import**. The database must be **empty**. If it already has tables, you can choose to **replace everything** in it (you type the database name to confirm): the database is emptied first, so it ends up with exactly your source’s tables and data. ## Keep in sync, then switch over [Section titled “Keep in sync, then switch over”](#keep-in-sync-then-switch-over) Choose **Copy and keep in sync** in the import form to move a live database with almost no downtime. DockHive copies everything, then keeps your DockHive database up to date with every change made to your old one, for as long as you need (up to 14 days). When you’re ready, you switch over in a few seconds. 1. Check the connection with **Copy and keep in sync** selected. The check shows a readiness list: every item must have a ✓. Each ✗ comes with the fix, often a single setting or SQL statement you can copy. 2. Click **Start sync**. The **Migration** tab shows **Connecting**, **Copying**, then **In sync**, with a live badge: *Up to date*, *N s behind* or *Catching up*. 3. Test your app against the new database if you like, but **don’t write to it** until you switch over: changes made there can break the sync. 4. When you’re ready, click **Switch over** and follow the steps: 1. Stop writes to your old database (maintenance mode, or scale your app’s workers to zero). 2. Click **Switch over**. DockHive waits for the last changes, stops the sync and checks the row count of every table. 3. Point your app at the new connection string shown in the dialog. If the last changes haven’t arrived yet (for example because writes were still happening), you’ll see *Not caught up yet*: nothing is lost and the sync keeps running, so stop the writes and try again. **Stop sync** cancels the sync and empties the DockHive database (you type its name to confirm). Nothing changes on your old database except that DockHive’s replication setup is removed. ### What your old database needs [Section titled “What your old database needs”](#what-your-old-database-needs) | | PostgreSQL | MySQL / MariaDB | | ------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | How it syncs | Logical replication | Binary log replication | | Setting | `wal_level = logical` | Binary log on, `binlog_format = ROW` | | User | The owner of the tables, with replication rights (a read-only user isn’t enough) | `REPLICATION SLAVE`, `REPLICATION CLIENT` and `RELOAD`, plus read access | | Tables | Every table needs a primary key, or `ALTER TABLE ... REPLICA IDENTITY FULL` | Tables without a primary key work, but sync more slowly | | Other | A free replication slot | Binary logs kept for at least 24 hours | | Provider | To turn it on | | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | | Supabase, DigitalOcean, Render | Usually ready; use the `postgres` / admin user | | Neon | Enable **Logical Replication** in the project settings | | AWS RDS / Aurora PostgreSQL | Set `rds.logical_replication = 1` in the parameter group and reboot | | AWS RDS MySQL / MariaDB | Turn on automated backups (this enables the binary log), then run `CALL mysql.rds_set_configuration('binlog retention hours', 72);` | | Google Cloud SQL | Set the `cloudsql.logical_decoding` flag (PostgreSQL) | | Azure | Set `wal_level` to `logical` in the server parameters (PostgreSQL) | | Heroku Postgres, PlanetScale | Sync isn’t possible on these providers; use **One-time copy** | MySQL syncs into MySQL and MariaDB into MariaDB. ### While it syncs [Section titled “While it syncs”](#while-it-syncs) * **Schema changes** (new tables or columns) made on your old database aren’t synced. Make them after switching over. * On PostgreSQL, DockHive adds a **publication** and a **replication slot** to your old database while the sync runs. They’re removed when you switch over or stop the sync. If your old database can’t be reached at that moment, the console shows the SQL to remove them yourself: run it, because a forgotten replication slot makes PostgreSQL keep its logs and fill its disk. * Sequences (auto-increment IDs) are moved to the right values when you switch over, so new rows don’t collide. ## Engines and versions [Section titled “Engines and versions”](#engines-and-versions) | Your database | Imports into | | ---------------------- | ------------------------------------------------------------------------------------------------- | | PostgreSQL 10 or newer | DockHive PostgreSQL, same major version or newer (the check suggests 17, or 18 for PostgreSQL 18) | | MySQL 5.7 or 8.x | DockHive MySQL 8.0 or 8.4 | | MariaDB 10.x or 11.x | DockHive MariaDB 10.11 or 11.4 | Importing into the same family (MySQL into MySQL, MariaDB into MariaDB) is safest; the check warns you when the families differ. Other engines (Redis, MongoDB and others) can’t be imported yet. MySQL isn’t offered in the **us** region yet. Pick another region for MySQL, or use MariaDB in us. ## Follow the copy [Section titled “Follow the copy”](#follow-the-copy) The **Migration** tab shows each step: **Connecting**, **Copying** (data copied so far, tables done, the table being copied), **Verifying** and **Done**. You can leave the page; the import keeps running. Click **Cancel import** to stop it. When it’s done you get a report with the row count of every table on both sides. Very large tables are compared on estimates and marked as such. A difference usually means the source changed during the copy. Then copy the database’s connection string from its **Overview** and put it in your app. ## If something goes wrong [Section titled “If something goes wrong”](#if-something-goes-wrong) If an import fails or you cancel it, the DockHive database is **emptied again automatically**, so you can fix the problem and retry. Common messages: | Message | What to do | | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | The source database could not be reached | Check the host and port, and allow the address shown in the check in your provider’s firewall. | | The user name or password was rejected | Check the user and password in the connection string. | | TLS settings don’t match | Your server doesn’t accept the encryption setting. Add `sslmode=require` (PostgreSQL) or `ssl-mode=REQUIRED` (MySQL) to the connection string, or match your provider’s setting. | | This address is private | Use your database’s **public** host name. Private and internal addresses can’t be reached from DockHive. | | This database is not empty | Import into an empty database, or choose to replace everything in it. | | The extension … is not available | Your database uses an extension DockHive doesn’t offer yet (for example `vector`). Objects that use it can’t be copied. | ## What is and isn’t copied [Section titled “What is and isn’t copied”](#what-is-and-isnt-copied) * **Copied**: every table, its data and indexes, views, functions and procedures, triggers, sequences, types, and the extensions your database uses (when DockHive offers them). * **Not copied**: users, roles and their grants (your DockHive database user owns everything); MySQL `DEFINER`s become your DockHive user. * **Provider-internal schemas** (for example Supabase’s `auth`, `storage` and `realtime`) are unticked in the check. You can include them, but objects that point into a schema you don’t copy (for example a foreign key to `auth.users`) are skipped. * **PostgreSQL**: DockHive databases come with PostGIS installed. An import replaces that with exactly the extensions your source has. Run `CREATE EXTENSION postgis;` afterwards if you need it. ## Limits [Section titled “Limits”](#limits) * The source can use at most **90 %** of the database’s storage. The check suggests a size; increase the storage first if needed. * One import at a time per database, and up to 20 imports per day. * An import can run for up to 6 hours. * Connection checks are limited to 60 per hour. * TLS is used by default. If your connection string turns it off (`sslmode=disable`, `ssl-mode=DISABLED`), the copy isn’t encrypted and the check warns you. ## Provider notes [Section titled “Provider notes”](#provider-notes) | Provider | Tip | | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | Supabase | Use the **direct connection** string (port 5432), not the pooler. Internal schemas are unticked automatically. | | Neon | Use the connection string from the dashboard; it already includes `sslmode=require`. | | AWS RDS / Aurora | Make the instance publicly accessible and allow DockHive’s address in its security group. | | Heroku | Use the database’s `DATABASE_URL` credentials. | | PlanetScale | Create a password with read access and use the MySQL connection string. | | Railway / Render / DigitalOcean | Use the **external** (public) connection string, and add DockHive’s address to the trusted sources where the provider has an allow list. | ## With the API [Section titled “With the API”](#with-the-api) ```sh # Check a source (returns version, size, tables, warnings, blockers and the address to allow) curl -X POST "https://api.dockhive.io/api/v1/databases/import/check?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"connection_string": "postgresql://reader:PASSWORD@db.example.com:5432/app?sslmode=require"}' # Start an import into an empty database (add "replace": true to replace its contents) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/import?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"connection_string": "postgresql://reader:PASSWORD@db.example.com:5432/app?sslmode=require"}' # Follow it (state: queued, connecting, copying, syncing, switching, verifying, succeeded, failed or cancelled) curl "https://api.dockhive.io/api/v1/databases/$DB/import?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Keep in sync instead of a one-time copy: add "mode": "sync" to the check and the start # Switch over once it's in sync curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/import/switchover?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Cancel it (also stops a sync) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/import/cancel?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` You can also pass the source as fields instead of a connection string: `{"engine": "mysql", "host": "...", "port": 3306, "database": "shop", "username": "reader", "password": "...", "ssl": true}`. For PostgreSQL, `"schemas": ["public", ...]` picks the schemas to copy (default: the ones the check ticks). Your source password is only used for the import: it’s stored encrypted while the import or sync runs, deleted when it ends, and never shown again. # Storage, limits and lifecycle > Storage limits, resizing, stopping, starting and deleting DockHive databases, and what each plan includes. ## Storage [Section titled “Storage”](#storage) Each database has a storage limit, shown on the **Overview** tab as *Storage Used*. DockHive checks usage every few minutes and warns you as you approach the limit. Plan for headroom: a database that fills its storage may become read-only until you free space or raise the limit. In the console you choose the storage when creating the database. To change it later, use the API (100 MB to 1 TB): ```sh curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/resize?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"storage_limit_mb": 2048}' ``` Billing is based on the storage you actually use, not the limit you set. See [Usage and overage](/billing/usage/). ## Plan limits [Section titled “Plan limits”](#plan-limits) | | Free Tier | Developer | Pro | Scale | | ---------------------- | --------- | ------------------------------ | ------------------------------- | ------ | | Databases | 10 | 20 | 60 | Custom | | Total database storage | 500 MB | 50 GB, then $0.10 per GB-month | 150 GB, then $0.10 per GB-month | Custom | Counts and storage add up across all regions. On the Free Tier, the storage cap applies to the storage limits you **allocate**, and every database needs at least 100 MB. So the 500 MB lets you run up to **5 databases at the minimum size**, even though the count limit is 10. Larger storage limits mean fewer databases. When you reach a limit, the console and API tell you, for example *“Your Free plan includes 10 databases. Delete a database or upgrade your plan to create another.”* Each database runs with a fixed amount of memory and CPU suited to its engine. ## Stop, start and restart [Section titled “Stop, start and restart”](#stop-start-and-restart) Use **Stop**, **Start** and **Restart** in the database’s header (or the matching API calls). A stopped database keeps its data; its storage still counts. ## Delete a database [Section titled “Delete a database”](#delete-a-database) Click **Delete**, type the database name and confirm. Deletion is **immediate and permanent**: the data, all backups, firewall rules and the hostname are removed. Take a copy first if you need one. ## Not available yet [Section titled “Not available yet”](#not-available-yet) Running SQL in the console and query metrics are coming soon. Password rotation and extra users are in [Users and passwords](/databases/users-and-passwords/); downloadable backups are in [Backups and restore](/databases/backups/#download-a-backup). # Users and passwords > Rotate your DockHive database's password and create extra database users with read-only, read/write or admin roles. Every database starts with one main user, shown on the **Overview** tab. You can give it a new password at any time, and for PostgreSQL, MySQL and MariaDB you can add more users with limited roles, for example a read-only user for reporting. Only the database’s owner, and workspace members who can see database passwords, can rotate passwords or manage users. New passwords are shown **once**: copy them before you close the dialog. ## Rotate the main password [Section titled “Rotate the main password”](#rotate-the-main-password) 1. Open the database’s **Overview** tab and click **Rotate password**. 2. Confirm. A new random password is set, and the dialog shows it with the new connection string. 3. Update every app that uses the database. The old password stops working for new connections right away. Connections that are already open stay open until they reconnect. | Engine | What happens | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | PostgreSQL | Switches immediately. | | MySQL | Switches immediately, or after a **grace period** you choose (up to 24 hours) during which both passwords work. The old one is then removed automatically. | | MariaDB | Switches immediately. | | Redis | Switches immediately. The database restarts for a moment; your data is kept. | The grace period gives you time to update your apps one at a time without downtime. ## Add a database user [Section titled “Add a database user”](#add-a-database-user) PostgreSQL, MySQL and MariaDB only. Redis has a single password. 1. Open the **Users & Roles** tab. 2. Enter a username (3 to 32 characters: lower-case letters, digits and `_`, starting with a letter), for example `reporting`. 3. Pick a role and click **Create user**. 4. Copy the password shown. The user connects to the same host, port and database as the main user. | Role | Can | | -------------- | -------------------------------------------------------------------- | | **Read-only** | Read data. | | **Read/write** | Read, insert, update and delete data. Can’t change tables. | | **Admin** | Everything in this database, including creating and changing tables. | No user you create can reach other databases, manage users or change server settings. You can add up to 20 users per database. To change a user’s password, click **Rotate password** on its row. To remove a user, click **Delete user**: its open connections are closed and it can’t log in again. ## Backups and new databases [Section titled “Backups and new databases”](#backups-and-new-databases) Users you create are part of the database, so a backup restored **into the same database** keeps them. When you restore a PostgreSQL backup [into a new database](/databases/backups/#restore-into-a-new-database), the extra users aren’t copied: create them again on the new database. ## With the API [Section titled “With the API”](#with-the-api) ```sh # Rotate the main password (MySQL: add a grace period in minutes) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/credentials/rotate?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"grace_minutes": 60}' # List users curl "https://api.dockhive.io/api/v1/databases/$DB/users?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Create a read-only user (the password is in this response only) curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/users?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"username": "reporting", "role": "read_only"}' # Rotate a user's password curl -X POST "https://api.dockhive.io/api/v1/databases/$DB/users/reporting/rotate?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Delete a user curl -X DELETE "https://api.dockhive.io/api/v1/databases/$DB/users/reporting?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` Roles in the API are `read_only`, `read_write` and `admin`. # Console tour > A quick tour of the DockHive console at console.dockhive.io and where to find each product and setting. The console at [console.dockhive.io](https://console.dockhive.io) is where you create and manage everything on DockHive. The sidebar has three groups. ## Platform [Section titled “Platform”](#platform) | Page | What you’ll find | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Overview** | Your dashboard: apps, databases, HivePods and n8n workspaces in one list, plus **Service Usage**, which shows what you use against your plan’s limits across every region. | | **Explore** | Services and templates to start from. | | **My Projects** | Every resource you own, with filters for region and status. | ## Services [Section titled “Services”](#services) | Page | What you’ll find | | ---------------- | ---------------------------------------------------------------------------------------------------------------- | | **App Hosting** | Your apps. Start a new one with Drone or a framework preset. See [Apps](/apps/). | | **Databases** | Your databases. See [Databases](/databases/). | | **Hive Buckets** | Your buckets, their files and settings, and the **Access keys** tab for S3 tools. See [Hive Buckets](/buckets/). | | **n8n Hosting** | Your n8n workspaces. See [n8n workflows](/n8n/). | | **HivePods** | Your cloud dev environments. See [HivePods](/hivepods/). | | **Tunnels** | Install instructions for DockHive Tunnel and your active tunnels. See [Tunnel](/tunnel/). | Items marked **Coming soon** aren’t available yet. ## Account [Section titled “Account”](#account) | Page | What you’ll find | | --------------------- | --------------------------------------------------------------------------------------------------------------------------- | | **Billing & Payment** | Your plan, live usage and cost, invoices, and plan changes. See [Plans and billing](/billing/). | | **Logs & Monitoring** | Logs and monitoring across your services. | | **Settings** | Your profile, password and [two-factor authentication](/security/), your GitHub connection, and [API keys](/api/api-keys/). | ## Regions in the console [Section titled “Regions in the console”](#regions-in-the-console) Wherever you create something, the console asks for a region. Resource lists show every region at once; use the **All Regions** filter to narrow them down. See [Regions](/getting-started/regions/). # Create an account > Sign up for DockHive with email or GitHub, verify your email address with a 6-digit code, and turn on two-factor authentication. DockHive accounts are free to start. Every account begins on the [Free Tier](/billing/); you can upgrade at any time. ## Sign up [Section titled “Sign up”](#sign-up) 1. Go to [console.dockhive.io/register](https://console.dockhive.io/register). 2. Either enter your email address and a password (at least 8 characters), or click **Continue with GitHub**. 3. Complete the quick security check if one is shown, then click **Create Account**. One account per email address. Addresses that only differ by dots or a `+tag` (as with Gmail) count as the same address, and disposable email addresses are not accepted. Note If you sign up with GitHub, your GitHub email address must be verified on GitHub. You still verify it with DockHive, as below. ## Verify your email address [Section titled “Verify your email address”](#verify-your-email-address) Right after you sign up, DockHive emails you a **6-digit code** and a verification link. Enter the code on the **Check your email** screen (or click the link in the email). * The code expires after **15 minutes**. Asking for a new code cancels the old one. * Didn’t get it? Check your spam folder, then use **resend the code**. You can resend about once a minute. * After 5 wrong codes, request a new one. Until your email is verified, the console only shows the verification screen and the API answers `403` with the code `email_unverified`. You can’t create resources or deploy yet. ## Verify a card [Section titled “Verify a card”](#verify-a-card) Free Tier accounts confirm a card once, with a **$1 card check**, before creating apps, databases, pods or anything else. The $1 isn’t refunded or turned into credit. You can look around the console before you do it: the **Verify card · $1** banner and any **Create** button take you to the check. Until then the API answers changes with `402` and the code `card_required`. Paid plans and team workspaces skip this step. New accounts For the first 24 hours after you verify, new accounts have slightly lower limits (for example one HivePod, two apps and one database). They lift automatically. ## Sign in [Section titled “Sign in”](#sign-in) Sign in at [console.dockhive.io/login](https://console.dockhive.io/login) with your email and password or with GitHub. After 5 failed attempts in 15 minutes, sign-in for that account pauses for 15 minutes. DockHive emails you when someone signs in to your account. **Forgot your password?** Use **Forgot password** on the sign-in page. The reset link is valid for one hour and can be used once. Resetting your password ends your saved sign-ins (an already-open session can keep working for up to 15 minutes); API keys are not revoked. ## Secure your account [Section titled “Secure your account”](#secure-your-account) Turn on two-factor authentication under **Settings → Security**. See [Account security](/security/). ## Next steps [Section titled “Next steps”](#next-steps) * [Take a tour of the console](/getting-started/console-tour/) * [Deploy your first app](/getting-started/quickstart/) # What is DockHive? > DockHive is the first agentic, decentralized AI cloud. Here is what you can run on it and how the pieces fit together. DockHive is the first agentic, decentralized AI cloud. You bring the code; DockHive’s AI deploy agent, **Drone**, reads it, builds your app and deploys it, fixing problems along the way. Everything else your app needs (a database, file storage, realtime messaging, functions, a workflow engine, a dev environment, a tunnel to your laptop) runs on the same account, in the region you choose. ## What you can run [Section titled “What you can run”](#what-you-can-run) | Product | What it is | Where to start | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | | **Apps** | Web apps, APIs, static sites and full-stack apps, deployed from GitHub or from a folder on your computer. Every app gets a free `https://.dockhive.app` address. | [Apps](/apps/) | | **Drone** | The AI deploy agent. Pick Drone instead of a framework and it gets your app live with no configuration. | [Drone and frameworks](/apps/drone/) | | **Databases** | Managed PostgreSQL, MySQL, MariaDB, Redis and RabbitMQ. | [Databases](/databases/) | | **Hive Buckets** | S3-compatible object storage for files, images, user uploads and backups. Works with any S3 tool or SDK. | [Hive Buckets](/buckets/) | | **Hive Realtime** | Realtime messaging for live updates, chat, presence and notifications, compatible with Pusher libraries. | [Hive Realtime](/realtime/) | | **Hive Functions** | Code that runs on demand at its own HTTPS URL, on every request or on a schedule, in Rust, Go, TypeScript, JavaScript or Python. | [Hive Functions](/hive-functions/) | | **n8n workflows** | A private n8n workspace for workflow automation. | [n8n workflows](/n8n/) | | **HivePods** | Cloud dev environments: pick an operating system and a size, and you have a machine with a terminal in seconds. Install ready-made apps from the [App Marketplace](/hivepods/app-marketplace/). | [HivePods](/hivepods/) | | **DockHive Tunnel** | Share an app running on your own computer at a public HTTPS address. | [Tunnel](/tunnel/) | | **CLI and MCP** | The `hivepod` command-line tool, which also runs an MCP server so AI coding tools can deploy for you. | [CLI and MCP](/cli/) | ## How it fits together [Section titled “How it fits together”](#how-it-fits-together) * **One account, one console.** Everything is managed from the console at [console.dockhive.io](https://console.dockhive.io), the `hivepod` CLI, the `dockhive` tunnel CLI, or the API at `https://api.dockhive.io/api/v1`. * **Ten regions.** Run each resource in `us`, `eu`, `asia`, `africa`, `de`, `ng`, `abuja`, `pt`, `mumbai` or `virginia`. See [Regions](/getting-started/regions/). * **One plan.** Your plan’s limits apply to everything you run, across all regions combined. See [Plans](/billing/). ## Next steps [Section titled “Next steps”](#next-steps) * [Deploy your first app in about two minutes](/getting-started/quickstart/) * [Create an account](/getting-started/create-account/) * [Take a tour of the console](/getting-started/console-tour/) Coming from the old docs? The old docs described Hive proposal files, a node-provider program and the Seacure Weave consensus. Those are retired. See [Deprecated and legacy](/legacy/). # Quickstart: deploy your first app with Drone > Go from a GitHub repository to a live HTTPS address in about two minutes with Drone, DockHive's AI deploy agent. Drone is DockHive’s AI deploy agent. It reads your code, builds your app and deploys it, fixing problems along the way. You don’t write any configuration. You need a DockHive account with a verified email address. [Create one free](https://console.dockhive.io/register) if you haven’t yet. * From GitHub (console) 1. Open the console and go to **App Hosting**, then start a new app (or open [console.dockhive.io/app-hosting](https://console.dockhive.io/app-hosting) directly). 2. **Select Repository.** Click **Connect GitHub** and approve access, then pick a repository. Private repositories work once you grant repository access. You can also paste the URL of any public repository under **Public Repository**. 3. **Choose Framework.** Click **Deploy with Drone**. 4. **Domain & Region.** Choose a region close to your users. You can leave **Custom Domain** empty: every app gets a free address. 5. **Configure & Deploy.** Give the project a name, check the branch, and add any environment variables your app needs (one `KEY=value` per line). Click **Deploy**. 6. Watch Drone work: *Reading your code*, *Building*, then *Live*. Open the address it shows, for example `https://wonder-web-8ml2.dockhive.app`. * From a folder (CLI) 1. Install the `hivepod` CLI: ```sh curl -fsSL https://dockhive.io/install.sh | sh ``` On Windows (PowerShell): ```powershell irm https://dockhive.io/install.ps1 | iex ``` 2. Sign in. Your browser opens; approve the request. ```sh hivepod login ``` 3. From your project folder, deploy: ```sh hivepod deploy ``` 4. When it’s done, the CLI prints `✓ Live` and your app’s address. ## What next? [Section titled “What next?”](#what-next) * Turn on [push to deploy](/apps/push-to-deploy/) so every `git push` goes live. * Add [your own domain](/apps/custom-domains/). * Add a [database](/databases/create/) and put its connection string in an [environment variable](/apps/environment-variables/). * If Drone stops with a message, see [Drone and frameworks](/apps/drone/#when-drone-cant-deploy-your-code). # Regions > DockHive runs in ten regions (us, eu, asia, africa, de, ng, abuja, pt, mumbai and virginia). Choose a region close to your users. DockHive runs in ten regions. **Choose a region close to your users**: requests travel a shorter distance, so your app feels faster. | Region | Location | | ---------- | --------------------------- | | `us` | United States (Los Angeles) | | `virginia` | United States (Virginia) | | `eu` | Europe (London) | | `de` | Germany (Frankfurt) | | `asia` | Asia (Singapore) | | `mumbai` | India (Mumbai) | | `africa` | South Africa (Johannesburg) | | `ng` | Nigeria (Lagos) | | `abuja` | Nigeria (Abuja) | | `pt` | Portugal (Lisbon) | Apps, databases, n8n workspaces, HivePods and tunnels are available in every region. Hive Buckets has a global S3 endpoint plus regional ones; see [Endpoints and regions](/buckets/endpoints/). ## Picking a region [Section titled “Picking a region”](#picking-a-region) * **Console:** apps and databases have a **Deployment Region** menu, n8n has a **Region** menu, and HivePods have **Choose Datacenter Region** cards. Each region shows its status: *Healthy*, *Degraded* or *Unavailable*. * **CLI:** `hivepod create --region eu` for pods. `hivepod deploy` keeps the region of the app it redeploys. * **Tunnel:** `dockhive expose 3000 --region eu`, or leave the default `auto` to use the fastest region from where you are. See [Names and regions](/tunnel/names-and-regions/). * **API:** send `X-Region: eu` or `?region=eu`. See [Using the API](/api/). A resource stays in the region where you created it. ## Addresses work everywhere [Section titled “Addresses work everywhere”](#addresses-work-everywhere) Your app’s address (`.dockhive.app`) works the same wherever the app runs; you don’t need a regional hostname. ## Plan limits are global [Section titled “Plan limits are global”](#plan-limits-are-global) Your plan’s limits (for example, the number of apps or HivePods) count everything you run **across all regions combined**. See [Plans](/billing/). ## Check region status [Section titled “Check region status”](#check-region-status) The public endpoint below lists the regions and their health: ```sh curl https://api.dockhive.io/api/v1/regions ``` # Hive Functions > Run code on demand at your own HTTPS URL. Write a handler in Rust, Go, TypeScript, JavaScript or Python, deploy it, and DockHive runs it on every request and on a schedule. **Hive Functions** runs your code when it’s needed, without a server to manage. Write a `handler`, deploy it, and every request to `https://.fn.dockhive.app` runs it: webhooks, small APIs, form handlers, glue between services, scheduled jobs. You pay for requests and the compute your code uses, nothing while it sits idle. Every plan, including Free, comes with a monthly allowance. ## At a glance [Section titled “At a glance”](#at-a-glance) | | | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | Languages | Rust, Go, TypeScript, JavaScript and Python, or upload a prebuilt Hive Bytecode (`.hbc`) file | | Address | `https://.fn.dockhive.app`, any method and any path | | Triggers | HTTP requests and [schedules](/hive-functions/schedules/) (cron or `@every 5m`) | | Built in | Per-function [storage](/hive-functions/storage-and-http/#storage) that survives new versions, outbound HTTP, secrets, environment variables and logs | | Deploys | From the console editor (TypeScript, JavaScript, Python) or the `dockhive` CLI (every language). The last 10 versions are kept for one-click rollback. | | Regions | Every DockHive region; a function lives in the region you pick | | Free plan | 5 functions, 100,000 requests and 100,000 compute units a month, per region | ## How it works [Section titled “How it works”](#how-it-works) 1. **Create a function** in the console (**Hive Functions > New function**): give it a name, pick a language and the region closest to your users. It gets its URL straight away. 2. **Write the handler.** It receives the request (method, path, query, headers, body) and returns text, JSON, or a full response with status and headers. 3. **Deploy.** DockHive builds your code into Hive Bytecode and switches to the new version once the build succeeds. A failed build leaves the running version untouched. 4. **Watch it run** in **Logs**, test it with **Test**, and add schedules, secrets and environment variables in **Settings**. ## What a handler looks like [Section titled “What a handler looks like”](#what-a-handler-looks-like) ```js const { hive, db } = require('hivekit') hive.define('handler', (request) => { const visits = (db.get('visits') || 0) + 1 db.set('visits', visits) return { message: 'Hello from Hive Functions', visits, path: request.path } }) ``` Every request to the function’s URL calls `handler`. See [Languages](/hive-functions/languages/) for the same handler in each language. ## Pricing [Section titled “Pricing”](#pricing) Each plan includes a monthly allowance of requests and compute units (see [Limits and regions](/hive-functions/limits/)). On paid plans, usage above it is billed at: | | Price | | ------------- | ----------------- | | Requests | $0.10 per million | | Compute units | $5 per million | A compute unit measures the work your code does in a run, so short handlers use a small fraction of one. Bytes your function sends and receives with outbound HTTP count as bandwidth. Next: the [Quickstart](/hive-functions/quickstart/). # Languages > Write a Hive Functions handler in Rust, Go, TypeScript, JavaScript or Python. The request your handler receives, what it can return, and the handler shape in each language. A function exports a **`handler`** that answers every HTTP request to its URL, and optionally a **`scheduled`** function for its [schedules](/hive-functions/schedules/). Each language uses the `hivekit` SDK, which DockHive provides at build time. ## The request [Section titled “The request”](#the-request) Your handler receives the request as JSON: ```json { "method": "POST", "path": "/items", "query": { "page": "2" }, "headers": { "content-type": "application/json", "user-agent": "curl/8.7.1" }, "body": "{\"name\":\"pen\"}", "ip": "203.0.113.7", "region": "eu", "function": { "name": "orders-k3x9", "version": 3 }, "env": { "STORE_NAME": "Main street" } } ``` * Header names are lower-case. * `body` is a string. When the body isn’t UTF-8 text, it’s base64 and the request has `"body_encoding": "base64"`. * `env` holds the function’s [environment variables](/hive-functions/storage-and-http/#environment-variables). ## The response [Section titled “The response”](#the-response) Return one of: | You return | The caller gets | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | A string | `200` with `text/plain`, or `application/json` if the string is valid JSON | | Any other JSON value | `200` with `application/json` | | `{"status", "headers", "body"}` | That status, those headers and that body. A `body` that’s an object or array is sent as JSON; add `"body_encoding": "base64"` to send binary data. | If your code throws or returns an error, the caller gets `500` with `{"error": "function_error", "message": "..."}` and your message (up to 1 KB). See [Limits](/hive-functions/limits/#errors) for the other error responses. ## Handlers by language [Section titled “Handlers by language”](#handlers-by-language) Each starter below is the one the console and `dockhive functions init` give you, shortened. In every language, storage persists across requests and new versions. ### JavaScript [Section titled “JavaScript”](#javascript) One file, `handler.js`. Handlers receive the request as an object and return any value. ```js const { hive, db } = require('hivekit') hive.define('handler', (request) => { const visits = (db.get('visits') || 0) + 1 db.set('visits', visits) console.log('handled', request.method, request.path, 'visit', visits) return { status: 200, headers: { 'content-type': 'application/json' }, body: { message: 'Hello from Hive Functions', visits, query: request.query }, } }) hive.define('scheduled', (event) => { const runs = (db.get('runs') || 0) + 1 db.set('runs', runs) return { runs } }) ``` The `hivekit` package is built in; packages from your own `node_modules` aren’t used. ### TypeScript [Section titled “TypeScript”](#typescript) One file, `handler.ts`. TypeScript is compiled ahead of time with a strictly typed subset (AssemblyScript): handlers take the request as a JSON **string** and return a **string** (plain text, JSON, or a full `{"status","headers","body"}` response). Use explicit number types such as `i64`. ```ts import { hive, storage } from 'hivekit' function handler(input: string): string { const prev = storage.get("visits"); const visits: i64 = (prev.length == 0 ? 0 : I64.parseInt(prev)) + 1; storage.set("visits", visits.toString()); hive.log("handled a request, visit " + visits.toString()); return "{\"status\":200,\"headers\":{\"content-type\":\"application/json\"}," + "\"body\":{\"visits\":" + visits.toString() + ",\"request\":" + input + "}}"; } function scheduled(input: string): string { return "{\"ok\":true}"; } hive.define("handler", handler); hive.define("scheduled", scheduled); ``` If you’d rather work with objects, JavaScript gives you plain objects in and out. ### Python [Section titled “Python”](#python) One file, `handler.py`. Handlers receive the request as a `dict` and return any value. ```python from hivekit import hive @hive.define("handler") def handler(request): visits = hive.db.get("visits", 0) + 1 hive.db.set("visits", visits) hive.log("handled", request["method"], request["path"], "visit", visits) return { "status": 200, "headers": {"content-type": "application/json"}, "body": {"message": "Hello from Hive Functions", "visits": visits, "query": request["query"]}, } @hive.define("scheduled") def scheduled(event): runs = hive.db.get("runs", 0) + 1 hive.db.set("runs", runs) return {"runs": runs} ``` ### Go [Section titled “Go”](#go) A Go module (`main.go`, `go.mod`, `go.sum`), built with TinyGo. Deploy it with the CLI. Register handlers in `init`; `main` is required but never called. Module dependencies in `go.mod` are fetched during the build. ```go package main import hivekit "github.com/Necter-Network/hivekit/hivekit-go" type request struct { Method string `json:"method"` Path string `json:"path"` Query map[string]any `json:"query"` } func init() { hivekit.DefineJSON("handler", func(req request) (map[string]any, error) { var visits int64 if _, err := hivekit.StorageGetJSON("visits", &visits); err != nil { return nil, err } visits++ if err := hivekit.StorageSetJSON("visits", visits); err != nil { return nil, err } hivekit.Logf("handled %s %s, visit %d", req.Method, req.Path, visits) return map[string]any{ "status": 200, "headers": map[string]string{"content-type": "application/json"}, "body": map[string]any{"message": "Hello from Hive Functions", "visits": visits}, }, nil }) hivekit.DefineJSON("scheduled", func(event map[string]any) (map[string]int64, error) { return map[string]int64{"ok": 1}, nil }) } func main() {} ``` ### Rust [Section titled “Rust”](#rust) A crate with `src/lib.rs` and `Cargo.toml`. Deploy it with the CLI. Crates in `Cargo.toml` are fetched during the build. ```rust use hivekit::prelude::*; #[hive_export("handler")] fn handler(request: Value) -> Result { let visits = storage::get_json::("visits").unwrap_or(0) + 1; storage::set_json("visits", &visits); log(&format!("handled {} {}, visit {}", request["method"], request["path"], visits)); Ok(json!({ "status": 200, "headers": { "content-type": "application/json" }, "body": { "message": "Hello from Hive Functions", "visits": visits } })) } #[hive_export("scheduled")] fn scheduled(_event: Value) -> Result { Ok(json!({ "ok": true })) } hive_module!(handler, scheduled); ``` The starter `Cargo.toml` depends on `hivekit` and `serde`: ```toml [lib] crate-type = ["cdylib", "rlib"] [dependencies] hivekit = { git = "https://github.com/Necter-Network/hivekit", tag = "v1.0.0" } serde = { version = "1", features = ["derive"] } ``` If you deploy a project without `go.mod` or `Cargo.toml`, the starter one is added for you. ## Builds [Section titled “Builds”](#builds) * A build has up to 5 minutes and produces one Hive Bytecode (`.hbc`) file of up to 20 MB. * The project you upload can be up to 20 MB, not counting dependencies and build output. * TypeScript, JavaScript and Python build one entry file. Name it `handler.ts`, `handler.js` or `handler.py` when the folder has more than one. * The build log is kept with each version and shown when a build fails. ## Prebuilt Hive Bytecode [Section titled “Prebuilt Hive Bytecode”](#prebuilt-hive-bytecode) Already have a `.hbc` file? Upload it as a new version through the [API](/api/) instead of building from source: ```bash curl -X POST "https://api.dockhive.io/api/v1/functions/functions//versions?region=eu" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -F "hbc=@function.hbc" ``` The file should export `handler` (or the function’s configured entry) for HTTP requests. ## Change the entry function [Section titled “Change the entry function”](#change-the-entry-function) `handler` is the default. To answer HTTP requests with another exported function, set the function’s `entry` with `PATCH /api/v1/functions/functions/?region=` and `{"entry": "my_handler"}`. # Limits and regions > Hive Functions plan allowances, compute units, time and size limits, rate limits, error responses and regions. ## Function URLs [Section titled “Function URLs”](#function-urls) Every function gets `https://.fn.dockhive.app`, where `` is the name you chose (lowercase letters, digits and dashes) followed by a short suffix, for example `orders-k3x9`. Any method and any path on that host reach your handler. Calls to a name that doesn’t exist get a `404` page. ## Regions [Section titled “Regions”](#regions) A function lives in the region you pick when you create it, and it runs there: put it close to your users or to the services it calls. It can’t be moved later; create a new function in another region instead. Its URL works from anywhere. | Region | CLI value | | ------------------------ | ---------- | | United States | `us` | | United States (Virginia) | `virginia` | | Europe (London) | `eu` | | Germany | `de` | | Portugal | `pt` | | Asia (Singapore) | `asia` | | India (Mumbai) | `mumbai` | | South Africa | `africa` | | Nigeria (Lagos) | `ng` | | Nigeria (Abuja) | `abuja` | ## Plan allowances [Section titled “Plan allowances”](#plan-allowances) Allowances apply per account, in each region: the function count and the monthly totals are counted separately in every region you use. | Plan | Functions | Requests a month | Compute units a month | | ------------- | --------- | -------------------- | --------------------- | | Free | 5 | 100,000 | 100,000 | | Pay as you go | 50 | 100,000 included | 100,000 included | | Developer | 50 | 2,000,000 included | 2,000,000 included | | Pro | 200 | 20,000,000 included | 20,000,000 included | | Scale | 1,000 | 200,000,000 included | 200,000,000 included | * **Free** has hard limits. When a region’s monthly requests or compute units run out, calls answer `402` (and scheduled runs are skipped) until the next month. Upgrade in **Billing** to keep going. * **Paid plans**, and **Pay as you go** while you have credit, keep running past the included amounts. Extra usage is billed at **$0.10 per million requests** and **$5 per million compute units**. * Monthly totals reset at the start of each calendar month (UTC). The **Hive Functions** page in the console shows your usage. ### Compute units [Section titled “Compute units”](#compute-units) A compute unit measures the work your code does during a run: the instructions it executes, the data it reads and writes, and its built-in calls. A single run can use up to **1 compute unit**; most handlers use a small fraction of that. A run that reaches the limit stops and answers `500` with `{"error": "compute_limit"}`. ## Time and size [Section titled “Time and size”](#time-and-size) | | Limit | | --------------------- | ---------------------------------------------------------------------------------------------------------------- | | Time per run | 30 seconds by default; set from 0.1 to 30 seconds in **Settings > Timeout** | | Request body | 6 MB | | Response | 9 MB as returned by your handler; binary bodies are base64, so about 6 MB of binary data | | Outbound HTTP | 50 requests per run, 10 seconds and 6 MB each way per request ([rules](/hive-functions/storage-and-http/#rules)) | | Environment variables | 4 KB in total | | Secrets | 100 per function, 32 KB each | | Schedules | 10 per function, at least 1 minute apart, 4 KB of input each | | Versions kept | The last 10, for rollback | | Logs kept | The last 500 entries per function | | Builds | 5 minutes; up to 20 MB of source and 20 MB of Hive Bytecode | ## Rate limits [Section titled “Rate limits”](#rate-limits) Each function accepts up to **100 requests a second**, with short bursts up to 200. On the Free plan, each client IP address can also make up to 50 requests a second. Requests over the limit get `429` with `Retry-After: 1`. Need more for a function? Contact support. ## Errors [Section titled “Errors”](#errors) | Status | Body | Meaning | | ------ | ----------------------------------------------- | ------------------------------------------------------------------------------------ | | `500` | `{"error": "function_error", "message": "..."}` | Your code threw or returned an error. The message comes from your code (up to 1 KB). | | `500` | `{"error": "compute_limit"}` | The run used its full compute allowance. | | `504` | `{"error": "timeout", "message": "..."}` | The run didn’t finish within the function’s time limit. | | `402` | `{"error": "plan_limit"}` | The account reached its monthly Free plan allowance in this region. | | `429` | `{"error": "rate_limited"}` | Too many requests; retry after a second. | | `403` | `{"error": "suspended"}` | The account that owns the function is suspended. | | `404` | A “Function not found” page | No function has this name. | Errors also appear in the function’s **Logs**. # Quickstart > Create a Hive Functions function, deploy it from the console or the dockhive CLI, call its URL and read its logs. You can deploy from the console editor or from a project folder with the `dockhive` CLI. TypeScript, JavaScript and Python work in both; Go and Rust deploy from the CLI. * Console ## 1. Create a function [Section titled “1. Create a function”](#1-create-a-function) In the console, open **Hive Functions** and click **New function**. Give it a name, pick a **Language** and the **Region** closest to your users, and create it. The function page shows its URL, for example `https://orders-k3x9.fn.dockhive.app`. DockHive adds a short suffix to the name you chose so every URL is unique. ## 2. Edit and deploy [Section titled “2. Edit and deploy”](#2-edit-and-deploy) The **Code** card opens with a starter handler that echoes the request, counts visits in storage and shows how to call another API. Change it, then click **Deploy**. DockHive builds the code and switches to the new version when the build succeeds. If the build fails, the **Build log** opens with the error and the running version stays as it was. ## 3. Test it [Section titled “3. Test it”](#3-test-it) In the **Test** card, click **Run** to call the deployed version once. Leave **Function** empty to call `handler` with a sample web request, or name another exported function (such as `scheduled`) and give it your own **Input**. The response shows the status, the time it took and the result. ## 4. Call the URL [Section titled “4. Call the URL”](#4-call-the-url) ```bash curl https://orders-k3x9.fn.dockhive.app/hello?name=Ada ``` Any method and any path reach your handler; it reads them from the request it receives. ## 5. Watch the logs [Section titled “5. Watch the logs”](#5-watch-the-logs) **Logs** shows every request (status and duration), anything your code logs, schedule runs, builds and errors. * CLI ## 1. Install and sign in [Section titled “1. Install and sign in”](#1-install-and-sign-in) The `dockhive` CLI is the same one used for [DockHive Tunnel](/tunnel/install/). ```bash curl -fsSL https://dockhive.io/tunnel/install.sh | sh dockhive login ``` ## 2. Start a project [Section titled “2. Start a project”](#2-start-a-project) ```bash mkdir orders && cd orders dockhive functions init --language typescript ``` `init` writes the starter for that language into the folder (`handler.ts`, `handler.js`, `handler.py`, `main.go` with `go.mod`, or `src/lib.rs` with `Cargo.toml`). Languages: `typescript`, `javascript`, `python`, `go`, `rust`. ## 3. Create the function [Section titled “3. Create the function”](#3-create-the-function) ```bash dockhive functions create orders --language typescript --region eu ``` ```text Created orders-k3x9 in eu URL: https://orders-k3x9.fn.dockhive.app ``` Without `--region` the function is created in `us`. Regions: `us`, `virginia`, `eu`, `de`, `pt`, `asia`, `mumbai`, `africa`, `ng`, `abuja`. ## 4. Deploy [Section titled “4. Deploy”](#4-deploy) From the project folder: ```bash dockhive functions deploy orders ``` ```text Uploading 1 files (1 KB) and building orders-k3x9... Version 1 is live: https://orders-k3x9.fn.dockhive.app ``` `deploy` uploads the folder (without `node_modules`, `target`, `.git`, virtual environments, build output and `.env` files), builds it and switches to the new version when the build succeeds. A failed build prints the build log and leaves the running version untouched. Use `--dir` to deploy another folder and `--language` to override the language. You can refer to a function by the name you chose (`orders`) or its full name (`orders-k3x9`). ## 5. Call it [Section titled “5. Call it”](#5-call-it) ```bash dockhive functions invoke orders dockhive functions invoke orders -X POST --path /items -d '{"name":"pen"}' ``` `invoke` calls the function’s URL and prints the status, the time it took and the response body. ## 6. Watch the logs [Section titled “6. Watch the logs”](#6-watch-the-logs) ```bash dockhive functions logs orders # recent lines dockhive functions logs orders -f # keep printing new lines ``` ## Command reference [Section titled “Command reference”](#command-reference) | Command | What it does | | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `dockhive functions list` | Lists your functions in every region, with language, region, live version and URL | | `dockhive functions init [dir] --language ` | Writes a starter project for a language | | `dockhive functions create --language --region ` | Creates a function and prints its URL | | `dockhive functions deploy [--dir .] [--language ]` | Builds the folder and makes it the live version | | `dockhive functions invoke [-X METHOD] [--path /] [-d BODY]` | Calls the function’s URL | | `dockhive functions logs [-f]` | Shows recent logs, or follows them | `dockhive fn` is a short alias for `dockhive functions`. ## Roll back [Section titled “Roll back”](#roll-back) The console’s **Versions** list keeps your last 10 deployed versions. Click **Roll back to this** on any of them to make it live again instantly; nothing is rebuilt. ## Next steps [Section titled “Next steps”](#next-steps) * Write your handler in your language: [Languages](/hive-functions/languages/). * Keep data, call other APIs and use secrets: [Storage, HTTP and secrets](/hive-functions/storage-and-http/). * Run code every few minutes or every night: [Schedules](/hive-functions/schedules/). # Schedules > Run a Hive Functions function on a schedule with cron expressions or @every intervals, in UTC. A schedule runs one of your function’s exported functions at set times: clean up old records every night, sync data every 15 minutes, send a weekly report. No HTTP request needed. ## Add a schedule [Section titled “Add a schedule”](#add-a-schedule) On the function page, open **Settings**, click **Add schedule**, enter the schedule and the function to run (empty means `scheduled`), and save. A function can have up to 10 schedules. Every starter exports a `scheduled` function ready for this: ```js hive.define('scheduled', (event) => { const runs = (db.get('runs') || 0) + 1 db.set('runs', runs) console.log('scheduled run', runs, event.scheduled_time) return { runs } }) ``` Each run appears in **Logs**. To try your scheduled function without waiting, use the **Test** card with `scheduled` in **Function**. ## Schedule format [Section titled “Schedule format”](#schedule-format) All times are **UTC**. The shortest interval is one minute. | Schedule | Runs | | ------------------------------------------ | ----------------------------------------- | | `*/15 * * * *` | Every 15 minutes | | `0 * * * *` | At the start of every hour | | `30 2 * * *` | Every day at 02:30 UTC | | `0 9 * * mon-fri` | Weekdays at 09:00 UTC | | `0 0 1 * *` | On the 1st of every month at midnight UTC | | `@every 5m` | Every 5 minutes | | `@every 2h` | Every 2 hours | | `@hourly`, `@daily`, `@weekly`, `@monthly` | Shorthands for the cron forms | Cron expressions have five fields: minute, hour, day of month, month and day of week. Each field takes `*`, a number, a list (`1,15`), a range (`1-5`) or a step (`*/10`). Months and days can also be written as names (`jan`, `mon`). `@every` takes whole minutes (`m`) or hours (`h`). ## What your scheduled function receives [Section titled “What your scheduled function receives”](#what-your-scheduled-function-receives) ```json { "cron": "*/15 * * * *", "scheduled_time": "2026-10-19T09:15:00Z", "function": { "name": "orders-k3x9", "version": 3 }, "input": null } ``` `input` is the schedule’s own input, if you gave it one. ## Pass your own input [Section titled “Pass your own input”](#pass-your-own-input) Through the API, a schedule can carry its own JSON `input` (up to 4 KB), which your function reads as `event.input`, so one function can serve several schedules: ```bash curl -X PATCH "https://api.dockhive.io/api/v1/functions/functions/?region=eu" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"schedules": [ {"cron": "0 2 * * *", "function": "cleanup", "input": {"older_than_days": 30}}, {"cron": "@every 15m"} ]}' ``` `function` defaults to `scheduled`. Sending `schedules` replaces the whole list. ## Good to know [Section titled “Good to know”](#good-to-know) * Schedules run in the function’s region and use its latest version. * Each run counts as a request and uses compute like any other run, within the same [time limit](/hive-functions/limits/#time-and-size). * If a run can’t happen at its time (for example during maintenance), it isn’t run later; the next run happens on schedule. Write scheduled work so a skipped run catches up on the next one. # Storage, HTTP and secrets > Built-in per-function storage, outbound HTTP requests and their rules, secrets, environment variables and logs in Hive Functions, with the built-in module addresses for calling them directly. Every function comes with storage, outbound HTTP, secrets, environment variables and logs. Nothing to set up or connect. ## Storage [Section titled “Storage”](#storage) Each function has its own key-value storage. Values you write stay there across requests, deploys and rollbacks, so a counter, a cache or a small record of state survives a new version of your code. No other function can read it. | Language | Read | Write | | ---------- | --------------------------------------------------- | ------------------------------------- | | JavaScript | `db.get('visits')` | `db.set('visits', 42)` | | TypeScript | `storage.get("visits")` (a string; `""` when unset) | `storage.set("visits", "42")` | | Python | `hive.db.get("visits", 0)` | `hive.db.set("visits", 42)` | | Go | `hivekit.StorageGetJSON("visits", &v)` | `hivekit.StorageSetJSON("visits", v)` | | Rust | `storage::get_json::("visits")` | `storage::set_json("visits", &v)` | For larger or shared data, connect to a [DockHive database](/databases/) or a [Hive Buckets](/buckets/) bucket over HTTP. ## Outbound HTTP [Section titled “Outbound HTTP”](#outbound-http) Call any public API with the built-in `http` module’s `fetch`. The request and response are JSON: ```js const HTTP = '0xbb511886ad14a78759cdf7d39eb4ec884dc9218958c7568ae7626537ef727677' const res = hive.tryCall(HTTP, 'fetch', { method: 'POST', url: 'https://api.example.com/v1/items', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ name: 'pen' }), timeout_ms: 5000, }) // res = { status: 201, headers: { ... }, body: '...' }, or null if the request failed ``` **Request:** `method`, `url`, `headers`, `body` (a string), optional `body_encoding: "base64"` for binary bodies, optional `timeout_ms`. **Response:** `status`, `headers` (repeated headers joined with `, `), `body`, and `body_encoding: "base64"` when the response isn’t UTF-8 text. ### Rules [Section titled “Rules”](#rules) * `http` and `https` URLs on ports **80, 443, 8080 and 8443**. * Only public addresses. Private, loopback, link-local and cloud-metadata addresses are refused, including when a public host name resolves to one. * Redirects aren’t followed: a `3xx` comes back to your code as is, so you decide whether to follow it. * Up to **10 seconds** per request (less when your function’s own time limit is closer), **6 MB** per request body and per response body, and **50 requests** per run. * Bytes sent and received count as bandwidth. ### Restrict outbound hosts [Section titled “Restrict outbound hosts”](#restrict-outbound-hosts) In **Settings > Allowed outbound hosts**, list the hosts your function may reach, one per line: `api.example.com`, or `*.example.com` for its subdomains (up to 50). Leave it empty to allow any public host. A good safeguard for functions that handle untrusted input. ## Secrets [Section titled “Secrets”](#secrets) Store API keys, tokens and passwords in **Settings > Secrets**. Values are encrypted, never shown again after you save them: the console and the API list only their names. Read a secret from your code with the `secrets` module: ```js const SECRETS = '0x1d142710be03a758244c1f2f40615c23123c4033f435dbab16b0df490515255b' const token = hive.callRaw(SECRETS, 'get', 'API_TOKEN') ``` ```python SECRETS = "0x1d142710be03a758244c1f2f40615c23123c4033f435dbab16b0df490515255b" token = hive.call_raw(SECRETS, "get", "API_TOKEN") ``` Reading a secret that isn’t set fails with `not_found`. Names look like `API_TOKEN` (capital letters, digits and `_`, starting with a letter or `_`, up to 64 characters). A function can have up to 100 secrets of up to 32 KB each. ## Environment variables [Section titled “Environment variables”](#environment-variables) For plain configuration (not secrets), set **Settings > Environment variables**, one `NAME=value` per line, up to 4 KB in total. They arrive in every request as `request.env`, and you can also read one with the `env` module, which returns `""` when it isn’t set: ```js const ENV = '0x8b5ff77cfa96b0215a236ebf141f0361cbf83d592cf27f041397f596b1470f8e' const storeName = hive.callRaw(ENV, 'get', 'STORE_NAME') ``` ## Logs [Section titled “Logs”](#logs) `console.log` (JavaScript), `hive.log` (TypeScript, Python), `hivekit.Logf` (Go) and `log` (Rust) all write to the function’s **Logs**, next to an entry for every request (status, duration), schedule run, build and error. The last 500 entries per function are kept. To log with a level, call the `log` module directly: ```python LOG = "0x3586923c83c95e54cbd377612c0f8fe931b5b5bf7644d4e1f91557d6e28cfce4" hive.call_raw(LOG, "write", {"level": "warn", "message": "stock is low"}) ``` Follow logs from your terminal with `dockhive functions logs -f`. ## Built-in module reference [Section titled “Built-in module reference”](#built-in-module-reference) The starters already define these addresses. If you call the modules directly, use `hive.call` / `hive.tryCall` (JavaScript, TypeScript), `hive.call` / `hive.try_call` / `hive.call_raw` (Python), `hivekit.Call` (Go) or `hivekit::call` / `call_json` (Rust). | Module | Address | Function | Input → output | | --------- | -------------------------------------------------------------------- | -------- | -------------------------------------------- | | `http` | `0xbb511886ad14a78759cdf7d39eb4ec884dc9218958c7568ae7626537ef727677` | `fetch` | request JSON → response JSON | | `secrets` | `0x1d142710be03a758244c1f2f40615c23123c4033f435dbab16b0df490515255b` | `get` | `"NAME"` → the value; fails with `not_found` | | `env` | `0x8b5ff77cfa96b0215a236ebf141f0361cbf83d592cf27f041397f596b1470f8e` | `get` | `"NAME"` → the value, or `""` | | `log` | `0x3586923c83c95e54cbd377612c0f8fe931b5b5bf7644d4e1f91557d6e28cfce4` | `write` | `{"level", "message"}` → `""` | ### When a call fails [Section titled “When a call fails”](#when-a-call-fails) `tryCall` returns `null` (`None` in Python) and `call` raises. To see why, ask the same module for its last error in this run: ```ts const HTTP = "0xbb511886ad14a78759cdf7d39eb4ec884dc9218958c7568ae7626537ef727677"; const res = hive.tryCall(HTTP, "fetch", "{\"method\":\"GET\",\"url\":\"https://example.com/\"}"); if (res === null) hive.log("fetch failed: " + hive.call(HTTP, "last_error", "")); ``` Typical messages: `not_found`, `port 22 is not allowed (80, 443, 8080, 8443)`. ### More examples [Section titled “More examples”](#more-examples) Go: ```go const httpModule = "0xbb511886ad14a78759cdf7d39eb4ec884dc9218958c7568ae7626537ef727677" in, _ := json.Marshal(map[string]string{"method": "GET", "url": "https://example.com/"}) out, err := hivekit.Call(httpModule, "fetch", in) ``` Rust: ```rust const HTTP: &str = "0xbb511886ad14a78759cdf7d39eb4ec884dc9218958c7568ae7626537ef727677"; let res = call_json(HTTP, "fetch", &json!({ "method": "GET", "url": "https://example.com/" }))?; ``` Each built-in call uses a small, fixed amount of compute plus a little per byte sent and received. # HivePods > HivePods are cloud dev environments on DockHive. Pick an operating system and a size, and you have a machine with a terminal in seconds. A **HivePod** is your own cloud dev environment, ready in seconds. Pick an operating system, choose how much power you need, and you’re in: open a terminal in your browser or from your own computer with the [`hivepod` CLI](/cli/). Use HivePods to: * code and test on a fresh Linux machine, * run things that aren’t web apps, such as background workers, bots and scripts, * host a small web server on its own address. ## Operating systems [Section titled “Operating systems”](#operating-systems) Linux pods start in seconds: | Slug | Name | | --------------------- | ------------------------------------------ | | `ubuntu-24.04` | Ubuntu 24.04 LTS (default) | | `ubuntu-22.04` | Ubuntu 22.04 LTS | | `ubuntu-20.04` | Ubuntu 20.04 LTS | | `debian-12` | Debian 12 (Bookworm) | | `debian-11` | Debian 11 (Bullseye) | | `fedora-40` | Fedora 40 | | `rockylinux-9` | Rocky Linux 9 | | `almalinux-9` | AlmaLinux 9 | | `centos-stream9` | CentOS Stream 9 | | `oraclelinux-9` | Oracle Linux 9 | | `amazonlinux-2023` | Amazon Linux 2023 | | `opensuse-leap-15` | openSUSE Leap 15 | | `opensuse-tumbleweed` | openSUSE Tumbleweed | | `archlinux` | Arch Linux | | `alpine-3.20` | Alpine Linux 3.20 | | `kali-rolling` | Kali Linux (Rolling), Micro size or larger | Run `hivepod os --all` to see what you can launch right now. Full-machine images (Windows and FreeBSD) appear in the catalog but aren’t available in every region yet. ## Sizes [Section titled “Sizes”](#sizes) | Size | vCPU | Memory | Disk | Always on, per month | | --------------- | ------- | ----------- | ------------ | -------------------- | | Nano | 0.5 | 512 MB | 5 GB | $1 | | Micro (default) | 1 | 1 GB | 10 GB | $2 | | Small | 2 | 2 GB | 25 GB | $4 | | Medium | 4 | 4 GB | 50 GB | $8 | | Custom (CLI) | up to 8 | up to 16 GB | up to 200 GB | $2 per vCPU | Compute is billed by the hour while a pod runs, so a stopped pod costs nothing, and your plan’s included vCPU-hours come off first. See [Plan limits](/hivepods/limits/). ## Each pod gets [Section titled “Each pod gets”](#each-pod-gets) * a shell signed in as `root`, * a web address, `https://.dockhive.sh`, which serves whatever listens on **port 80** inside the pod, with HTTPS, * two folders that survive everything: `/home/hivepod/data` and `/home/hivepod/projects`, * the environment variables `HIVE_POD_ID` and `HIVE_POD_NAME`. ## In this section [Section titled “In this section”](#in-this-section) * [Create a pod](/hivepods/create/) * [Connect](/hivepods/connect/) * [Manage and startup command](/hivepods/manage/) * [Custom domains](/hivepods/custom-domains/) * [Backups](/hivepods/backups/) * [Limits](/hivepods/limits/) # App Marketplace > Install ready-made apps like WordPress, Ghost, Uptime Kuma or Nextcloud in a HivePod in one click, or run any public Docker image. The App Marketplace installs a ready-made app in a new HivePod: pick it, choose a size and region, and it’s running in about a minute at its own HTTPS address. Open it from **HivePods → App Marketplace** in the console, or choose **Start from an app** when you create a pod. ## What’s in it [Section titled “What’s in it”](#whats-in-it) More than 900 open-source apps, grouped like an app menu: websites and blogs (WordPress, Ghost), AI tools (Open WebUI with Ollama, OpenClaw), automation, developer tools (Gitea, Code Server), analytics (Plausible, Umami, Matomo), files and photos (Nextcloud, Immich), passwords (Vaultwarden), monitoring (Uptime Kuma, Grafana), office and productivity, chat, games and more. Search by name or browse by category; **Featured** apps are hand-checked by the DockHive team. ## Apps that need a database [Section titled “Apps that need a database”](#apps-that-need-a-database) Apps such as WordPress, Ghost or Nextcloud come with their own database inside the same HivePod. It’s set up for you, with its own generated password, and only the app can reach it. You pay for the pod’s size only, nothing extra for the database. ## Size and price [Section titled “Size and price”](#size-and-price) Each app shows the smallest size it needs, and smaller sizes can’t be picked. An app pod is billed like any HivePod: by the hour while it runs, from your plan’s included vCPU-hours first. Always on, that’s Nano $1, Micro $2, Small $4 and Medium $8 a month. A stopped pod costs nothing. ## Your data and backups [Section titled “Your data and backups”](#your-data-and-backups) An app’s data (your site’s files, its database, uploads) is kept on the pod’s disk and survives restarts. [Backups](/hivepods/backups/) include all of it, and restoring a backup brings back the same app with the same data. ## Any Docker image [Section titled “Any Docker image”](#any-docker-image) The **Any Docker image** tab runs a public image from Docker Hub, GitHub Container Registry or Quay. Search Docker Hub or type the image (`user/app:tag`), then set: * the **web port** the app listens on (leave it empty for apps with no web page), * the **folders to keep** (for example `/data`), up to 5, * any **environment variables** the image expects. ## After installing [Section titled “After installing”](#after-installing) The pod page shows the app’s icon and address. Most apps ask you to create the first admin account the first time you open them: do that straight away. If an app can’t start, the pod page says why, for example when an image can’t be downloaded. The app catalog is built from open-source projects: Portainer templates (lissy93), BigBear CasaOS, the CasaOS App Store and Coolify. Icons come from Dashboard Icons and Simple Icons. # HivePod backups > Back up a HivePod's data and projects folders with the hivepod CLI and restore them to a new pod. Back up a pod’s important folders and bring them back on a new pod. Backups are taken with the [`hivepod` CLI](/cli/); automated backups in the console are coming soon. ## What a backup contains [Section titled “What a backup contains”](#what-a-backup-contains) * `/home/hivepod/data` and `/home/hivepod/projects`, * the pod’s settings: OS, size, environment variables and startup command. Anything outside those two folders isn’t backed up. ## Create a backup [Section titled “Create a backup”](#create-a-backup) ```sh hivepod backup create web1 --name before-upgrade ``` The pod can be running, stopped or suspended. Without `--name`, the backup is named after the pod and the time. ## List backups [Section titled “List backups”](#list-backups) ```sh hivepod backup list # all backups hivepod backup list web1 # one pod ``` ## Restore to a new pod [Section titled “Restore to a new pod”](#restore-to-a-new-pod) A restore always creates a **new** pod with the same OS, size and settings. Give it a new name: ```sh hivepod backup restore 3f2a9c1b web1-restored ``` You can change the subdomain or size with `--subdomain` and `--size` (or `--cpu`, `--ram`, `--disk`). The new pod counts toward your plan. ## Delete a backup [Section titled “Delete a backup”](#delete-a-backup) ```sh hivepod backup rm 3f2a9c1b ``` ## Backups of deleted pods [Section titled “Backups of deleted pods”](#backups-of-deleted-pods) Deleting a pod **keeps its backups for 7 days**. Until then you can restore them into a new pod; after that they are deleted automatically. ```sh hivepod backup list --deleted # backups of deleted pods, and the date each is kept until hivepod backup restore 3f2a9c1b web1-again # restore one into a new pod hivepod backup rm 3f2a9c1b # or delete it now ``` In the console, the **HivePods** page lists them under **Backups of deleted HivePods**, with **Restore to new HivePod** and **Delete now**. Kept backups no longer belong to a pod, so they don’t count toward a new pod’s 3-backup limit. They are deleted on schedule even if your account is paused for running out of credit. ## Limits [Section titled “Limits”](#limits) * Up to 3 backups per pod, each up to 20 GB. * Full-machine pods (Windows, FreeBSD) can’t be backed up. * A deleted pod’s backups are kept for 7 days, then deleted automatically. # CI/CD to a HivePod > Deploy to a HivePod from GitHub Actions (or any CI) with an API key, background jobs that run longer than 20 seconds, and a deploy key inside the pod. You can deploy to a HivePod from any CI system. The pattern is: 1. CI signs in with a DockHive **API key**. 2. It starts the deploy as a **background job** in the pod (`hivepod exec --detach`). 3. It follows the job until it ends (`hivepod job status --follow`). The CI step passes or fails with the job’s exit code. The pod pulls your code itself, with a **deploy key** that you keep in the pod. Why a background job? `hivepod exec` is for quick commands and stops after about 20 seconds. A background job can run for up to 6 hours. It keeps running if the CI runner disconnects, and you can follow it from anywhere. ## 1. Set up the pod once [Section titled “1. Set up the pod once”](#1-set-up-the-pod-once) Open a terminal in the pod (`hivepod connect web1`, or the console’s web terminal). Install git and the SSH client if your OS image doesn’t have them: ```sh apt-get update && apt-get install -y git openssh-client # Ubuntu / Debian ``` Create a deploy key and trust GitHub’s host key: ```sh ssh-keygen -t ed25519 -f ~/.ssh/github_deploy -N "" -C "dockhive-web1" cat >> ~/.ssh/config <<'EOF' Host github.com IdentityFile ~/.ssh/github_deploy IdentitiesOnly yes EOF ssh-keyscan github.com >> ~/.ssh/known_hosts cat ~/.ssh/github_deploy.pub ``` On GitHub, open your repository’s **Settings → Deploy keys → Add deploy key**. Paste the public key and leave **Allow write access** off. Clone the repository into the projects folder: ```sh git clone git@github.com:you/app.git /home/hivepod/projects/app ``` What survives a re-create `~/.ssh` lives on the pod’s data volume (`/home/hivepod/data/.ssh`), so the key and `known_hosts` survive restarts and [applying settings](/hivepods/environment/#applying-settings-re-creates-the-pod). Pods created before October 2026 get this on their next restart. The clone is in `/home/hivepod/projects`, which is kept too. Packages you install with `apt-get`, `dnf` or `apk` are **not** kept when the pod is re-created, so the deploy script below installs git again if it’s missing. ## 2. Create an API key [Section titled “2. Create an API key”](#2-create-an-api-key) In the console, go to **Settings → API Keys → Create API Key** and choose **Full access**. A read-only key can check jobs but can’t start them. Add the key to your CI’s secrets as `DOCKHIVE_API_KEY`. See [API keys](/api/api-keys/). ## 3. GitHub Actions workflow [Section titled “3. GitHub Actions workflow”](#3-github-actions-workflow) `.github/workflows/deploy.yml`: ```yaml name: Deploy to HivePod on: push: branches: [main] concurrency: group: deploy-web1 # one deploy at a time cancel-in-progress: false jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/setup-python@v5 with: python-version: "3.12" - run: pip install "hivepods-cli>=0.3" - name: Deploy env: HIVEPODS_TOKEN: ${{ secrets.DOCKHIVE_API_KEY }} run: | JOB=$(hivepod exec --detach --timeout 1800 web1 ' set -e command -v git >/dev/null || (apt-get update && apt-get install -y git openssh-client) cd /home/hivepod/projects/app git fetch origin main git reset --hard origin/main ./deploy.sh ') echo "Started job $JOB" hivepod job status web1 "$JOB" --follow ``` `hivepod exec --detach` prints the job id and returns. `hivepod job status --follow` streams the job’s output into the CI log and polls less often while nothing is happening. It exits with the job’s exit code: `0` on success, the command’s own code on failure, `124` if the job hit its timeout and `130` if it was cancelled. Replace `./deploy.sh` with your own steps, for example `npm ci && npm run build && pm2 reload app`. To restart a server that runs as the pod’s [startup command](/hivepods/manage/#startup-command), finish with a restart from CI (`hivepod restart web1`). A restart ends any jobs still running in the pod, so do it after the job. ### Other CI systems [Section titled “Other CI systems”](#other-ci-systems) Anything that can run Python 3.9+ works the same way. Set `HIVEPODS_TOKEN` from a secret and run the same two commands. In GitLab CI, for example: ```yaml deploy: image: python:3.12-slim script: - pip install "hivepods-cli>=0.3" - JOB=$(hivepod exec --detach --timeout 1800 web1 "cd /home/hivepod/projects/app && git pull --ff-only && ./deploy.sh") - hivepod job status web1 "$JOB" --follow only: [main] ``` ## Background jobs [Section titled “Background jobs”](#background-jobs) | Command | What it does | | ----------------------------------------------- | --------------------------------------------------------- | | `hivepod exec --detach [--timeout S] POD "CMD"` | Start a job and print its id. | | `hivepod exec --detach --follow POD "CMD"` | Start a job and stream it until it ends. | | `hivepod job status POD ID` | Status, exit code and the last lines of output. | | `hivepod job status POD ID --follow` | Stream the output until the job ends; exit with its code. | | `hivepod job status POD ID --wait` | Wait without printing the output. | | `hivepod jobs POD` | Recent jobs. | | `hivepod job cancel POD ID` | Stop a job and everything it started. | * A job runs as `root`, from `/home/hivepod/projects`, with `/bin/sh`. Use `bash -lc "..."` if you need bash features or your login profile. * Default timeout: 1 hour. Maximum: 6 hours (`--timeout 21600`). * Up to 3 jobs run at once per pod. A pod keeps its 20 most recent jobs. * The pod must be running. Stopping, restarting or re-creating the pod ends its jobs. * Very chatty jobs keep only the last part of their output: about 2 MB once the log passes 10 MB. * Job ids accept a unique prefix, as shown by `hivepod jobs`. The API behind these commands is `POST /api/v1/hivepods//jobs/`, `GET …/jobs//` and `POST …/jobs//cancel/`. AI assistants can use the [MCP](/cli/mcp/) tools `start_pod_job`, `pod_job_status` and `cancel_pod_job`. ## Troubleshooting [Section titled “Troubleshooting”](#troubleshooting) * **Temporary errors while DockHive deploys an update.** The CLI retries status checks, and `start`/`stop`/`restart`, a couple of times by itself. If an error still gets through, its message includes the HTTP status and a request id. Quote both when you contact support. * **`pip install` or `npm ci` fails with “Permission denied” in /tmp.** `/tmp` is small and doesn’t allow running programs. Jobs, `exec` and terminals point `TMPDIR` at the data volume for you. If your build script sets its own temporary folder, use `$TMPDIR` or `/home/hivepod/data/.tmp`. See [Files, limits and environment](/hivepods/environment/). * **The pod is low on disk.** `hivepod status web1` shows disk used against the pod’s size. # Connect to a HivePod > Open a terminal in your HivePod from the browser or with hivepod connect, run one-off commands, and reach its web address. ## Web terminal [Section titled “Web terminal”](#web-terminal) Open the pod in the console. The **Web Terminal** card opens a shell signed in as `root`, right in your browser. The pod must be running. ## From your computer [Section titled “From your computer”](#from-your-computer) With the [`hivepod` CLI](/cli/): ```sh hivepod connect web1 ``` This opens an interactive shell. Press `Ctrl`+`D` to leave. It works on macOS, Linux and Windows. Run a single command and get its output and exit code: ```sh hivepod exec web1 "ls -la && pwd" ``` One-off commands stop after 20 seconds. For builds, installs and other long work, run a **background job**. It keeps running after you disconnect, for up to 6 hours: ```sh hivepod exec --detach web1 "cd /home/hivepod/projects/app && npm ci && npm run build" hivepod job status web1 --follow ``` See [CI/CD to a pod](/hivepods/ci-cd/#background-jobs) for all the job commands. Note You connect to a pod with the web terminal or the CLI; pods don’t offer SSH access. Root passwords and public IP addresses are coming soon. ## Copy files [Section titled “Copy files”](#copy-files) `hivepod cp` copies files and folders between your computer and a running pod: ```sh hivepod cp ./site web:/home/hivepod/projects/site # upload a folder hivepod cp ./site/. web:/home/hivepod/projects/site # upload just its contents hivepod cp notes.txt web:app/README.txt # relative paths are under /home/hivepod/projects hivepod cp web:/home/hivepod/data/dump.sql . # download a file hivepod cp web:/home/hivepod/projects/app ./app-copy # download a folder under a new name ``` * One side is `POD:PATH`, where POD is the pod’s name or id. The pod must be running. * Only `/home/hivepod/projects` and `/home/hivepod/data` (and anything inside them) can be read or written: the folders that survive restarts, `apply` and backups. `~` means `/home/hivepod`. * A folder copied to an existing folder lands inside it; copied to a path that doesn’t exist yet, it becomes that path. * Nothing is left out, `.env` files included: `cp` copies exactly what you point it at. Sockets, devices and links pointing outside the copied folder are skipped with a warning. * Uploads and downloads are limited to 200 MiB each (packed). For bigger trees, leave out dependencies and build output and reinstall them in the pod. * Uploads are sent in chunks with a progress bar and resume after a dropped connection. * Team viewers can download but not upload. AI assistants can do the same with the MCP server’s `pod_upload` and `pod_download` tools. ## Web address [Section titled “Web address”](#web-address) Anything listening on **port 80** inside the pod is served at `https://.dockhive.sh`, with HTTPS handled for you. For example: ```sh hivepod exec web1 "nohup python3 -m http.server 80 >/dev/null 2>&1 &" ``` To keep a server running across restarts, make it the pod’s [startup command](/hivepods/manage/#startup-command). If nothing is listening, visitors see *This pod is running, but nothing is answering on port 80* (with your port), so it’s clear the pod is up and only the app needs starting. A stopped pod shows *This pod is stopped*, and one that’s starting shows *This pod is starting*. Want your own domain? See [Custom domains for HivePods](/hivepods/custom-domains/). ## From an AI assistant [Section titled “From an AI assistant”](#from-an-ai-assistant) The [MCP server](/cli/mcp/) has `list_pods`, `create_pod`, `exec_in_pod`, `start_pod_job`, `pod_job_status`, `cancel_pod_job`, `pod_upload`, `pod_download` and `delete_pod` tools. # Create a HivePod > Create a HivePod from the console or with the hivepod CLI. * Console Go to **HivePods** and click **Create HivePod**. The wizard has six steps: 1. **Choose OS**: see the [operating systems](/hivepods/#operating-systems). 2. **Select Plan**: a size (Nano, Micro, Small or Medium). 3. **Choose Region**: a region close to you. 4. **SSH Keys**: skip it. Pods don’t use SSH; you connect with the web terminal or the CLI. 5. **Configure**: * **HivePod Name**: 3 to 64 lowercase letters, digits and hyphens (or click **Generate**). * **Hostname** (optional): used for the pod’s web address. Leave it empty to generate one from the name. * **Startup script** (optional): a command that runs whenever the pod starts. See [Startup command](/hivepods/manage/#startup-command). 6. **Review**, then create. * CLI Run the wizard: ```sh hivepod create ``` It asks for a name, OS, size, region, environment variables, a startup command and a subdomain, then shows a summary. Or script it: ```sh hivepod create web1 --os ubuntu-24.04 --size small --region eu \ --subdomain web1 --env APP_ENV=dev --cmd "python3 -m http.server 80" ``` A custom size needs all three of `--cpu`, `--ram` and `--disk`: ```sh hivepod create big1 --os debian-12 --cpu 4 --ram 8g --disk 80g ``` ## What it costs [Section titled “What it costs”](#what-it-costs) Before you create a pod, the console’s **Review** step and `hivepod create` show what the size costs on your plan: * the vCPU-hours it uses in a month if it runs all the time (vCPUs × 730 hours; a Small pod with 2 vCPU is about 1,460 vCPU-hours), * how many of those your plan’s remaining included vCPU-hours cover this billing period, * and the rest as overage, at $2 per vCPU-month on paid plans (billed by the hour). ```text Estimated cost 2 vCPU running all month ≈ 1,460 vCPU-hours (≈$4/mo · $0.0055/hr) 700 of 730 included vCPU-hours left this period on Developer Plan 700 vCPU-hours included, 760 over → ≈$2.08 a month at $2/vCPU-month (only while it runs; stop it to pause the meter). ``` The Free Tier has hard limits and is never charged: the estimate tells you how many hours your included vCPU-hours cover at that size. A stopped pod uses no vCPU-hours. See [Usage and billing](/billing/usage/) for how usage is measured. Provisioning runs in the background. Check it with `hivepod status ` or on the pod’s page in the console; it’s ready when the status is **running**. ## The pod’s address [Section titled “The pod’s address”](#the-pods-address) The address is `https://.dockhive.sh`. If you don’t choose a subdomain, DockHive generates one from the name, such as `web1-a3f9c2`. The CLI wizard uses the pod’s name as its subdomain by default. Subdomains are unique and some names are reserved. # Custom domains for HivePods > Serve any of your HivePod's addresses, the main one or an exposed port, on your own domain with automatic HTTPS. Serve any of your pod’s addresses on your own domain, with HTTPS issued automatically: the main address (port 80), or a port you [exposed](/hivepods/ports/), such as your API on port 5100. 1. Open the pod in the console and find the **Custom domains** card. Enter your domain and add it. If the pod has exposed ports, choose which address the domain serves; the default is the main address. 2. Create the two records shown at your DNS provider: | Type | Name (host) | Value | | ------- | ----------------------------- | ------------------------------------------------- | | `CNAME` | `app` (for `app.example.com`) | the target shown, like `web1.pods.dockhive.cloud` | | `TXT` | `_dockhive-verification.app` | the verification token shown | Each address has its own target: a domain for port 5100 on `web1` points at something like `web1-5100.pods.dockhive.cloud`. Copy the target the console shows for that domain. 3. Click **Verify**. DockHive also checks every few minutes on its own. DNS changes can take up to 48 hours. 4. Once verified, the HTTPS certificate is issued and the domain shows **active**. Use DNS-only records Point the records straight at DockHive. If your DNS provider has a proxy or CDN mode, turn it off for these records, or the domain can’t get a certificate. ## From the CLI [Section titled “From the CLI”](#from-the-cli) ```sh hivepod domain add web1 www.example.com # the main address hivepod domain add web1 api.example.com --port 5100 # an exposed port hivepod domain verify web1 api.example.com hivepod domain list web1 hivepod domain rm web1 api.example.com ``` `domain add` prints the records to create. Removing an exposed port also removes the domains attached to it. **Root domains** (`example.com`): add the target as an **ALIAS**, **ANAME** or **flattened CNAME** record. If your provider supports none of these, point `www` at the target and forward the root domain to `www`. ## Limits [Section titled “Limits”](#limits) * Up to 5 custom domains per pod. * A domain can belong to only one pod or app. Verify within 72 hours of adding it, or the claim lapses. * Up to 5 new certificates per account per day. The same rules apply to [custom domains for apps](/apps/custom-domains/). # Files, limits and environment > Which folders in a HivePod are kept, where temporary files go, how to see the pod's real CPU, memory and disk limits, and what applying settings resets. ## Persistent folders [Section titled “Persistent folders”](#persistent-folders) A HivePod keeps two folders on its own volumes: | Folder | Use it for | | ------------------------ | ----------------------------------------------------- | | `/home/hivepod/projects` | Your code and repositories. | | `/home/hivepod/data` | Data, caches, databases, keys, anything else to keep. | Everything else (the operating system, packages you install with `apt-get`, `dnf` or `apk`, files in `/root`, `/etc` or `/usr`) belongs to the pod itself. It survives stops and restarts, but it’s **reset when the pod is re-created**. [Backups](/hivepods/backups/) contain the two persistent folders. ### Applying settings re-creates the pod [Section titled “Applying settings re-creates the pod”](#applying-settings-re-creates-the-pod) Changes to environment variables or the startup command take effect when you **apply** them, and applying re-creates the pod from its OS image: * `/home/hivepod/data` and `/home/hivepod/projects` are kept. * Root’s `~/.ssh` is kept: it’s a link to `/home/hivepod/data/.ssh`, so deploy keys and `known_hosts` survive. Pods created before October 2026 get the link on their next restart. * Installed packages and every other file are reset to the image. The CLI warns you before applying. A setup script makes reinstalling easy. Keep one in `/home/hivepod/data`, for example `setup.sh` with your `apt-get install …` line, and run it after an apply: ```sh hivepod exec --detach --follow web1 "sh /home/hivepod/data/setup.sh" ``` ## Temporary files [Section titled “Temporary files”](#temporary-files) `/tmp` is a small (1 GB) area that doesn’t allow running programs from it, for safety. Some installs unpack helpers there and run them, so pip, npm and native builds can fail with *Permission denied*. So every terminal, `hivepod exec` and background job gets: | Variable | Value | | ------------------ | ------------------------------- | | `TMPDIR` | `/home/hivepod/data/.tmp` | | `npm_config_cache` | `/home/hivepod/data/.cache/npm` | | `PIP_CACHE_DIR` | `/home/hivepod/data/.cache/pip` | These are on the data volume, so they count toward your pod’s disk. Files in `.tmp` that haven’t been touched for two days are removed when the pod starts. If you set `TMPDIR` yourself in the pod’s [environment variables](/hivepods/manage/#environment-variables), yours wins. ## Your pod’s limits [Section titled “Your pod’s limits”](#your-pods-limits) Inside a pod, `free`, `top` and `/proc/meminfo` show your pod’s memory, and `nproc` shows its CPUs, so tools that size themselves from these see the pod, not the whole machine. `df` on `/home/hivepod/data` and `/home/hivepod/projects` shows each folder’s size; `df /` still shows the machine’s disk. For everything in one place, run: ```sh hivepod-info ``` ```plaintext HivePod limits: CPU 2.00 vCPU Memory 412 MiB used of 2048 MiB Disk 12345 MiB used of 60G (measured 2026-10-05T14:00Z; run hivepod-info --measure for now) ``` The same values are in the variables `HIVEPOD_CPU_LIMIT`, `HIVEPOD_MEMORY_LIMIT` and `HIVEPOD_DISK_LIMIT`, for scripts that size worker counts or caches. A pod’s CPU and memory limits are enforced. A process that goes over the memory limit is stopped. ## Disk usage [Section titled “Disk usage”](#disk-usage) Your pod’s size is its disk limit. `/home/hivepod/data` and `/home/hivepod/projects` are each created with that size, and writing past it fails with *No space left on device*. DockHive also measures each running pod’s disk use about every 10 minutes. That covers the two persistent folders plus everything installed in the pod. You can see it with: * `hivepod status web1`: for example `disk 12.3 GB of 60.0 GB (21%)`, with a warning from 90%, * `hivepod-info` inside the pod. Keep your pod within its size. Free space by cleaning `/home/hivepod/data/.cache` and old builds, or move to a bigger size. * **Over its size**: the pod can’t start new background jobs. `hivepod exec` and the terminal keep working, so you can clean up. * **More than 10% over its size**: the pod is stopped, and `hivepod status` says why. Start it again and free space within 30 minutes. If it’s still well over its size after that, it’s stopped again. Note `df /` inside a pod shows the machine’s disk, which can be more than your pod’s size allows. Use `df /home/hivepod/data`, `hivepod status` or `hivepod-info` instead. # HivePod limits > How many HivePods, vCPU, memory and disk each DockHive plan includes, and how pod usage is billed. | | Free Tier | Developer | Pro | Scale | | ----------------------------- | --------- | --------- | ------ | ------ | | HivePods | 1 | 5 | 15 | Custom | | Total vCPU | 1 | 4 | 12 | Custom | | Total memory | 1 GB | 8 GB | 24 GB | Custom | | Total disk | 10 GB | 100 GB | 300 GB | Custom | | Included vCPU-hours per month | 365 | 730 | 2,190 | Custom | * Limits add up across all regions. * The pod count and disk include stopped pods. vCPU and memory only count running pods, so stopping a pod frees them. * Over a limit, you’ll see a message such as *“Your Free Tier plan allows … — upgrade in Billing.”* * On paid plans, vCPU-hours beyond the included amount cost $2 per vCPU-month (about $0.0027 per vCPU-hour); memory is included. Always on, that’s Nano $1, Micro $2, Small $4 and Medium $8 a month. See [Usage and overage](/billing/usage/). * Data your pods send to the internet counts toward your plan’s bandwidth. Per pod: * Custom sizes up to 8 vCPU, 16 GB memory and 200 GB disk. * `/tmp` is 1 GB and doesn’t allow running programs. `TMPDIR` points at `/home/hivepod/data/.tmp` instead; see [Files, limits and environment](/hivepods/environment/#temporary-files). * Up to 512 processes. * One-off `hivepod exec` commands run for up to 20 seconds. * Background jobs (`hivepod exec --detach`) run for up to 6 hours (1 hour by default), with up to 3 at once. See [CI/CD to a pod](/hivepods/ci-cd/#background-jobs). * Disk: your pod’s size is its limit. A pod more than 10% over it is stopped until you free space; see [Disk usage](/hivepods/environment/#disk-usage). `hivepod status` and `hivepod-info` show how much you use. `free`, `nproc` and `df /home/hivepod/data` inside a pod show your pod’s own memory, CPUs and disk. # Manage HivePods > Start, stop, restart, suspend and resume HivePods, set environment variables and a startup command, read logs and delete pods. ## Start, stop, restart, suspend and resume [Section titled “Start, stop, restart, suspend and resume”](#start-stop-restart-suspend-and-resume) | Action | Console | CLI | Notes | | ------- | ----------- | ---------------------- | ---------------------------------------------------------------------- | | Stop | **Stop** | `hivepod stop web1` | Your files stay. Stopped pods don’t use vCPU or memory from your plan. | | Start | **Start** | `hivepod start web1` | | | Restart | **Restart** | `hivepod restart web1` | | | Suspend | **Suspend** | `hivepod suspend web1` | Pauses the pod; open terminals are closed. | | Resume | **Resume** | `hivepod resume web1` | | The CLI waits until the action finishes; add `--no-wait` to return straight away. ## Startup command [Section titled “Startup command”](#startup-command) A startup command runs in the background every time the pod starts, for example a web server or a bot. If it exits, it’s restarted after 5 seconds. Its output goes to the pod’s logs. The pod stays up even if the command fails. Set it when you create the pod (**Startup script** in the console, `--cmd` in the CLI), or later with the CLI: ```sh hivepod env web1 --cmd "cd /home/hivepod/projects/app && npm start" --apply ``` ## Environment variables [Section titled “Environment variables”](#environment-variables) ```sh hivepod env web1 # show current values hivepod env web1 API_URL=https://... DEBUG=1 hivepod env web1 --unset DEBUG hivepod apply web1 # apply pending changes ``` Changes to variables and the startup command are saved first and take effect when you **apply** them (`hivepod apply`, or `--apply` on `hivepod env`). Applying re-creates the pod Apply rebuilds the pod from its OS image. Files in `/home/hivepod/data` and `/home/hivepod/projects` are kept, and so is root’s `~/.ssh` (it lives in `/home/hivepod/data/.ssh`). **Everything else is reset**, including packages you installed with `apt-get`, `dnf` or `apk` and files in `/root` or `/etc`. Keep your work in those two folders. The CLI asks before applying. See [Files, limits and environment](/hivepods/environment/). Up to 100 variables; names use letters, digits and `_`. ## Logs and status [Section titled “Logs and status”](#logs-and-status) ```sh hivepod status web1 # status, disk used vs size, CPU, memory, uptime hivepod logs web1 --tail 200 hivepod logs web1 -f # follow ``` The console shows resources, current usage and recent output on the pod’s page. ## Rename [Section titled “Rename”](#rename) Rename a pod in its **Settings** in the console. ## Delete [Section titled “Delete”](#delete) * Console: **Danger Zone → Delete**, then type the pod’s name to confirm. The dialog says how many backups the pod has. * CLI: `hivepod rm web1`. The confirmation says how many backups are kept and until when (add `-y` to skip it). Deleting a pod removes its files, its address and custom domains. There is no going back for the pod itself, but **its backups are kept for 7 days**: you can restore them into a new pod until then (see [Backups of deleted pods](/hivepods/backups/#backups-of-deleted-pods)). After 7 days they are deleted automatically. ## Coming soon [Section titled “Coming soon”](#coming-soon) Resizing, firewalls, tags and automated backups. # Ports and addresses > Run several apps in one HivePod and give each port its own HTTPS address, such as an API on 5100 and a web app on 3000. Every pod has a main address, `https://.dockhive.sh`, which serves port 80 inside the pod. When you run more than one app in a pod, you can give each of the other ports its own HTTPS address too. For example, a pod called `shop` running an API on port 5100 and a web front end on port 3000: | Address | Serves | | ------------------------------- | ------------------------ | | `https://shop.dockhive.sh` | port 80 (main address) | | `https://shop-5100.dockhive.sh` | the API on port 5100 | | `https://shop-3000.dockhive.sh` | the web app on port 3000 | Each address carries HTTP, HTTPS and WebSocket traffic, with the certificate handled for you. ## Expose a port [Section titled “Expose a port”](#expose-a-port) **Console:** open the pod, find **Ports & addresses** and click **Expose a port**. Enter the port, and optionally the address you want (`my-api` gives `my-api.dockhive.sh`). **CLI:** ```sh hivepod expose shop 5100 # https://shop-5100.dockhive.sh hivepod expose shop 3000 --subdomain store # https://store.dockhive.sh hivepod ports shop # list every address ``` If you leave out the address, it is `-`. If that name is taken, a short random suffix is added, such as `shop-3000-7f3a`. Your app must listen on `0.0.0.0:`, not only on `127.0.0.1`: ```sh # Node / Vite npm run dev -- --host 0.0.0.0 --port 3000 # Python uvicorn app:app --host 0.0.0.0 --port 5100 ``` If nothing is listening on the port yet, the address shows a DockHive “not reachable” page until your app starts. ## Remove a port [Section titled “Remove a port”](#remove-a-port) **Console:** click the remove icon next to the address. **CLI:** ```sh hivepod unexpose shop 3000 # or the address: hivepod unexpose shop store ``` Removing a port also removes the [custom domains](/hivepods/custom-domains/) attached to it. The app inside the pod keeps running. The main address can’t be removed. ## AI agents [Section titled “AI agents”](#ai-agents) The [`hivepod mcp` server](/cli/mcp/) has `list_ports`, `expose_port` and `unexpose_port` tools, so an AI coding agent can publish the app it just started and tell you the URL. ## Limits [Section titled “Limits”](#limits) * Up to 5 extra ports per pod, besides the main address. * Up to 20 extra ports across all your pods in one region. * Ports 1 to 65535, except 22 (SSH), which DockHive reserves. * HTTP, HTTPS and WebSocket only. Raw TCP ports, such as a database port, can’t be exposed. To share a database, use a [managed database](/databases/). * Linux pods only. Full-machine pods (Windows, FreeBSD) have only their main address. * An address name follows the same rules as a pod name: lowercase letters, numbers and hyphens, and it must not be taken by another pod or address. * A pod’s addresses are removed when you delete the pod. # Deprecated and legacy > Hive proposal files, the old node-provider program, Proof of Build (PoB), Proof of Container Activeness (PoCA) and the Seacure Weave consensus are retired. Here's what replaced them. These docs replace the earlier DockHive documentation. Several things it described are **retired** and no longer work. ## Retired [Section titled “Retired”](#retired) ### Hive proposal files [Section titled “Hive proposal files”](#hive-proposal-files) The YAML “Hive proposal” files (`containers`, `scaling`, `geographical_scaling`, GPU profiles and so on) are no longer used. You don’t write any deployment configuration now: [Drone](/apps/drone/) reads your code, builds your app and deploys it. Choose where it runs with [regions](/getting-started/regions/). ### The old app deployment guides [Section titled “The old app deployment guides”](#the-old-app-deployment-guides) The old deployment guides are replaced by: * [Quickstart: deploy with Drone](/getting-started/quickstart/) * [Deploy from GitHub](/apps/deploy-from-github/) and [Drone and frameworks](/apps/drone/) * Framework guides for [Flask](/apps/guides/flask/), [Node.js](/apps/guides/node-express/), [React](/apps/guides/react-vite/) and more ### The node-provider program [Section titled “The node-provider program”](#the-node-provider-program) The old program for running a DockHive node, with rewards through **Proof of Build (PoB)** and **Proof of Container Activeness (PoCA)**, is retired. Existing node setups are no longer part of the network, and no new nodes are accepted under it. ### Seacure Weave consensus [Section titled “Seacure Weave consensus”](#seacure-weave-consensus) **Seacure Weave has moved to [Necter Network](https://necter.network)**, which will power DockHive’s upcoming mining app. ## Want to share compute? [Section titled “Want to share compute?”](#want-to-share-compute) If you’re interested in sharing compute with DockHive, join the waitlist at **[dockhive.network](https://dockhive.network)** (coming soon). See [DockHive Network](/network/). ## Old links [Section titled “Old links”](#old-links) Links to the old documentation pages redirect here or to the closest new page. # n8n workflows > Create your own n8n workspace on DockHive, sign in with the owner login, and start automating. [n8n](https://n8n.io) is a workflow automation tool. DockHive gives you a private n8n workspace with its own HTTPS address, ready in about a minute. ## Create a workspace [Section titled “Create a workspace”](#create-a-workspace) 1. In the console, go to **n8n Hosting** and click **Create Instance**. 2. **Owner Email** (optional): the email you’ll use to sign in to n8n. Leave it empty to use your DockHive account email. 3. Choose a **Region**. 4. Click **Create Instance**. The workspace shows *Setting up* with its progress: starting, booting, securing the owner account and publishing its address. This usually takes about a minute. Each workspace gets a generated address such as `https://dark-rocket-k3x9.dockhive.xyz`. ## Save your owner login [Section titled “Save your owner login”](#save-your-owner-login) When the workspace is ready, the console shows **Your n8n owner login** once: the workspace URL, email and password. Shown only once Copy the password and store it somewhere safe. DockHive can’t show it again. Tick **I have saved this password** to close the window. DockHive creates the n8n owner account for you before the workspace goes online, so nobody else can claim it first. ## Sign in [Section titled “Sign in”](#sign-in) Click **Open n8n Editor** on the workspace page (or open its address), and sign in with the owner email and password. Change the password in n8n’s settings after your first sign-in. ## Plan limits [Section titled “Plan limits”](#plan-limits) | | Free Tier | Developer | Pro | Scale | | ---------- | --------- | --------- | --- | ------ | | Workspaces | 1 | 3 | 8 | Custom | Workspaces count across all regions. Deleted workspaces that are waiting to be removed don’t count, but restoring one does. ## Good to know [Section titled “Good to know”](#good-to-know) * Each workspace runs n8n’s current stable release at the time it was created. Version upgrades aren’t available yet. * The **Execute Command** and **Local File Trigger** nodes are turned off. * Requests to your workspace (including webhooks) can be up to 16 MB, n8n’s default payload limit. * Data your workspace sends to browsers and webhook callers counts toward your plan’s [bandwidth](/billing/usage/). * Custom domains and workspace backups are coming soon. Next: [Manage, delete and restore](/n8n/manage/). # Manage, delete and restore n8n workspaces > Stop and start an n8n workspace, read its logs, delete it, and restore a deleted workspace within 7 days. ## Stop and start [Section titled “Stop and start”](#stop-and-start) Use **Stop** and **Start** on the workspace page. While a workspace is stopped, its address shows *This app is unreachable right now*. Your workflows and data are kept. The **Overview** tab shows CPU, memory and network use. The **Logs** tab shows the workspace’s recent log lines. ## Delete a workspace [Section titled “Delete a workspace”](#delete-a-workspace) 1. Open the workspace and go to **Settings → Danger Zone**. 2. Click **Delete Instance**, type the instance name and confirm. The workspace stops and its address goes offline, but **its data is kept for 7 days**. The list shows it as *Deleted (restorable)* with a *Restorable until* date. After 7 days, all workflows, credentials, executions and settings are permanently removed. ## Restore a deleted workspace [Section titled “Restore a deleted workspace”](#restore-a-deleted-workspace) Within 7 days of deleting it: 1. Open the workspace from the **n8n Hosting** list (it shows *Deleted (restorable)*). 2. Click **Restore** at the top of the page. The workspace comes back with the **same address, data and owner login**. Sign in with your existing n8n password. Restoring counts toward your plan’s workspace limit, so delete or upgrade first if you’re at the limit. After the deadline, the workspace can’t be restored. ## Lost your n8n password? [Section titled “Lost your n8n password?”](#lost-your-n8n-password) DockHive doesn’t keep a copy of the owner password, so it can’t reset it for you. If you’re still signed in somewhere, change it in n8n’s settings. ## With the API [Section titled “With the API”](#with-the-api) ```sh # List workspaces curl https://api.dockhive.io/api/v1/n8n/instances -H "Authorization: Bearer $DOCKHIVE_API_KEY" # Restore a deleted workspace curl -X POST "https://api.dockhive.io/api/v1/n8n/instances/ID/restore?region=$REGION" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" ``` # DockHive Network (coming soon) > DockHive Network will let people share spare compute with DockHive. Join the waitlist at dockhive.network. Coming soon DockHive Network isn’t open yet. DockHive is a decentralized cloud, and **DockHive Network** is how more people will be able to take part: by sharing spare compute with DockHive through an upcoming mining app. The consensus layer behind it, **Seacure Weave**, has moved to **[Necter Network](https://necter.network)**, which will power DockHive’s upcoming mining app. ## Interested in sharing compute? [Section titled “Interested in sharing compute?”](#interested-in-sharing-compute) Join the waitlist at **[dockhive.network](https://dockhive.network)**. We’ll email you when it opens, with how it works and what you’ll need. ## Looking for the old node program? [Section titled “Looking for the old node program?”](#looking-for-the-old-node-program) The previous node-provider program (Proof of Build and Proof of Container Activeness) is retired. See [Deprecated and legacy](/legacy/). # Hive Realtime > Realtime messaging for live updates, chat, presence and notifications. Compatible with Pusher libraries, so you can use pusher-js, Laravel Echo and the Pusher server libraries. **Hive Realtime** sends messages to browsers and mobile apps the moment something happens: live dashboards, chat, notifications, “who’s online”, collaborative editing, order tracking. Your server sends an event to a **channel**; every client subscribed to that channel gets it instantly over a WebSocket. It speaks the Pusher Channels protocol, so you use the libraries you already know: `pusher-js`, Laravel Echo, and the Pusher server libraries for Node.js, PHP, Python, Go, Ruby and more. Already on Pusher? [Change the host and keys](/realtime/migrate-from-pusher/); your code stays the same. ## At a glance [Section titled “At a glance”](#at-a-glance) | | | | ---------------- | ------------------------------------------------------------------------------------ | | Channels | Public, private, private encrypted and presence | | Client libraries | `pusher-js` (web, React Native), Laravel Echo, any Pusher-compatible client | | Server libraries | Any official Pusher server library | | Extras | Client events, user sign-in and messages to one user, webhooks, a live debug console | | Regions | Every DockHive region; an app lives in the region you pick | | Free plan | 2 apps, 100 connections at once and 200,000 messages a day, per region | ## How it works [Section titled “How it works”](#how-it-works) 1. **Create an app** in the console (**Hive Realtime > New app**) and pick the region closest to your users. 2. **Connect your frontend** with `pusher-js` (or Laravel Echo) using the app’s key and host. 3. **Send events from your server** with a Pusher server library using the app ID, key, secret and host. Next: the [Quickstart](/realtime/quickstart/). # Channels and events > Public, private, private encrypted and presence channels, client events and sending messages to one user with Hive Realtime. ## Channel types [Section titled “Channel types”](#channel-types) | Prefix | Who can subscribe | Use it for | | --------------------- | ----------------------------------------------------------------- | ---------------------------- | | *(none)*, e.g. `news` | Anyone with your key | Public updates | | `private-` | Clients your server authorizes | Per-user or per-team data | | `private-encrypted-` | Clients your server authorizes; payloads are end-to-end encrypted | Sensitive data | | `presence-` | Clients your server authorizes, with user info | “Who’s online”, member lists | Channel names can use letters, numbers and `_ - = @ , . ;`, up to 200 characters. ## Authorizing private and presence channels [Section titled “Authorizing private and presence channels”](#authorizing-private-and-presence-channels) When a client subscribes to a `private-` or `presence-` channel, `pusher-js` calls your auth endpoint. Sign the request with your server library: ```js // Express example app.post('/pusher/auth', (req, res) => { const { socket_id, channel_name } = req.body; // check the signed-in user may join channel_name, then: const auth = channel_name.startsWith('presence-') ? pusher.authorizeChannel(socket_id, channel_name, { user_id: req.user.id, user_info: { name: req.user.name } }) : pusher.authorizeChannel(socket_id, channel_name); res.send(auth); }); ``` ## Presence [Section titled “Presence”](#presence) Presence channels tell every member who else is there: `pusher:subscription_succeeded` gives the current members, then `pusher:member_added` and `pusher:member_removed` follow as people join and leave. A user with several tabs open counts once. Up to 100 members per presence channel. ## Client events [Section titled “Client events”](#client-events) Turn on **Client events** in the app’s settings to let clients send events straight to each other (typing indicators, cursors). The event name must start with `client-`, and they work on private and presence channels only. Each connection can send up to 10 client events a second. ## Sending to one user [Section titled “Sending to one user”](#sending-to-one-user) After a client signs in (`pusher.signin()` with your server’s `authenticateUser`), your server can message every connection of that user with `pusher.sendToUser(userId, 'event', data)` or disconnect them with `terminateUserConnections(userId)`. ## Message size [Section titled “Message size”](#message-size) Event data can be up to 10 KB. A trigger can go to up to 100 channels, and a batch can hold up to 10 events. # Limits and regions > Hive Realtime plan allowances, how messages are counted, and which host to use in each region. ## Regions and hosts [Section titled “Regions and hosts”](#regions-and-hosts) An app lives in the region you pick when you create it, and its clients and servers connect to that region’s host. It can’t be moved later; create a new app in another region instead. | Region | Host | | ------------------------ | ------------------------------- | | United States | `realtime-us.dockhive.io` | | United States (Virginia) | `realtime-virginia.dockhive.io` | | Europe (London) | `realtime-eu.dockhive.io` | | Germany | `realtime-de.dockhive.io` | | Portugal | `realtime-pt.dockhive.io` | | Asia (Singapore) | `realtime-asia.dockhive.io` | | India (Mumbai) | `realtime-mumbai.dockhive.io` | | South Africa | `realtime-africa.dockhive.io` | | Nigeria (Lagos) | `realtime-ng.dockhive.io` | | Nigeria (Abuja) | `realtime-abuja.dockhive.io` | ## Plan allowances [Section titled “Plan allowances”](#plan-allowances) Allowances apply per account, in each region. | Plan | Apps | Connections at once | Messages a day | | --------- | ---- | ------------------- | -------------- | | Free | 2 | 100 | 200,000 | | Developer | 10 | 1,000 | 2,000,000 | | Pro | 50 | 10,000 | 20,000,000 | | Scale | 200 | 100,000 | 200,000,000 | ## How messages are counted [Section titled “How messages are counted”](#how-messages-are-counted) Like Pusher: an event you send counts once per channel, plus once for each connection it’s delivered to. A client event counts once plus its deliveries. The daily count resets at 00:00 UTC. When you reach the connection limit, new connections are refused (error 4004) until others disconnect. When you reach the daily message limit, sends answer `403` until the next day. Upgrade your plan in **Billing** for more. # Move from Pusher > Switch an app from Pusher Channels to Hive Realtime by changing the host and keys. Your channels, events and auth endpoints stay the same. Hive Realtime is compatible with Pusher Channels, so moving is a configuration change. 1. **Create a Hive Realtime app** in the region closest to your users and copy its App ID, Key, Secret and Host. 2. **Frontend:** keep your `pusher-js` or Laravel Echo code and add the host options: ```js new Pusher('YOUR_APP_KEY', { wsHost: 'realtime-eu.dockhive.io', wsPort: 443, wssPort: 443, forceTLS: true, enabledTransports: ['ws', 'wss'], cluster: 'eu', }); ``` 3. **Server:** replace the app ID, key and secret, and set the host (`host: 'realtime-eu.dockhive.io'` in Node.js, `'host' => ...` in PHP, `host=...` in Python). Remove the `cluster` option on the server, or keep it; the host wins. 4. **Auth endpoints** for private and presence channels keep working unchanged: they sign with your new secret. 5. **Webhooks:** set your webhook URL in the app’s settings. The payload and the `X-Pusher-Key` / `X-Pusher-Signature` headers are the same as Pusher’s, so your webhook handler doesn’t change. Run both side by side while you switch: point a staging build at Hive Realtime first, then production. ## What’s supported [Section titled “What’s supported”](#whats-supported) Public, private, private encrypted and presence channels; client events; user sign-in and sending to a user; terminating a user’s connections; batch triggers; channel and presence user queries; webhooks (channel occupied/vacated, member added/removed, client events). Not available yet: the subscription-count event and watchlists. # Quickstart > Create a Hive Realtime app, connect a browser with pusher-js and send your first event from a server. ## 1. Create an app [Section titled “1. Create an app”](#1-create-an-app) In the console, open **Hive Realtime** and click **New app**. Give it a name and pick the region closest to your users. The app page shows its **App ID**, **Key**, **Host** and, on request, its **Secret**. The host is `realtime-.dockhive.io`, for example `realtime-eu.dockhive.io`. The key and host are safe to put in browser and mobile apps; keep the secret on your server. ## 2. Connect a browser [Section titled “2. Connect a browser”](#2-connect-a-browser) ```bash npm install pusher-js ``` ```js import Pusher from 'pusher-js'; const pusher = new Pusher('YOUR_APP_KEY', { wsHost: 'realtime-eu.dockhive.io', wsPort: 443, wssPort: 443, forceTLS: true, enabledTransports: ['ws', 'wss'], cluster: 'eu', }); const channel = pusher.subscribe('orders'); channel.bind('order-shipped', (data) => { console.log('Shipped:', data); }); ``` ## 3. Send an event from your server [Section titled “3. Send an event from your server”](#3-send-an-event-from-your-server) * Node.js ```bash npm install pusher ``` ```js import Pusher from 'pusher'; const pusher = new Pusher({ appId: 'YOUR_APP_ID', key: 'YOUR_APP_KEY', secret: process.env.REALTIME_SECRET, host: 'realtime-eu.dockhive.io', useTLS: true, }); await pusher.trigger('orders', 'order-shipped', { id: 1042 }); ``` * PHP / Laravel ```bash composer require pusher/pusher-php-server ``` ```php $pusher = new Pusher\Pusher( 'YOUR_APP_KEY', getenv('REALTIME_SECRET'), 'YOUR_APP_ID', ['host' => 'realtime-eu.dockhive.io', 'port' => 443, 'scheme' => 'https', 'useTLS' => true] ); $pusher->trigger('orders', 'order-shipped', ['id' => 1042]); ``` For Laravel broadcasting, set these in `.env` and use `BROADCAST_CONNECTION=pusher`: ```bash PUSHER_APP_ID=YOUR_APP_ID PUSHER_APP_KEY=YOUR_APP_KEY PUSHER_APP_SECRET=YOUR_APP_SECRET PUSHER_HOST=realtime-eu.dockhive.io PUSHER_PORT=443 PUSHER_SCHEME=https PUSHER_APP_CLUSTER=eu ``` * Python ```bash pip install pusher ``` ```python import os import pusher client = pusher.Pusher( app_id='YOUR_APP_ID', key='YOUR_APP_KEY', secret=os.environ['REALTIME_SECRET'], host='realtime-eu.dockhive.io', ssl=True, ) client.trigger('orders', 'order-shipped', {'id': 1042}) ``` Open the app’s **Debug console** in DockHive to watch connections, subscriptions and events as they happen. Tip Reuse one server client (and its HTTP connection) for all your events instead of creating one per request. Sends on a reused connection are noticeably faster. # Webhooks > Get notified when channels become occupied or vacated, members join or leave, and clients send events, with signed Hive Realtime webhooks. Set a **Webhook URL** (HTTPS) in the app’s settings and choose the events you want: | Event | Sent when | | ------------------ | ----------------------------------- | | `channel_occupied` | A channel gets its first subscriber | | `channel_vacated` | A channel loses its last subscriber | | `member_added` | A user joins a presence channel | | `member_removed` | A user leaves a presence channel | | `client_event` | A client sends a client event | Events are sent as a `POST` with a JSON body, batched for up to one second: ```json { "time_ms": 1760781600000, "events": [ { "name": "channel_occupied", "channel": "presence-lobby" }, { "name": "member_added", "channel": "presence-lobby", "user_id": "42" } ] } ``` ## Verifying the signature [Section titled “Verifying the signature”](#verifying-the-signature) Every request carries `X-Pusher-Key` (your app key) and `X-Pusher-Signature`, the hex HMAC-SHA256 of the raw body with your app secret. The Pusher server libraries verify it for you: ```js const webhook = pusher.webhook({ headers: req.headers, rawBody: req.rawBody }); if (!webhook.isValid()) return res.sendStatus(401); for (const event of webhook.getEvents()) { // ... } ``` Answer with any `2xx` status. A failed delivery (timeout after 5 seconds, or a non-2xx answer) is retried three times, after 1, 5 and 30 seconds. Redirects are not followed. # Account security > Email verification, two-factor authentication, password resets, sign-in protection, and DockHive's security model for your apps, pods and databases. ## Email verification [Section titled “Email verification”](#email-verification) Every account, including those created with GitHub, verifies its email address with a 6-digit code before it can create resources or deploy. See [Create an account](/getting-started/create-account/#verify-your-email-address). ## Two-factor authentication (2FA) [Section titled “Two-factor authentication (2FA)”](#two-factor-authentication-2fa) Protect your account with codes from an authenticator app (such as 1Password, Google Authenticator or Authy). ### Turn it on [Section titled “Turn it on”](#turn-it-on) 1. Go to **Settings → Security → Two-Factor Authentication**, click **Setup 2FA** and enter your password. 2. Scan the QR code with your authenticator app (or enter the key manually). 3. Enter the 6-digit code from the app and click **Verify & Enable**. 4. **Save your 10 backup codes** somewhere safe. Each works once and lets you in if you lose your device. From then on, after your password you’ll be asked for an **Authentication code**: a 6-digit code from your app, or an 8-character backup code. This also applies when you sign in with GitHub and when you use `hivepod login --no-browser`. To get new backup codes, click **New backup codes** and enter your password and a code from your app. The old codes stop working at once. DockHive emails you whenever 2FA is turned on or off. ### Turn it off [Section titled “Turn it off”](#turn-it-off) Click **Disable**, then enter your password and a code from your app (or a backup code). Turning 2FA off deletes your backup codes and signs you out everywhere. ## Passwords [Section titled “Passwords”](#passwords) * Change your password in **Settings → Security**. * Forgot it? Use **Forgot password** on the sign-in page. The link works once, for one hour. * Changing or resetting your password signs you out everywhere immediately. API keys keep working (so CI doesn’t break); DockHive emails you a list of your active keys so you can revoke any you no longer trust. * Passwords must be at least 8 characters and not too common or too similar to your email. ## Sign-in protection [Section titled “Sign-in protection”](#sign-in-protection) * After 5 failed sign-ins in 15 minutes from one network, that network is paused for 15 minutes. If many networks fail, sign-in asks for an extra bot check, so nobody can lock you out of your own account. * Five wrong 2FA codes pause 2FA sign-in for 15 minutes, and DockHive emails you. * Sign-up, sign-in and password resets include a quick, automatic security check against bots. * DockHive emails you on every sign-in (password, GitHub or Google), and when an API key is created. If it wasn’t you, change your password and revoke unknown keys. * Changing your account email needs your password (and a 2FA code if 2FA is on). DockHive emails your old address an **undo** link for 7 days, and the change signs you out everywhere. * `hivepod login` and `dockhive login` from the browser need a sign-in within the last 15 minutes; otherwise you’re asked to sign in again. * 2FA secrets and connected GitHub/Google tokens are encrypted at rest; backup codes and one-time links are stored only as hashes. ## API keys [Section titled “API keys”](#api-keys) Use [API keys](/api/api-keys/) with the narrowest access you need (**Read only** where possible) and an expiry. Keys can never change your account, security or billing settings. ## Security model [Section titled “Security model”](#security-model) What DockHive does, and what stays with you. **Network** * Databases are **closed by default**. Each database has its own firewall, in place before the database is reachable; only the IPv4 addresses, apps and pods you [allow](/databases/firewall/) can connect. A database that any internet address can reach is flagged **Open to the internet** in the console, CLI and MCP tools. * App and pod rules only ever match your own workloads, in the database’s region. * Databases, apps and pods can’t reach DockHive’s internal systems. * App, pod and workspace addresses are served over HTTPS; databases require TLS by default. **Isolation** * Every app, database, n8n workspace and HivePod is kept apart from everyone else’s, with its own resource limits. Pods can’t open connections to each other. **Access** * In a team workspace, viewers can see resources but can’t change them or read database passwords. **Read only** API keys can’t read database passwords either. * Secrets (app variables, repository tokens, database passwords) are encrypted at rest and build logs hide variable values. See [Data and regions](/security/data/). **Your part** * Allow the narrowest sources you can and avoid `0.0.0.0/0`. * Keep connection strings in app variables, not in code, and turn on 2FA. * Database backups stay on the database’s server in its region. Keep your own copy of anything you can’t lose. ## Report a security issue [Section titled “Report a security issue”](#report-a-security-issue) Email . # Acceptable use and suspensions > What you may not run on DockHive, how to report abuse, and what happens when an account is suspended. DockHive is for building and running legitimate software. The full rules are in the [Terms of Service](https://www.dockhive.io/terms). In short, don’t use DockHive to: * break the law or infringe anyone’s rights, including intellectual property and privacy, * host, distribute or run malware or phishing pages, or anything designed to harm or break into systems, * mine cryptocurrency, on any plan, * send spam or unsolicited bulk messages, or run open relays or proxies used for abuse, * attack, scan or overload DockHive or other users’ workloads, or get around plan limits or security controls, * host content that exploits children, promotes violence or terrorism, or harasses people. Tunnel names and custom domains that imitate DockHive or other brands are refused. ## Reporting abuse [Section titled “Reporting abuse”](#reporting-abuse) Email with the address (app, tunnel or domain) and what you saw. ## Suspensions [Section titled “Suspensions”](#suspensions) DockHive may remove content, stop workloads or suspend accounts that break these rules, where possible after telling you. When an account is suspended: * you can’t sign in to the console; you’ll see *“This account has been suspended. If you think this is a mistake, contact .”* * CLI sessions and API keys stop working immediately (API calls return `403` with the code `account_suspended`), * resources may be stopped. If you think it’s a mistake, email . # Team audit log > See who did what in your DockHive team workspace, when and from where, filter it and download it as CSV. The audit log records changes to your team workspace: who did it, when, to whom, and from which IP address. Workspace **owners** and **admins** can see it. ## Open it [Section titled “Open it”](#open-it) Open the workspace menu, click **Manage team**, then click **Audit log** next to *Recent activity*. ## What’s recorded [Section titled “What’s recorded”](#whats-recorded) | Action | When | | ----------------------------------------------------- | --------------------------------------------------------------------------------------------- | | Member invited, Invitation resent, Invitation revoked | Someone sends, resends or cancels an invitation. | | Member joined, Invitation declined | The invited person accepts or declines. | | Role changed | A member’s role changes, with the old and new role. | | Member removed, Member left | Someone leaves the workspace or is removed. | | API key created, API key revoked | A workspace API key is created or revoked. | | Workspace accessed | A member works in the workspace (recorded once every 12 hours per member, not on every page). | | GitHub connected, GitHub disconnected | The workspace’s GitHub connection changes. | | Audit log exported | Someone downloads the audit log. | Each event shows the **Time**, **Actor**, **Action**, **Target** and **IP address**. ## Filter and export [Section titled “Filter and export”](#filter-and-export) Filter by **Action** (or *All actions*), by member email, and by date range with **From** and **To**. Click **Download CSV** to export what the filters show; the export itself is recorded. Changes inside products, such as a database password rotation or a deployment approval, are also kept with that resource: see [Users and passwords](/databases/users-and-passwords/) and [Push to deploy](/apps/push-to-deploy/#require-approval). # Data and regions > Where your DockHive data lives, how it's protected, and what happens to it when you delete things. ## Where your data lives [Section titled “Where your data lives”](#where-your-data-lives) Each app, database, n8n workspace, HivePod and backup is stored in the [region](/getting-started/regions/) you created it in, and stays there. Choose the region that suits your users and any data-location needs. **Hive Buckets** files are encrypted and stored across multiple regions, so a whole region can go down without losing data. Each bucket has a home region, its fastest place to read from. See [Endpoints and regions](/buckets/endpoints/). Your account details (email, plan, billing) are kept centrally to run your account. ## How it’s protected [Section titled “How it’s protected”](#how-its-protected) * **In transit:** app, pod and workspace addresses and custom domains are served over HTTPS. Databases require TLS by default. * **Secrets:** app environment variables and stored repository tokens are encrypted at rest and hidden in the console (the app’s owner can reveal environment variables through the API). Database passwords are stored encrypted. * **Isolation:** each app, database, workspace and pod runs separately, with its own resource limits. * **Databases** accept no connections until you [allow an address, app or pod](/databases/firewall/), and are never reachable before their firewall is in place. * **Build logs** hide your environment variable values. ## When you delete things [Section titled “When you delete things”](#when-you-delete-things) | Resource | What happens | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | App | Deleted immediately with its deployments, variables, logs and domains. | | Database | Deleted immediately with its data and backups. | | n8n workspace | Kept for 7 days so you can [restore it](/n8n/manage/#restore-a-deleted-workspace), then deleted. | | HivePod | Deleted immediately with its files. Its backups are kept for 7 days, then deleted. | | Bucket | Must be empty before it can be deleted. Deleted objects are removed immediately, unless [versioning or object lock](/buckets/versioning/) keeps them. | To close your account, email from your account’s email address. ## Policies [Section titled “Policies”](#policies) * [Terms of Service](https://www.dockhive.io/terms) * [Privacy Policy](https://www.dockhive.io/privacy) # DockHive Tunnel > Put an app running on your computer on the internet at https://.dockhive.live with the dockhive CLI. DockHive Tunnel puts an app running on your computer on the internet at `https://.dockhive.live`, through your DockHive account. Install the `dockhive` CLI, sign in, and expose a port: ```sh dockhive login dockhive expose 3000 ``` The CLI prints your public address and starts a local dashboard: ```text Forwarding https://brave-otter-7k2p.dockhive.live -> http://localhost:3000 Region eu Dashboard: http://127.0.0.1:4040 ``` HTTPS, WebSockets, server-sent events, streaming responses and large uploads all work. The CLI opens one outbound connection to the DockHive edge, so nothing on your computer listens on a public port: no port forwarding and no public IP needed. If your network drops, the tunnel reconnects by itself and keeps the same URL. ## Commands [Section titled “Commands”](#commands) | Command | What it does | | ------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `dockhive login` | Sign in (opens your browser). `--token` signs in with an API key; `--no-browser` prints the link instead. | | `dockhive whoami` | Show the signed-in account and plan. | | `dockhive logout` | Sign out and delete the stored credentials. | | `dockhive expose ` | Share a local app on a public HTTPS URL. | | `dockhive names` | List your reserved names. `names release ` gives one up. | | `dockhive regions` | Show the tunnel regions and their latency from where you are. | | `dockhive service install\|uninstall` | Run a tunnel in the background at login. | | `dockhive doctor [port]` | Check your sign-in, connectivity to every region and, with a port, that your local app answers. | | `dockhive version` | Print the version and check for a newer release. | Note The tunnel CLI is called `dockhive`. It’s separate from the [`hivepod` CLI](/cli/), which deploys apps and manages HivePods. ## In this section [Section titled “In this section”](#in-this-section) * [Install](/tunnel/install/) * [Sign in](/tunnel/sign-in/) * [Expose an app](/tunnel/expose/) * [Names and regions](/tunnel/names-and-regions/) * [Background service and dashboard](/tunnel/service-and-dashboard/) * [Plans and limits](/tunnel/limits/) * [Troubleshooting](/tunnel/troubleshooting/) * [Security and acceptable use](/tunnel/acceptable-use/) # Security and acceptable use > How DockHive Tunnel keeps your computer safe, and what you may not use tunnels for. * Every tunnel is served over HTTPS. The CLI only dials out; your computer opens no public ports. * Your API keys and `credentials.json` are as sensitive as a password. Don’t commit them or share them. * Anyone with your tunnel’s URL can reach the app you expose. Don’t expose admin panels or data you wouldn’t put on the public internet, and stop the tunnel when you’re done. * Your app’s cookies are confined to its own tunnel address. * Don’t use DockHive Tunnel for phishing, malware, impersonating other sites or anything illegal. Tunnels that break these rules can be suspended without notice. * Report abuse to with the tunnel’s URL. See also [Acceptable use and suspensions](/security/acceptable-use/), the [Terms of Service](https://www.dockhive.io/terms) and the [Privacy Policy](https://www.dockhive.io/privacy). # Expose an app > Share a local port, a host on your network or a local HTTPS server with dockhive expose, and every flag it takes. Pass a port, a `host:port` on your network, or a local HTTP(S) URL: ```sh dockhive expose 3000 # http://localhost:3000 dockhive expose 192.168.1.20:8080 # another host on your network dockhive expose https://localhost:8443 # a local HTTPS server (self-signed is fine) dockhive expose 5173 --host-header rewrite # send Host: localhost:5173 to the app dockhive expose 3000 --region eu # pick a region ``` Press `Ctrl`+`C` to close the tunnel. ## Flags [Section titled “Flags”](#flags) | Flag | Meaning | | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `--name ` | Use a name you keep: `https://.dockhive.live`. Paid plans. | | `--region auto\|us\|eu\|asia\|africa\|de\|ng\|abuja\|pt\|mumbai\|virginia` | `auto` (the default) picks the fastest region from where you are. | | `--host-header rewrite\|` | The Host header your app receives. `rewrite` sends the local address (for example `localhost:5173`); the default keeps the public hostname. | | `--dashboard-port 4040` | Local dashboard port. The next free port is used if it’s taken. | | `--no-dashboard` | Don’t start the local dashboard. | | `--quiet` | Don’t print each request. | | `--no-failover` | Stay on the chosen region. By default, if your region goes down the CLI moves to the next-fastest one and keeps your URL. | | `--log ` | Write connection logs to a file (or stderr). Pair with `--log-level debug\|info\|warn\|error`. | Dev servers that only answer to their own hostname (Vite, webpack dev server and similar) usually need `--host-header rewrite`. ## What your app receives [Section titled “What your app receives”](#what-your-app-receives) Your app gets `X-Forwarded-For`, `X-Forwarded-Proto: https` and `X-Forwarded-Host` headers. Cookies your app sets are kept to its own tunnel address. ## Automatic failover [Section titled “Automatic failover”](#automatic-failover) If the connection drops, the CLI reconnects on its own. If your region stays down after a few attempts, it moves to the next-fastest healthy region and keeps your URL: reserved names move with you, and random names are resumed. Use `--no-failover` to stay on one region. ## Check your setup [Section titled “Check your setup”](#check-your-setup) ```sh dockhive doctor 3000 ``` `doctor` checks your sign-in and credentials file, every region’s reachability and latency, your clock, your local app on the given port, and your version, and tells you what to fix. # Install DockHive Tunnel > Install the dockhive tunnel CLI on macOS, Linux or Windows, update it, and uninstall it. * macOS and Linux ```sh curl -fsSL https://dockhive.io/tunnel/install.sh | sh ``` * Windows (PowerShell) ```powershell irm https://dockhive.io/tunnel/install.ps1 | iex ``` Both scripts download the right build for your system (amd64 or arm64) and verify its SHA-256 checksum before installing it. When `cosign` is installed, the checksum file’s signature is verified too. * **macOS and Linux** install to `/usr/local/bin` if it’s writable, otherwise to `~/.local/bin`. * **Windows** installs to `%LOCALAPPDATA%\Programs\dockhive`. Your PATH is set automatically. On macOS and Linux the script adds the install folder to your shell profile (`~/.zshrc`, `~/.bashrc`, fish’s `conf.d` or `~/.profile`) under a `# DockHive Tunnel` comment; open a new terminal to use `dockhive`. On Windows it’s added to your user PATH and works in the same window right away. ## Install options [Section titled “Install options”](#install-options) | Variable | Meaning | | --------------------------- | ------------------------------------------------------------ | | `DOCKHIVE_INSTALL_DIR` | Where to put the binary. | | `DOCKHIVE_VERSION` | A release tag such as `v0.2.1`. Default: the latest release. | | `DOCKHIVE_NO_MODIFY_PATH=1` | Don’t edit shell profiles (macOS and Linux). | Set them for the installer’s shell: ```sh curl -fsSL https://dockhive.io/tunnel/install.sh | DOCKHIVE_INSTALL_DIR="$HOME/bin" DOCKHIVE_NO_MODIFY_PATH=1 sh ``` ```powershell $env:DOCKHIVE_VERSION = "v0.2.1"; irm https://dockhive.io/tunnel/install.ps1 | iex ``` ## Check and update [Section titled “Check and update”](#check-and-update) ```sh dockhive version ``` It also tells you (at most once a day) when a newer release exists. Nothing updates automatically: rerun the install line to update. Set `DOCKHIVE_NO_UPDATE_CHECK=1` to turn the check off. ## Files and settings [Section titled “Files and settings”](#files-and-settings) | OS | Config folder | | ------- | ----------------------------------------------------- | | macOS | `~/Library/Application Support/dockhive` | | Linux | `~/.config/dockhive` (or `$XDG_CONFIG_HOME/dockhive`) | | Windows | `%AppData%\dockhive` | `credentials.json` in that folder (readable only by you) holds your sign-in. Environment variables: * `DOCKHIVE_TOKEN`: sign in with an API key without storing it. * `DOCKHIVE_CONFIG_DIR`: use another config folder. * `DOCKHIVE_NO_UPDATE_CHECK=1`: don’t check for new releases. ## Uninstall [Section titled “Uninstall”](#uninstall) * macOS and Linux ```sh dockhive service uninstall # if you installed a service dockhive logout rm "$(command -v dockhive)" rm -rf "$HOME/Library/Application Support/dockhive" # macOS rm -rf "$HOME/.config/dockhive" # Linux ``` Then delete the `# DockHive Tunnel` PATH line the installer added to your shell profile. * Windows (PowerShell) ```powershell dockhive service uninstall # if you installed a service dockhive logout $dir = "$env:LOCALAPPDATA\Programs\dockhive" Remove-Item -Recurse -Force $dir, "$env:APPDATA\dockhive" $p = ([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ -and $_ -ne $dir } [Environment]::SetEnvironmentVariable("Path", ($p -join ";"), "User") ``` # Plans and limits > How many tunnels and reserved names each DockHive plan includes, bandwidth pricing, and the Free Tier visitor notice. | Plan | Tunnels at once | Names | Visitors | | ------------------------- | --------------- | ----------------- | ---------------------------- | | Free Tier | 1 | Random names | See a one-time safety notice | | Developer Plan ($3/month) | 5 | 3 reserved names | No notice | | Pro Plan ($15/month) | 15 | 10 reserved names | No notice | | Scale Plan | 100 | 50 reserved names | No notice | * Tunnel counts are across all regions. When you reach a limit, `dockhive` tells you what to stop or how to upgrade. * Bandwidth beyond your plan allowance is **$0.02 per GB**, the same rate as the rest of the platform. See [Usage and overage](/billing/usage/). * WebSockets, server-sent events and streaming responses are supported. Idle WebSocket connections may be closed by the edge after about 100 seconds without traffic, so send a ping or heartbeat if your app keeps quiet connections open. * Requests, including uploads, can be **up to 100 MB** each. * Each tunnel handles up to **256 requests at once** at the edge. Extra requests get a `429 Too Many Requests` response (with `Retry-After: 1`) until earlier ones finish. ## Visitor safety notice (Free Tier) [Section titled “Visitor safety notice (Free Tier)”](#visitor-safety-notice-free-tier) Visitors who open a Free Tier tunnel in a browser see a one-time notice that the site is served from a DockHive user’s computer, with a **Continue** button. API clients, `curl` and requests with the header `dockhive-skip-warning: 1` skip it, so webhooks are delivered normally. Paid plans don’t show it. ```sh curl -H "dockhive-skip-warning: 1" https://brave-otter-7k2p.dockhive.live/ ``` # Names and regions > Random and reserved tunnel names on dockhive.live, naming rules, and the regions DockHive Tunnel runs in. ## Names [Section titled “Names”](#names) * **Free Tier:** a random name such as `brave-otter-7k2p`, kept while the tunnel runs (and for a couple of minutes after a disconnect, so reconnects keep it). * **Paid plans:** `--name my-app` reserves `my-app.dockhive.live` for you, in every region, until you release it. While the tunnel is stopped, visitors see a “this tunnel is offline” page. ```sh dockhive expose 3000 --name my-app dockhive names # list your reserved names dockhive names release my-app # give one up ``` Names are 3 to 40 characters of lowercase letters, digits and `-`. Names that imitate DockHive, other brands, or sign-in and payment pages are not allowed. ## Regions [Section titled “Regions”](#regions) The DockHive edge runs in ten regions: | Region | Location | | ---------- | --------------------------- | | `us` | United States | | `virginia` | United States (Virginia) | | `eu` | Europe (London) | | `de` | Germany (Frankfurt) | | `asia` | Asia (Singapore) | | `mumbai` | India (Mumbai) | | `africa` | South Africa (Johannesburg) | | `ng` | Nigeria (Lagos) | | `abuja` | Nigeria (Abuja) | | `pt` | Portugal (Lisbon) | With `--region auto` (the default) the CLI connects to the fastest one from where you are. See them with their latency and status: ```sh dockhive regions ``` The list comes from DockHive, so new regions appear without updating the CLI. # Background service and dashboard > Run a DockHive tunnel in the background at login, and inspect requests in the local dashboard. ## Run in the background [Section titled “Run in the background”](#run-in-the-background) Install a service that runs any `dockhive` command at login. Everything after `--` is the command it runs: ```sh dockhive service install -- expose 3000 --name my-app ``` ```sh dockhive service uninstall ``` * **macOS:** a launchd agent; logs in `~/Library/Application Support/dockhive/service.log`. * **Linux:** a systemd user unit; follow logs with `journalctl --user -u dockhive-tunnel -f`. Run `loginctl enable-linger $USER` to keep it running after you log out. * **Windows:** a scheduled task that starts at logon. Sign in first: the service uses your stored sign-in (or put `DOCKHIVE_TOKEN` in the unit’s environment on servers). ## Local dashboard [Section titled “Local dashboard”](#local-dashboard) While `dockhive expose` runs, open `http://localhost:4040` to see: * who you’re signed in as, * your tunnels with their public URLs, with copy buttons, * a live log of requests: method, path, status, duration and size (bodies are never recorded), * data in and out. The dashboard only answers on your own computer. Change its port with `--dashboard-port` or turn it off with `--no-dashboard`. Your tunnels also appear in the console under [Tunnels](https://console.dockhive.io/tunnels). # Sign in to DockHive Tunnel > Sign in to the dockhive tunnel CLI with your browser or an API key. ```sh dockhive login ``` Your browser opens the DockHive console. Approve the request and go back to the terminal. Your email address must be verified first. No account yet? [Create one free](https://console.dockhive.io/register). ```sh dockhive whoami # who you're signed in as, and your plan dockhive logout # sign out and delete the stored credentials ``` ## Servers without a browser [Section titled “Servers without a browser”](#servers-without-a-browser) Create an [API key](/api/api-keys/) in the console under **Settings → API keys**, then either store it: ```sh dockhive login --token dh_pat_... ``` or use it without storing anything: ```sh export DOCKHIVE_TOKEN=dh_pat_... ``` On a machine where you can open a browser somewhere else, `dockhive login --no-browser` prints the sign-in link for you to open yourself. If `DOCKHIVE_TOKEN` is set, it’s used instead of your stored sign-in. # Tunnel troubleshooting > Fixes for common DockHive Tunnel problems. Run `dockhive doctor 3000` (with your app’s port) first: it checks your sign-in, every region and your local app, and tells you what to fix. ### Visitors see “The tunnel is up, but the local service isn’t answering” [Section titled “Visitors see “The tunnel is up, but the local service isn’t answering””](#visitors-see-the-tunnel-is-up-but-the-local-service-isnt-answering) The tunnel is connected but nothing answered on the address you exposed. Start your app (or check the port) and reload. For a server that only listens on another interface, expose `host:port`; for a local HTTPS server, expose `https://localhost:`. ### The app shows “Invalid host header” or the wrong site [Section titled “The app shows “Invalid host header” or the wrong site”](#the-app-shows-invalid-host-header-or-the-wrong-site) Your dev server checks the Host header. Run with `--host-header rewrite`. ### “Connection lost. Reconnecting…” [Section titled ““Connection lost. Reconnecting…””](#connection-lost-reconnecting) Your network dropped or the region went away. The CLI reconnects on its own and keeps your URL; if your region stays down it moves to the next-fastest region automatically (turn that off with `--no-failover`). `dockhive regions` shows each region’s status. ### Not signed in, or the wrong account [Section titled “Not signed in, or the wrong account”](#not-signed-in-or-the-wrong-account) Run `dockhive whoami`. Sign in again with `dockhive login`. If `DOCKHIVE_TOKEN` is set in your environment, it’s used instead of your stored sign-in. ### “command not found: dockhive” right after installing [Section titled ““command not found: dockhive” right after installing”](#command-not-found-dockhive-right-after-installing) Open a new terminal so it picks up the PATH change, or run the `export PATH=...` line the installer printed. ### A limit was reached [Section titled “A limit was reached”](#a-limit-was-reached) Stop a running tunnel, release a name with `dockhive names release `, or [upgrade your plan](/billing/manage/). ### Visitors see “Nothing is live here” [Section titled “Visitors see “Nothing is live here””](#visitors-see-nothing-is-live-here) The name isn’t connected to a tunnel: it may have been released, or never existed. See [Limits and troubleshooting](/apps/troubleshooting/#nothing-is-live-here). ### Collect logs [Section titled “Collect logs”](#collect-logs) Run with `--log stderr --log-level debug` (or `--log tunnel.log`) to capture connection logs. ## Still stuck? [Section titled “Still stuck?”](#still-stuck) Include the output of `dockhive doctor` and `dockhive version` when you [contact us](https://www.dockhive.io/contact).