Change web server port to 3030 and add Nginx config for smbcloud.xyz

keypair34 committed May 14, 2026 at 20:59 UTC 88d117dacfd2cb26ed49179c388f8e3b2bae6dd6
4 files changed +62 -3
.smb/config.toml
+1 -1
@@ -12,7 +12,7 @@ source = "."
12 path = "apps/web/smbcloudweb"
13 package_manager = "pnpm"
14 pm2_app = "smbcloud-web"
15 -port = 3028
15 +port = 3030
16 deployment_method = 1
17 created_at = "2025-06-09T17:55:01.800Z"
18 updated_at = "2025-06-09T17:55:01.800Z"
ecosystem.config.js
+1 -1
@@ -50,7 +50,7 @@ module.exports = {
50 env_production: {
51 NODE_ENV: "production",
52 // The standalone server reads PORT and HOSTNAME from env.
53 - PORT: "3028",
53 + PORT: "3030",
54 HOSTNAME: "127.0.0.1",
55
56 NEXT_TELEMETRY_DISABLED: "1",
nginx/smbcloud.xyz new
+59
@@ -0,0 +1,59 @@
1 +# ─────────────────────────────────────────────────────────────
2 +# smbcloud.xyz — minimal Nginx reverse-proxy for Next.js SSR
3 +#
4 +# This follows the simpler smbcloud-web-console pattern:
5 +# proxy everything to the standalone Next.js server and let the app
6 +# serve both SSR responses and /_next/static assets.
7 +#
8 +# Next.js runs via PM2: node server.js (PORT=3030, HOSTNAME=127.0.0.1)
9 +# Deploy path: /home/git/apps/web/smbcloudweb/
10 +# PM2 app: smbcloud-web
11 +#
12 +# Keep the port aligned in three places:
13 +# 1. .smb/config.toml
14 +# 2. PM2 env / ecosystem.config.js
15 +# 3. this nginx proxy target
16 +# ─────────────────────────────────────────────────────────────
17 +
18 +server {
19 + listen 80;
20 + listen [::]:80;
21 + server_name smbcloud.xyz www.smbcloud.xyz;
22 +
23 + return 301 https://$host$request_uri;
24 +}
25 +
26 +server {
27 + listen 443 ssl http2;
28 + listen [::]:443 ssl http2;
29 + server_name smbcloud.xyz www.smbcloud.xyz;
30 +
31 + ssl_certificate /etc/letsencrypt/live/smbcloud.xyz/fullchain.pem;
32 + ssl_certificate_key /etc/letsencrypt/live/smbcloud.xyz/privkey.pem;
33 + include /etc/letsencrypt/options-ssl-nginx.conf;
34 + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
35 +
36 + access_log /var/log/nginx/smbcloud.xyz.access.log;
37 + error_log /var/log/nginx/smbcloud.xyz.error.log;
38 +
39 + location / {
40 + proxy_pass http://127.0.0.1:3030;
41 + proxy_http_version 1.1;
42 +
43 + proxy_set_header Host $host;
44 + proxy_set_header X-Forwarded-Host $host;
45 + proxy_set_header X-Forwarded-Port 443;
46 + proxy_set_header X-Real-IP $remote_addr;
47 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
48 + proxy_set_header X-Forwarded-Proto $scheme;
49 +
50 + proxy_set_header Upgrade $http_upgrade;
51 + proxy_set_header Connection "upgrade";
52 +
53 + proxy_connect_timeout 60s;
54 + proxy_send_timeout 60s;
55 + proxy_read_timeout 60s;
56 + proxy_buffering off;
57 + proxy_cache_bypass $http_upgrade;
58 + }
59 +}
package.json
+1 -1
@@ -8,7 +8,7 @@
8 "build:content": "contentlayer2 build",
9 "preview": "next build && next start",
10 "start": "next start",
11 - "start-smbcloudweb": "next start -p 3015",
11 + "start-smbcloudweb": "next start -p 3030",
12 "lint": "eslint ."
13 },
14 "dependencies": {