Join the Webstudio community

Updated 4 weeks ago

How to Export in Self-Hosted Builder

At a glance
The community members are discussing issues with self-hosting WebStudio and exporting projects using the WebStudio-CLI. They mention SSL issues and the need to register the self-hosted WebStudio to DNS and access it through a service like Cloudflare. The community members also discuss running the WebStudio Builder in Docker and using the CLI on a different machine, with the answer suggesting that the CLI should be run in the same environment as the Builder.
Useful resources
If WebStudio is self-hosted, it is not possible to Export to Docker, etc. with WebStudio-CLI.
SSL issues will occur.

If you are self-hosting the Builder, then please use the Webstudio CLI to export your project.

and it is recommended, how can I do it?
I looked for documentation but could not successfully find the information.
Any help would be appreciated.
Marked as solution
E.g. can you open builder on the same machine where you run CLI?
View full solution
O
M
17 comments
Ssl is responsibility of your domain hosting provider
E.g. cloudflare provides it for free
In other words, can't I build it in the development environment?
To export with WebStudio-CLI, do I need to register WebStudio's self-host to DNS and access it through Cloudflare, etc. (open to the outside world)?
I am not good at English so I use a translator.
The translation may be rude. Sorry.
You can, we provide wstd.dev with ssl for that
I don't think you should need ssl to use CLI, but @Bogdan may confirm
Thanks for your kind answer.
So SSL is not required for CLI?
What I tried:
Plain Text
[REDACTED_USER]@[REDACTED_HOST]:~/website-dev/webstudio_cli_files$ webstudio
│
◇  Would you like to create a project folder? (no to use current folder)
│  Yes
│
◇  Please enter a project name
│  test
│
◇  Please paste a link from the Share Dialog in the builder
│  https://p-%2A%2A%2A%2A%2A%2A%2A%2A.wstd.dev/?authToken=****&mode=design
│
●  Saved credentials for project [PROJECT_ID].
│  You can find your config at /home/[REDACTED_USER]/.config/webstudio-nodejs/webstudio-config.json
│
◇  The project is linked successfully
│
◇  Where would you like to deploy your project?
│  Docker
│
◇  Would you like to install dependencies? (recommended)
│  Yes
│
(node:14591) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
▲  fetch failed
TypeError: fetch failed
    at node:internal/deps/undici/undici:13510:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async getLatestBuildUsingProjectId (file:///home/[REDACTED_USER]/.local/share/fnm/node-versions/v22.15.0/installation/lib/node_modules/webstudio/lib/cli.js:149:20)
    at async loadProjectDataByProjectId (file:///home/[REDACTED_USER]/.local/share/fnm/node-versions/v22.15.0/installation/lib/node_modules/webstudio/lib/cli.js:176:18)
    at async sync (file:///home/[REDACTED_USER]/.local/share/fnm/node-versions/v22.15.0/installation/lib/node_modules/webstudio/lib/cli.js:343:12)
    at async Object.initFlow [as handler] (file:///home/[REDACTED_USER]/.local/share/fnm/node-versions/v22.15.0/installation/lib/node_modules/webstudio/lib/cli.js:7321:3) {
  [cause]: [Error: SSL routines:ssl3_get_record:wrong version number … code: 'ERR_SSL_WRONG_VERSION_NUMBER']
}
Windows 11
WSL2
Ubuntu-24.04 LTS
Docker
Are you starting Webstudio builder in docker?
Are you running the CLI on the same local machine?
Running WebStudio with Docker. (As per the tutorial)
CLI is running on WSL2 Ubuntu.
This distribution is turned on in WSL integration.
Is CLI on the same machine? Wstd.dev is essentially localhost
E.g. can you open builder on the same machine where you run CLI?
I am running WebStudio Builder on a Windows machine.
As per the instructions, I cloned from Git, opened the project directory in VSCode, and reopened it as a container.
I then ran it with pnpm dev. (Do I need to build it like this: "docker build -t web-studio:prod ."?)

I am running WebStudio-CLI on Ubuntu in WSL2, and working in the cloned webstudio directory.
The webstudio directory is managed on the filesystem on Ubuntu. (Managing it on Windows is incredibly slow due to bottlenecks.)

Maybe I'm saying something wrong. Sorry.
As you said, all I needed to do was work with the CLI in the same environment, that is, within the WebStudio Builder Dev Container.
My understanding of Docker was vague, and I didn't exactly know what was running in which environment (for example, Docker on WSL).
Sorry for the inconvenience.
Thank you for your kind response!
Add a reply
Sign up and join the conversation on Discord