Drizzle Studio stuck at 'connecting to localhost:4983'

I have a local Ubuntu server with Docker & Coolify running my websites. I'd like to install Drizzle Studio so I can have that nice interface with my databases instead of going at it through command-line (ugh, last time I messed with databases was like 15 years ago through phpMyAdmin). I'm a little bit confused on how to get it up and running on my machine, I was under the impression it would be just a simple web app that I throw into my docker and connect via the port. Need some guidance
46 Replies
Mario564
Mario564•4mo ago
Drizzle Studio can be deployed using Drizzle Gateway, which is a containerized version of Studio. It has a free trial and then you have to pay $20/year for it. https://github.com/orgs/drizzle-team/packages/container/package/gateway There isn't a lot of documentation around it right now, but you can discuss this product further in #gateway if you need any help or want to provide feedback
Don Cezar
Don CezarOP•4mo ago
Yeah something paid is not what I'm looking for, basically I just want an interface that I can use to edit tables instead of via command line or code
Mario564
Mario564•4mo ago
Other than what I mentioned, there's no other way to securely deploy Drizzle Studio
Don Cezar
Don CezarOP•4mo ago
The docs show a way to run it via npm, what's so different about gateway and why does it cost money if it's self-hostable
Mario564
Mario564•4mo ago
Once you run it, you'll be asked to sign into Github and from there you sign up for the free trial If you want more information, you could ask one of the official Drizzle Team members
Don Cezar
Don CezarOP•4mo ago
So there's absolutely no way to run Drizzle Studio for free? Why do you even need github for it?
Mario564
Mario564•4mo ago
1. Nope. You might be able to deploy it for free without Docker but there's no security measures preventing random people from using the interface. 2. It's nothing to do with the Studio interface, it's for the account you pay with.
Don Cezar
Don CezarOP•4mo ago
1. How do I deploy it without Docker, free? I don't care about security, it will be only on localhost
Mario564
Mario564•4mo ago
You could take a look at the "Launch Drizzle Studio" section of this page https://orm.drizzle.team/drizzle-studio/overview
Drizzle ORM - Meet Drizzle Studio
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Don Cezar
Don CezarOP•4mo ago
It doesn't seem to work, stuck at loading. Followed the drizzle-kit installation:
cezar@ubuserver:~/drizzle$ npm i -D drizzle-kit

up to date, audited 32 packages in 1s

2 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
cezar@ubuserver:~/drizzle$ drizzle-kit studio
drizzle-kit: command not found
cezar@ubuserver:~/drizzle$ npm i -D drizzle-kit

up to date, audited 32 packages in 1s

2 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
cezar@ubuserver:~/drizzle$ drizzle-kit studio
drizzle-kit: command not found
No description
Don Cezar
Don CezarOP•4mo ago
If I use npx before drizzle-kit studio, Drizzle Studio starts but.. it gets stuck at connecting 😅
cezar@ubuserver:~/drizzle$ npx drizzle-kit studio
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/cezar/drizzle/drizzle.config.ts'
Using 'pg' driver for database querying

Warning Drizzle Studio is currently in Beta. If you find anything that is not working as expected or should be improved, feel free to create an issue on GitHub: https://github.com/drizzle-team/drizzle-kit-mirror/issues/new or write to us on Discord

Drizzle Studio is up and running on https://local.drizzle.studio
cezar@ubuserver:~/drizzle$ npx drizzle-kit studio
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/cezar/drizzle/drizzle.config.ts'
Using 'pg' driver for database querying

Warning Drizzle Studio is currently in Beta. If you find anything that is not working as expected or should be improved, feel free to create an issue on GitHub: https://github.com/drizzle-team/drizzle-kit-mirror/issues/new or write to us on Discord

Drizzle Studio is up and running on https://local.drizzle.studio
Mario564
Mario564•4mo ago
What browser are you using?
Don Cezar
Don CezarOP•4mo ago
Tried multiple - Vivaldi, Edge, Chrome npx drizzle-kit push connected to the database and created the table so pg is not an issue I even installed mkcert and it's still not connecting
Mario564
Mario564•4mo ago
Hmm, can I see your Drizzle config file?
Don Cezar
Don CezarOP•4mo ago
It's the one from the guide
import { defineConfig } from "drizzle-kit";

export default defineConfig({
schema: "./schema/*",
out: "./drizzle",
dialect: 'postgresql',
dbCredentials: {
url: process.env.DB_URL,
}
});
import { defineConfig } from "drizzle-kit";

export default defineConfig({
schema: "./schema/*",
out: "./drizzle",
dialect: 'postgresql',
dbCredentials: {
url: process.env.DB_URL,
}
});
Mario564
Mario564•4mo ago
Can you open the browser console and see if anything is being logged there? Also, what PG driver are you using for your app?
Don Cezar
Don CezarOP•4mo ago
pg
Don Cezar
Don CezarOP•4mo ago
No description
Mario564
Mario564•4mo ago
Can you try clearing the browser cache?
Don Cezar
Don CezarOP•4mo ago
The issue is consistent across 4 different browsers.. I doubt cache is an issue Same issue with cleared cache
Mario564
Mario564•4mo ago
Can you point schema towards a specific file instead of a folder? If your schema is not in one file, you can make a barrel file for it Scratch that, don't think it's that
Don Cezar
Don CezarOP•4mo ago
Well npx drizzle-kit push is able to read the schema file and interact with the database 😅
Mario564
Mario564•4mo ago
Are you in the latest version of Drizzle Kit?
Don Cezar
Don CezarOP•4mo ago
Yeah, literally just installed it when I started this thread 😄 What's the app running at localhost:4983? It's supposed to start when you do npx drizzle-kit studio right?
Mario564
Mario564•4mo ago
Yeah, that's the server for Studio
Don Cezar
Don CezarOP•4mo ago
Yeah..
Mario564
Mario564•4mo ago
I just installed Kit, ORM and PG driver without anything else and don't have any issues What OS are you using? Not sure if that affects anything but the more info the better
Don Cezar
Don CezarOP•4mo ago
Windows 11 on the PC, Ubuntu 22 on the Server
Mario564
Mario564•4mo ago
And you're currently running Studio on Win 11?
Don Cezar
Don CezarOP•4mo ago
No, on the server W11 is my personal computer, using it to access the website (local.drizzle.studio), in case that was relevant
Mario564
Mario564•4mo ago
Oh, that might actually be relevant I did this in Win 11, but don't know if Studio running on a Linux OS changes anything
Don Cezar
Don CezarOP•4mo ago
Can you even install studio on windows?
Mario564
Mario564•4mo ago
Yeah, you follow the same steps mentioned in the guide I don't specialize in the Studio related stuff so I'll forward this to someone else who is. I've seen some similar complaints but can't seem to find a definitive answer CC: @âš¡Z.E.U.Sâš¡
Don Cezar
Don CezarOP•4mo ago
Thank you!
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
@Don Cezar Hey! I think you need to add host to the studio command and expose port 4983
Don Cezar
Don CezarOP•4mo ago
Expose? I thought Drizzle Studio can be ran completely locally
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
Only the studio server works locally.
Don Cezar
Don CezarOP•4mo ago
I can't make it work without exposing ports?
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
Yes, but without docker
Don Cezar
Don CezarOP•4mo ago
I'm not running it in docker How can I do this? When specifying the host in the command the server does start, going to localhost:4983 turns from 192.168.100.14 refused to connect. to 192.168.100.14 didn’t send any data., but I'd need to make it work without forwarding ports Turning the url from http://192.168.100.14:4983 to https://192.168.100.14:4983 (https) turns the page from didn't send any data to 404 Not Found So there's something working, just not properly
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
Are there any errors in cli?
Don Cezar
Don CezarOP•4mo ago
You mean where I run the npx studio command yeah? Nope, no errors Wait It suddenly started working
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
What did you do?
Don Cezar
Don CezarOP•4mo ago
No idea... It doesn't have a 'secure connection' (no ssl) but it works I think Adding the host in the command and visiting the right URL seems to make it work, I guess? npx drizzle-kit studio --host 192.168.100.14 https://local.drizzle.studio/?host=192.168.100.14 Is it possible to manage multiple databases in the same drizzle studio instance? Connecting to postgres://postgres:postgres@localhost:5432 defaults to the postgres database (at postgres://postgres:postgres@localhost:5432/postgres)
âš¡Z.E.U.Sâš¡
⚡Z.E.U.S⚡•4mo ago
Not yet.
4:44
4:44•4mo ago
mkcert fix it for chrome But not for zen
Want results from more Discord servers?
Add your server