Thanks Kody - and sorry for all of the questions but is there a way for me to rely on the usage budget as a hard stop to any charges? Your answer (as I read it) seems to be that something Neon can override that stop? I don’t want to make a mistake that costs a fortune, having the stop seems like a logical solution.
The grace period to pay the initial invoice is because doing the credit card payment sometimes takes a while, if we just hard stopped you out of the gate your deployments / databases / account would get locked because your payment is taking a while to clear.
For data ingress/egress you can already set a max limit on an autoscale deployment, and now with this database fix you can set a max size for your historical data. I’ll ask about setting an opt in hard cap to override grace period for the invoice payment but again would have to be opt in.
Please please give us a guide on how to link another db
This is a two step process.
Step 1) make and rds on GCP or AWS. The benefits of AWS is it’s the cheapest, benefits of GCP is it’s nearer to where replit stores your data - which is on GCP.
Step 1) make a new instance variable called DB_HOST_AWS - do not use the replit DB_HOST as it will over write it.
These are very simple setup guides. You can implement ip address security very easily if you use a replit dedicated VM, you can’t if you use the scaling options.
== GCP Setup mini guide ==
Cheapest PostgreSQL Setup on Google Cloud (GCP)
This guide walks you through setting up the cheapest PostgreSQL database on Google Cloud Platform (GCP) using Cloud SQL, with:
- Open access from any IP
- Simple username/password authentication
- Minimal cost
Warning: This setup is for dev/test purposes only. It is not secure for production.
1. Create a GCP Project
- Go to: https://console.cloud.google.com
- Click the project dropdown (top nav) → “New Project”
- Name your project and create it
2. Enable Cloud SQL API
Go to: Enable SQL API
- Click “Enable”
3. Create a PostgreSQL Instance
- Go to: Cloud SQL Console
- Click “Create Instance”
- Choose PostgreSQL
Instance Settings:
- Instance ID:
test-db
- Password: Set a strong password for the default
postgres
user - Region: Choose the cheapest one for you (e.g.,
us-central1
) - Zone: Auto is fine
Under “Configuration”:
- Machine Type: Shared Core →
db-f1-micro
(cheapest option) - Storage: 10 GB SSD (minimum)
- Backups: OFF
- High availability (HA): OFF
- Maintenance window: Default or any
Click “Create Instance”
4. Enable Public IP & Open to All IPs
Once the instance is ready:
- Click into your database instance
- Go to “Connections” tab
- Under “IP addresses”, ensure Public IP is enabled
- Scroll to “Authorized networks”
- Click “Add Network”
- Name:
allow-all
- Network:
0.0.0.0/0
- Save
This exposes the database to the internet. Use strong passwords.
5. (Optional) Add Additional User
- Go to the “Users” tab
- Click “Add User Account”
- Enter a username and password
- Save
6. Connect to Your Database
- Go to the “Instance Overview”
- Copy the Public IP
- Connect using a PostgreSQL client:
psql -h [PUBLIC_IP] -U [USERNAME] -d postgres
== AWS Setup Guide ==
# 🐘 Cheapest PostgreSQL Setup on AWS (RDS)
This guide walks you through setting up the **cheapest PostgreSQL database** on **Amazon Web Services (AWS)** using **Amazon RDS**, with:
- Open access from any IP
- Simple username/password authentication
- Minimal cost
> ⚠️ **Warning**: This setup is for dev/test purposes only. It's **not secure** for production environments.
---
## ✅ 1. Create an AWS Account (If Needed)
Go to: [https://aws.amazon.com/](https://aws.amazon.com/)
Sign up or log in.
---
## ✅ 2. Open RDS Console
Go to: [RDS Console](https://console.aws.amazon.com/rds/)
Click **"Create database"**
---
## ✅ 3. Choose Database Creation Method
- **Creation method**: Standard Create
- **Engine options**: Select **PostgreSQL**
- **Version**: Choose the latest available (or default)
---
## ✅ 4. Set Up the DB Instance
### Under "Settings":
- **DB instance identifier**: `test-db`
- **Master username**: e.g., `postgres`
- **Password**: Set a strong password
### Under "DB Instance Class":
- Select **Burstable classes**
- Choose **db.t3.micro** *(eligible for free tier, if applicable)*
### Storage:
- **Allocated Storage**: 20 GB (minimum)
- **Storage type**: General Purpose (SSD)
- **Enable storage autoscaling**: Optional (disable to keep costs predictable)
---
## ✅ 5. Disable Unneeded Features
- **Multi-AZ Deployment**: Disable
- **Auto backups**: Disable
- **Monitoring**: Disable
- **Maintenance**: Accept default
---
## ✅ 6. Networking (Public Access + Open to All)
Under **Connectivity**:
- **Virtual Private Cloud (VPC)**: Default
- **Public Access**: **Yes**
- **Availability zone**: No preference
- **VPC Security Group**: Create a new security group or select one
If creating a new security group:
1. Go to [EC2 > Security Groups](https://console.aws.amazon.com/ec2/v2/home#SecurityGroups:)
2. Select your security group
3. Edit **Inbound rules**
- Type: **PostgreSQL**
- Protocol: TCP
- Port Range: `5432`
- Source: `0.0.0.0/0` (to allow all IPs)
> ⚠️ This opens your DB to the internet. Use strong passwords.
---
## ✅ 7. Launch the DB
Click **Create database**
Wait for the status to become **“Available”**
---
## ✅ 8. Connect to the Database
- Find the **endpoint** in the RDS console
Thanks for the effort
Wow thanks for the guide. I will for sure need this. I did want to update I’m back working on the site and it’s making huge headway. I have been able to manage my data better by turning off database backups for the time being. I appreciate everyone weighing in on this, I think people will be surprised what can actually be built on replit, I’m excited to show my final version soon with a full tour of the all inside and out.