Skip to main content

Introduction

  • This article guides you through creating and hosting a PG Admin application on Square Cloud.
  • Before getting started, make sure you have an account on Square Cloud, which can be done through the sign up page. You can use your email to create an account.
  • Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs here.

Creating the Project

  • First of all we need an Python environment. To do this, we need a requirements.txt or a pyproject.toml. You can see how to create a requirements.txt here.
  • Your requirements.txt must have pgadmin4 and a webserver to serve it. In this tutorial, we will use gunicorn.
requirements.txt
  • Next, you will need a config file config_local.py to set some paths. These paths will define where to save some infos about your pgadmin.
config_local.py
We already have everything ready for deploy on our repository here. You just need to download the project.zip and upload it.

📁 Necessary Files

The following files are necessary in your zip:
  • requirements.txt or pyproject.toml
  • .env (optional)

⚙️ Configuration File

  • You need to configure runtime environment to Detect manually and set it to Python. In a squarecloud.config or squarecloud.app will look like this:
squarecloud
  • Next, we need to set 2 environment variables, PGADMIN_SETUP_EMAIL and PGADMIN_SETUP_PASSWORD in a .env file or in the Square Cloud environment on the upload menu.
.env

Uploading the Project to Square Cloud

After preparing your project files, you can now upload them to Square Cloud and host your project.
Access the Square Cloud Dashboard and upload your project files.
Uploading application to Square Cloud

Final Considerations

That’s it! Your pgAdmin panel is now live at my-pgadmin-subdomain.squareweb.app, ready for you to manage your PostgreSQL database from anywhere.

Contact us

If you continue facing technical difficulties, our specialized support team is available to assist you. Contact us and we’ll be happy to help you resolve any issue — support quality is a big part of why developers rate Square Cloud 4.9/5 across 402 reviews on Google and Trustpilot.