Quick Start: Run EdgeDB in Under 5 Minutes
Want to try the “latest hotness” without spending all day on configuration? If you’re using Ubuntu, Debian, or CentOS, here are 3 quick steps to bring EdgeDB into your project.
Step 1: Install EdgeDB CLI
curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
Once installed, restart your terminal or run source ~/.bashrc to activate the edgedb command.
Step 2: Initialize your project
Create a new directory and run the initialization command. EdgeDB is smart: it will automatically download the appropriate version and run a separate database instance for your project.
mkdir my-edgedb-app && cd my-edgedb-app
edgedb project init
Feel free to hit Enter to select the default settings.
Step 3: Write your first query
Access the Command Line Interface (REPL) directly using the edgedb command:
select "Hello EdgeDB!";
select 1 + 1;
That’s it. You now have a modern database engine without having to touch the lengthy .conf files of PostgreSQL or MySQL.
The Pain of Pure SQL
Two years ago, I managed an e-commerce system running on Postgres. The nightmare began when the Category table structure was nested five levels deep. The SQL query back then was over 100 lines long, drowning in JOINs and GROUP BYs. Just re-reading the code after a week was enough to give me a “migraine.”
As developers, we think in Objects, but traditional databases store data in Tables (Relational). This mismatch forces us to use ORMs as a bridge. However, ORMs often generate extremely slow and hard-to-control SQL queries.
EdgeDB solves this at the root by building on top of PostgreSQL but communicating in an Object-oriented way. You query using EdgeQL – a language as powerful as SQL but as readable and clean as JSON.
Professional Instance Management on Linux
In real-world environments, understanding how to manage instances is crucial to avoid resource conflicts.
Controlling Processes
Each EdgeDB project is typically linked to its own instance. To check what’s running on the server, use:
edgedb instance list
If the project requires a specific version to stay consistent with the team (e.g., version 4.2), install it using the command:
edgedb server install --version 4.2
Data Security
Although edgedb project init handles authentication automatically, you need to manage passwords strictly when deploying to a production server. Changing an instance password is very simple:
edgedb instance reset-password my_instance_name
Schema Definition: Thinking in Objects
Forget dry Tables. In EdgeDB, we work with Types. All configurations are neatly contained in the dbschema/default.esdl file.
For example, here’s how to design a Blog system with complex relationships:
module default {
type User {
required property name -> str;
property email -> str {
constraint exclusive; # Email must be unique
}
}
type Post {
required property title -> str;
property content -> str;
required link author -> User; # Extremely explicit 1-n relationship
multi link tags -> Tag; # n-n relationship without needing a junction table
}
type Tag {
required property name -> str;
}
}
The link keyword is the most valuable feature. It completely replaces Foreign Keys and bothersome junction tables. You just focus on business logic and let EdgeDB handle the storage.
Migration is No Longer a Worry
Once you’ve edited the .esdl file, just run these commands:
edgedb migration create
edgedb migrate
EdgeDB will compare the changes and ask for confirmation like: “Did you just rename ‘title’ to ‘header’?”. This process reduces data loss risks by 90% compared to writing manual SQL scripts.
The Real Power of EdgeQL
See how EdgeQL fetches nested data (Deep Fetching) without needing a single JOIN command.
select Post {
title,
content,
author: {
name
}
} filter .author.name = 'Tuan It';
The result is a clean JSON array, ready for the frontend to use immediately without needing to remap data on the backend.
Real-world Experience: When is it worth it?
Despite being superior, EdgeDB is not a silver bullet for every situation.
Pros (Use it now):
- New projects (Greenfield): Speeds up backend coding by 2-3x.
- Complex relational data: If your application has a complex permission system or social network, EdgeDB is a lifesaver.
- TypeScript ecosystem: EdgeDB’s generator will automatically create perfect types for your code.
Limitations (Things to consider):
- Massive legacy data: I once tried migrating a 100GB database from Postgres to EdgeDB. It took 3 days of preparation but had to be halted because the company’s legacy BI (Business Intelligence) tools didn’t support EdgeQL yet.
- Community: Third-party GUI management tools are still fewer compared to the 30-year ecosystem of MySQL.
In summary, EdgeDB is like a giant leap in database programming experience. If you’re tired of long, winding SQL queries, try installing it on Linux today. You certainly won’t want to go back to the old way.

