The following guide is designed to help you deploy custom code on Aptible.

During this process, Aptible will launch containers to run your custom app and Managed Databases for any data stores, like PostgreSQL, Redis, etc., that your app requires to run.


Aptible supports many frameworks; you can deploy any code that meets the following requirements:

  • Apps must run on Linux in Docker containers

    • To run an app on Aptible, you must provide Aptible with a Dockerfile. To that extent, all apps on Aptible must be able to run Linux in Docker containers.

📘 New to Docker? Check out Docker’s getting started guide.

  • Apps may only receive traffic over HTTP or TCP.

    • App endpoints (load balancers) are how you expose your Aptible app to the Internet. These endpoints only support traffic received over HTTP or TCP. While you cannot serve UDP services from Aptible, you may still connect to UDP services (such as DNS, SNMP, etc.) from apps hosted on Aptible.
  • Apps must not depend on persistent storage.

    • App containers on Aptible are ephemeral and cannot be used for data persistence. To store your data with persistence, we recommend using a Database or third-party storage solution, such as AWS S3. Apps that rely on persistent local storage or a volume shared between multiple containers must be re-architected to run on Aptible. If you have questions about doing so, contact Aptible Support for assistance.

Deploy Code

⚠️ Prerequisites: Ensure you have Git installed, a Git repository with your application code, and a Dockerfile ready to deploy.

Using the Deploy Code tool in the Aptible Dashboard, you can deploy Custom Code. The tool will guide you through the following:

Step 01: Deploy with Git Push

Step 02: Add an SSH key

If you have not done so already, you will be prompted to set up an SSH key.

Step 03: Environment Setup

Select your stack to deploy your resources. This will determine what region your resources are deployed to. Then, name the environment your resources will be grouped into.

Step 04: Push your code to Aptible

Select Custom Code deployment, and from your command-line interface, add Aptible’s Git Server and push your code to our scan branch using the commands in the Aptible Dashboard

Step 05: Provision a database and configure your app

Optionally, provision a database, configure your app with environment variables, or add additional services and commands.

Step 06: Deploy your code and view logs

Deploy your code and view logs in real time

Step 07: Expose your app to the internet

Now that your code is deployed, it’s time to expose your app to the internet. Select the service that needs an endpoint, and Aptible will automatically provision a managed endpoint.

Next steps

Continue your journey on Aptible: