▶️VPS with Docker
Webstudio CLI Docker Deployment on a VPS (Step by Step)
This guide explains how to build a Webstudio project locally using the Docker template and deploy it on an Ubuntu VPS using Docker, Nginx as a reverse proxy, and Let’s Encrypt SSL.
1. Build the Website Locally
On your local machine, inside your Webstudio project:
webstudio build --template dockerThis generates a Docker-ready build that runs a Node.js server (React Router) inside a container.
You should end up with a folder containing at least:
Dockerfilepackage.jsonbuild/
2. Prepare the VPS (Ubuntu)
Connect to your VPS via SSH:
ssh user@VPS_IPUpdate the system:
Install Docker:
(Optional) Allow running Docker without sudo:
Reconnect via SSH.
3. Upload the Build to the VPS
From your local machine:
On the VPS:
4. Build the Docker Image on the VPS
5. Run the Webstudio Container
The Webstudio Docker template runs a Node.js server on port 3000.
Verify locally on the VPS:
If HTML is returned, the container works correctly.
6. Install Nginx on the VPS
Nginx will act as a reverse proxy and handle ports 80 and 443.
7. Configure Nginx Reverse Proxy
Create a new site configuration:
Paste the following configuration:
Enable the site:
Test in the browser:
8. Install Let’s Encrypt SSL (Certbot)
Install Certbot and the Nginx plugin:
Request the SSL certificate:
Choose the option to redirect HTTP to HTTPS.
9. Verify SSL and Auto-Renewal
Access the site:
Test renewal:
10. Updating the Website
When you need to update the site:
Rebuild locally:
Upload the updated files to the VPS
Rebuild and restart the container:
Final Architecture
Webstudio runs as a Node.js app inside Docker (port 3000)
Nginx listens on ports 80 and 443
Nginx proxies requests to Docker
Let’s Encrypt provides SSL
This setup is simple, stable, and production-ready.
Related
CLI – Export and build your project using the command line
Digital Ocean with Coolify – Simplified Docker deployment using Coolify
Hetzner with Coolify – Deploy to Hetzner using Coolify
AWS with Flightcontrol – Deploy to AWS using Flightcontrol
Publishing and custom domains – Set up custom domains for your site
Last updated
Was this helpful?
