Join the Webstudio community

Updated 4 months ago

Self-Hosting the Builder: Where to Ask Questions

At a glance

A community member asks about self-hosting the Webstudio builder. While documentation exists for running the project using GitHub Codespaces, they are attempting to run it using Docker on a local server. They created a custom Docker configuration similar to the official one, but are experiencing issues with database migrations failing due to a missing "extensions" schema.

Other community members suggest running pnpm build in the root and pnpm dev in apps/builder, but this doesn't resolve the issue. It's noted that Webstudio is primarily intended for local development environments and not for self-hosting, with no guarantees for custom configurations. The discussion ends without a clear resolution to the database migration errors.

A VS Code guide for remote container development is suggested as a potential resource, but no definitive solution is provided.

Useful resources
where can I ask qestions about self-hosting the builder?
B
h
24 comments
Yeah, I've tried that, not working. I'm trying to host it with Docker currently
(on a local server)
I've made a working Dockerfile and the server boots up, but when I try access it is just gets stuck loading
I just get this
Attachment
image.png
There's this, but the server still starts.
Plain Text
webstudio-1  | There are failed migrations:
webstudio-1  |   - 20240807000548_deleted-project-free-domain
webstudio-1  | 
webstudio-1  | Error: Command failed with exit code 1: prisma db execute --file /usr/src/app/packages/prisma-client/prisma/migrations/20240807000548_deleted-project-free-domain/migration.sql --schema /usr/src/app/packages/prisma-client/prisma/schema.prisma
webstudio-1  | Error: ERROR: schema "extensions" does not exist
webstudio-1  | 
webstudio-1  | 
webstudio-1  |     at makeError (file:///usr/src/app/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
webstudio-1  |     at handlePromise (file:///usr/src/app/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
webstudio-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
webstudio-1  |     at Module.cliExecute (/usr/src/app/packages/prisma-client/migrations-cli/prisma-migrations.ts:274:3)
webstudio-1  |     at Object.up (/usr/src/app/packages/prisma-client/migrations-cli/umzug.ts:28:13)
webstudio-1  |     at <anonymous> (/usr/src/app/node_modules/.pnpm/[email protected]/node_modules/umzug/src/umzug.ts:257:6)
webstudio-1  |     at Umzug.runCommand (/usr/src/app/node_modules/.pnpm/[email protected]/node_modules/umzug/src/umzug.ts:208:11)
webstudio-1  |     at up (/usr/src/app/packages/prisma-client/migrations-cli/commands.ts:236:5)
webstudio-1  |     at Module.migrate (/usr/src/app/packages/prisma-client/migrations-cli/commands.ts:270:3)
webstudio-1  |     at main (/usr/src/app/packages/prisma-client/migrations-cli/cli.ts:68:5)
webstudio-1  | 
webstudio-1  | 
webstudio-1  | Please mark them as resolved or reset the database before you can proceed.
You need to run pnpm build in the root and then pnpm dev in apps/builder to start builder
That's what I'm doing
Then you'll be able to access it with wstd.dev:5173
That won't work, because I 1. have a selfhosted DNS server and 2. it's on another local machine
Did you use docker compose to setup database or use own postgres?
Plain Text
services:
  webstudio:
    build:
      context: .
    volumes:
      - .env:/usr/src/app/apps/builder/.env.development:rw
    ports:
      - 5173:5173
    env_file:
      - .env

  db:
    image: postgres
    command: ["postgres", "-c", "log_statement=all"]
    restart: always
    environment:
      POSTGRES_DB: webstudio
      POSTGRES_USER: webstudio
    env_file:
      - ./docker.env
    volumes:
      - ./data/dbdata:/var/lib/postgresql/data
    ports:
      - ${PGPORT:-5432}:5432
We can't guarantee anything custom to work
We provide only developer machine with local setup to experiment but it's not intended to be hosted anywhere
Sure, but I've basically replicated the one provided
I'm putting it on my local server because that's much easier for me
Surely it should be accessible via http://[machine_ip]:5173, no?
@TrySound
Attachment
image.png
any idea why that's happening?
I have progressed to this
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord