Skip to main content
Square Cloud Databases service overview

Why choose Square Cloud?

Managed PostgreSQL, MySQL, MongoDB and Redis instances, provisioned in a couple of clicks and reachable only over encrypted SSL/TLS connections. You get a production database without tuning a server, scheduling snapshots or paying for the bandwidth your app moves.

NVMe-backed storage

Instances run on enterprise NVMe SSDs, where random-read latency dominates real-world query performance, so indexed lookups and write-heavy workloads stay fast.

Zero network fees

No ingress or egress charges. Read and write as much as your application needs without a metered-bandwidth bill, a cost that quietly dominates on most cloud providers.

Daily snapshots

Automatic daily snapshots plus one-click manual ones, at no extra cost. Recover from a bad migration or accidental delete without leaving the dashboard.

Encrypted by default

Instances only accept SSL/TLS connections with Square Cloud-managed certificates. Plaintext connections are refused, so your data is encrypted in transit without any extra configuration.

Supported databases

Every engine comes configured and ready to connect. Each page covers the connection, permissions, what is available and the common errors of that engine.

PostgreSQL

Client-certificate TLS, pgvector and 20 more extensions, pg_cron for scheduled jobs.

MySQL

TLS-only, caching_sha2_password, full control of your databases, users and routines.

MongoDB

Client-certificate TLS, a standalone server, profiler and explain() for tuning.

Redis

rediss:// only, with Search, JSON, TimeSeries and vector sets built in.

Versions

Square Cloud manages the version: there is no version to choose, and existing databases are moved to the current version automatically.

How do I host my database?

You need an active Standard plan or higher. For a full walkthrough with connection code in Node.js and Python, follow Create and connect a managed database. In short:
1

Create a new database instance

Open the Databases page and click “Create Database”.
2

Setting up your database instance

Pick the engine and fill in the name and the RAM.
3

Finish your instance creation

Click “Create”. In a few seconds the database is ready, and its connection details are on its page in the dashboard.

How do I connect to my database?

Databases only accept SSL/TLS connections, and PostgreSQL and MongoDB also require the certificate as the client certificate. To connect:
1

Get the credentials and certificates

Open the database in the dashboard, copy the connection URL (host, port, username and password) and download the certificates.
2

Connect over SSL/TLS

Connect with your preferred client or library with SSL/TLS enabled, using the certificate as the CA (root) certificate. On PostgreSQL and MongoDB, also set it as the client certificate and key.
Most clients only need the .pem. Some ask for the .crt and .key files separately, or for a .p12.
3

Start using your database

You’re ready to store and query data. Follow the database’s performance and usage in the Square Cloud dashboard.
Connection code for each engine is on its page: PostgreSQL, MySQL, MongoDB and Redis.

What every database includes

Share one connection pool or client per process and reuse it. A new connection per request is the most common way to hit the connection limit. See database performance.

Snapshots and restore

  • Automatic and manual: every database gets an automatic snapshot every day, on every plan with databases. You can also take one from the database’s Snapshots tab, the CLI or the API; manual snapshots count toward your plan’s daily allowance.
  • Retention: the newest snapshot of each database is kept for 30 days; older ones for 7 days.
  • What a snapshot holds: a logical export made by the engine itself (not a copy of its data files), plus the certificate. A stopped database is started briefly to take it.
  • When a snapshot fails: the export passes about 10 GB (PostgreSQL and MySQL export uncompressed SQL text, so a database close to its storage limit may not fit), or one of your own locks blocks the export for more than 5 minutes. Each engine page lists its own cases.
  • Restore replaces the whole database with the snapshot’s contents, on the current version. The swap happens only after the restore succeeds: if it fails, the current database is left untouched. Writes made after the snapshot are lost, and users and passwords return to what they were when it was taken (Redis keeps its current password). The database ends up running; if your apps can’t log in afterwards, use the password the dashboard shows, or reset it.
  • Plan expiry: when a plan expires, a snapshot of each database is attempted before it is deleted, and those snapshots stay available for 30 days to restore into a new database.

Insights

The database’s Insights tab, refreshed every 60 seconds, shows:
  • Open connections, by client address (the third part of each IP address is masked), against the limit of 256.
  • Slow queries: statements of 100 ms or more on PostgreSQL and MySQL (with their mean time) and on MongoDB, and Redis’s SLOWLOG (10 ms or more).

Password and certificate

You can reset either one from the database’s Connection tab or the API, while the database is running:
  • Password: on PostgreSQL, MySQL and MongoDB, the new password works at once for new connections, and connections already open keep running until they close; to end them after a leak, stop and start the database. Redis restarts to apply it, so every connection drops for a few seconds.
  • Certificate: a new .pem is generated and the database restarts. Every client needs the new file.

Stop, start and automatic restart

  • Stop asks the database to shut down cleanly and allows it 5 seconds; a database still busy after that is stopped by force, and runs its crash recovery on the next start (which can take a while on large databases).
  • Automatic restart: a database that crashes with an error restarts by itself, at most once an hour, and only if it had been running for at least 60 seconds. A database stopped for running out of memory stays stopped until you start it.

Something went wrong?

Database connection errors

Fix SSL/TLS and certificate refusals, timeouts, ECONNREFUSED, MySQL authentication and MongoDB network errors.

Database performance

RAM that keeps growing, too many connections, slow queries, a full disk and slow starts.

Frequently asked questions

PostgreSQL, MySQL, MongoDB and Redis, all pre-configured and ready to connect.
Database hosting requires an active Standard plan or higher.
Yes. Every database has a public address and port, so any client that supports SSL/TLS can connect from anywhere, with the password and, on PostgreSQL and MongoDB, the client certificate.
No. Square Cloud runs one current version per engine and moves existing databases to it automatically.
No. The server configuration is the same on every database, and support doesn’t change it for a single one. Your user still owns its data, and each engine page lists the settings you can change yourself, such as session settings on PostgreSQL or SET PERSIST on MySQL.
No. Each database is a single instance reached over its public address with TLS. Daily snapshots are the recovery path.
No. Each database has 10 GB, fixed. Move files such as images and uploads to Blob Storage, or split the data across more than one database.