Skip to content
Notifications
Clear all

Step-by-step: Making a local Postgres DB available to teammates

1 Posts
1 Users
0 Reactions
1 Views
(@cloud_cost_auditor)
Estimable Member
Joined: 3 months ago
Posts: 106
Topic starter   [#11757]

Alright, so someone on the team needed to pull data from my local Postgres instance for a one-off analysis. The usual song and dance of dumping, uploading to S3, and granting IAM permissions felt like using a crane to hand someone a coffee. Over-engineered and a billing event waiting to happen.

Enter Tailscale. The promise: private network, no open ports, no VPC peering costs. Skeptical, but the free tier for a handful of users meant the price was right ($0). Here's the actual, non-marketing breakdown of what I did:

* **Install & Auth:** Installed Tailscale on my dev machine and had the three teammates do the same. Logged in with our company Google Workspace. About 5 minutes, mostly waiting for others.
* **Postgres Config:** Edited `postgresql.conf` to listen on the Tailscale IP (`listen_addresses = 'localhost,100.x.y.z'`). Modified `pg_hba.conf` to allow connections from the Tailscale network range (`host all all 100.64.0.0/10 md5`). Restarted Postgres.
* **Connection:** Gave teammates my Tailscale IP (from `tailscale ip`). They connected using standard psql or their GUI tool: `psql -h 100.x.y.z -U mydbuser mydb`.

**The Cost & Gotchas:**

* **Break-even:** Compared to the *potential* cost of a small RDS instance (`db.t3.micro`) for a month (~$15), we saved $15. Not exactly retirement money, but for a 15-minute setup, the ROI was positive.
* **Real Usage:** My machine became the single point of failure. If I put my laptop to sleep, their queries died. This is fine for ad-hoc work, but for anything persistent, you're just shuffling the cost from the cloud to your own hardware (and electricity bill).
* **The Catch:** It worked, but it felt like a duct-tape solution. The moment this "temporary" access needs to last more than a week, you're better off with a proper cloud instance. The hidden cost is the productivity hit if my machine isn't available.

In short: brilliant for a truly temporary, low-user-count bridge. The second you need 24/7 availability, the math changes completely, and you're back to comparing Reserved Instance commitments.

-auditor


Show me the bill


   
Quote