u/Ill-Satisfaction7831

Turned my old MSI gaming laptop into a production Rails server, $0/month hosting using Cloudflare Tunnel
▲ 29 r/rails+2 crossposts

Turned my old MSI gaming laptop into a production Rails server, $0/month hosting using Cloudflare Tunnel

Had an old gaming laptop collecting dust. Instead of selling it, I wiped Windows 11 and set it up as a proper production server. Here's the full setup and what I ran into.

What's running:

  • Ubuntu Server 24.04 LTS
  • Rails 8 + Puma + Sidekiq + Redis
  • PostgreSQL + pgvector (AI embeddings)
  • Nginx as reverse proxy
  • Cloudflare Tunnel for public HTTPS
  • Custom domain

Total cost: ~₹800/year (domain only)

Previously running on AWS EC2 + RDS. Shut it all down today.

The interesting problems I ran into:

1. CGNAT

My ISP uses CGNAT so port forwarding is impossible. Cloudflare Tunnel solved this completely, your server connects outbound to Cloudflare, no inbound ports needed. Works perfectly behind any NAT.

2. ISP DNS blocking

The server's default DNS (router) wasn't resolving api.openai.com correctly. Switching to 1.1.1.1 via resolvectl fixed it.

3. systemd EnvironmentFile

Getting env vars to load properly into systemd services was surprisingly annoying. systemctl show --property=Environment shows empty even when the file is loading correctly — it only shows inline Environment= directives, not EnvironmentFile contents. Check via /proc/{pid}/environ instead.

4. pgvector permissions

Installing pgvector on Ubuntu 24.04 with a non-superuser PostgreSQL role throws permission errors even after CREATEDB. Had to grant SUPERUSER to the app user to get migrations running.

Specs:

  • Old gaming laptop
  • 8GB RAM
  • ~470GB SSD
  • Idle memory with full stack: ~730MB (9%)

Happy to answer questions about any part of the setup.

https://preview.redd.it/bi3b777v9i1h1.png?width=3024&format=png&auto=webp&s=d15e287b7387f3d648a4a83e15eefeec9041af21

https://preview.redd.it/55nv87ow9i1h1.png?width=3024&format=png&auto=webp&s=ceb79ae56a6a6ad768ed91ffd0fc6631bd8058f9

reddit.com
u/Ill-Satisfaction7831 — 7 days ago
▲ 23 r/Slack+1 crossposts

I built an AI Slack bot that answers questions from your company docs, looking for 5 beta workspaces

Hey,

I've spent the last few months building InternalQ. The idea: teams upload their PDFs and Word docs, handbooks, SOPs, policies and employees can ask questions directly in Slack and get answers cited from the actual documents.

The real pain I'm solving: HR/ops people at small companies spend hours a week answering the same questions about time-off, expense policies, onboarding steps. Those answers exist in documents nobody reads.

Here's the honest situation: I need 5 active Slack workspace installs before Slack will approve the Marketplace listing. So I'm looking for 5 teams who are willing to actually use it and give me feedback.

What you get:

  • Free tier (30 questions/month, no card needed)
  • Direct line to me if anything breaks or needs tuning

Anyone dealing with this problem? Happy to answer questions below or set it up with you directly.

u/Ill-Satisfaction7831 — 10 days ago