Deploy anywhere with your favorite database

Integration guides for every backend.

Step-by-step walkthroughs to get Redge running with D1, Turso, SQLite, Postgres, MySQL, and more.

Cloudflare D1

Deploy Redge alongside Workers with native D1 integration.

1

Create D1 database

wrangler d1 create redge
2

Get database ID

wrangler d1 info redge
3

Set environment

D1_API_TOKEN=your_token DATABASE_URL=d1://account/id
4

Run Redge

go run ./cmd/redge

Benefits

  • Native Workers integration
  • Global edge deployment
  • Built-in analytics

Turso / libSQL

Global SQLite distribution with instant replication.

1

Create Turso database

turso db create redge
2

Get connection string

turso db show redge
3

Configure Redge

DATABASE_URL=libsql://example.turso.io TURSO_AUTH_TOKEN=token
4

Run Redge

go run ./cmd/redge

Benefits

  • Global replication
  • SQLite compatibility
  • Simple backups

SQLite (Local)

Perfect for development, single-node, or edge deployments.

1

Set database URL

DATABASE_URL=sqlite://redge.db
2

Create data directory

mkdir -p data
3

Run Redge

go run ./cmd/redge
4

Connect client

redis-cli -h localhost -p 6379 ping

Benefits

  • Zero setup
  • No network latency
  • Easy to inspect (.db file)

PostgreSQL

Leverage existing Postgres infrastructure and expertise.

1

Create database

createdb redge
2

Get connection string

postgres://user:pass@localhost/redge
3

Configure Redge

DATABASE_URL=postgres://user:pass@localhost/redge?sslmode=disable
4

Run Redge

go run ./cmd/redge

Benefits

  • Familiar tooling
  • Advanced replication
  • Enterprise support

MySQL

Connect Redge to existing MySQL deployments.

1

Create database

mysql -u root -p -e "CREATE DATABASE redge;"
2

Get connection string

mysql://user:pass@tcp(localhost:3306)/redge
3

Configure Redge

DATABASE_URL=mysql://user:pass@tcp(localhost:3306)/redge?parseTime=true
4

Run Redge

go run ./cmd/redge

Benefits

  • Existing infrastructure
  • Proven reliability
  • Cluster support

Patterns

Common deployment architectures

Single-Node Development

SQLite backend, Redge running locally.

Ideal for

Solo developers, prototyping, CI/CD testing

Edge + SQL

Lightweight Redge at edge, shared SQL backend.

Ideal for

Multi-region, global teams, edge compute platforms

Managed Cloud

Redge Cloud endpoints with provisioned backends.

Ideal for

Production teams, enterprises, operational simplicity

Getting Started

5 minutes to your first Redge

# Clone the repo
git clone https://github.com/pubflow/redge
cd redge

# Set SQLite database (simplest option)
export DATABASE_URL=sqlite://redge.db

# Build and run
go mod tidy
go run ./cmd/redge

# In another terminal, test with redis-cli:
redis-cli -p 6379 set hello world ex 60
redis-cli -p 6379 get hello
redis-cli -p 6379 zadd leaderboard 100 alice 85 bob
redis-cli -p 6379 zrange leaderboard 0 -1 withscores

Ready for production?

Change DATABASE_URL to point to your Postgres, MySQL, Turso, or D1 endpoint. Same Redge code, different backend.

Deploy your Redge instance

Pick your backend, follow a guide, and start building with Redis compatibility and SQL durability.