How to provide self-hosted admin URL

Could you please help me how to integrade self-hosted frontend plasmic Nextjs app with my custom self-hosted plasmic server?
I run this to create my frontend from scratch:

yarn create plasmic-app

Than it asks me the following question:
? Your personal access token (create one at https://studio.plasmic.app/self/settings)

Since my plasmic server is self-hosted I provide token from http://localhost:3003/self/settings.

Than it asks me to open the following link in browser to authenticate my frontend with admin pannel:

If your browser doesn't automatically open, enter the following URL:
https://studio.plasmic.app/auth/plasmic-init/****************************

I open http://localhost:3003/auth/plasmic-init/**************************** and make authorization from here.
And this is not working at all.

Why it asks me to autorize on studio.plasmic.app since I want to use my custom self-hosted domain?

Please log in and authorize Plasmic CLI.
Waiting for token...
We haven't received an auth token from Plasmic yet.
? Your Plasmic user email

Are there any environmental variables to provide a custome URL for self-hosting plasmic but not to be redirected to studio.plasmic.app ?

Something like PLASMIC_ADMIN_DOMAIN? Is it possible to integrate my frontend with self-hosted version of admin pannel, but not with the studio.plasmic.app website?

Thank you!

@chungwu @jason

hi @david_d !
Are you using loader or codegen?
For the loader mode the easiest way to do things is to just set up the code using some dummy project from studio.plasmic.app (or to fetch the code from our examples), and then just switch the host prop of the initPlasmicLoader in plasmic-init.ts to your self-hosted studio.
For example:

export const PLASMIC = initPlasmicLoader({
  host: 'http://localhost:3003/',
  projects: [
    {
      id: "yourProjectId",
      token: "yourProjectToken",
    },
  ],
  preview: true,
});

Then launch your app with yarn dev and it should be connected to the local studio instance

If you use codegen, or don’t want to use dummy project route, you can also create a custom .auth file which will be used by create-plasmic-app and plasmic CLI
By default both of them use ~/.plasmic.auth, or the first .plasmic.auth file found in current and parent directories

{
  "host": "https://studio.plasmic.app",
  "user": "user@email.com",
  "token": "yourStudioToken"
}

You can generate this file by running plasmic auth --host http://localhost:3003

Thank you ! I will try myself.

I shouldn’t use yarn create plasmic-app, I should create the project myself and add what you’ve mentioned here

Ok great. The best-practice for the new projects is to just log in using custom --host param in plasmic auth CLI command, and then use npx create-plasmic-app

Thank you so much ! I will do it !

I also want to ask you about docker compose files.
I described a lot here Docker Compose file not working - #8 by david_d

But shortly spoken, docker files have some problems:

  1. Command part can’t be finished correctly, since it has not rights for creating files during docker composing:
command: |
    jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > tmp.json && mv tmp.json ormconfig.json && \
    yarn typeorm migration:run && \
    yarn seed && \
    cd /plasmic && \
    yarn dev

plasmic-wab-1 | sh: can’t create tmp.json: Permission denied

  1. Observability file should be edited to make it work platform/wab/src/wab/server/observabilty/index.ts:
import { PinoLogger } from "./PinoLogger";

export function logger() {
  return new PinoLogger();
}
  1. Ports in docker compose are open for external connections like 3003:3003 which is not very safe when deploying it together on host with other services. It’s better to use a common network, something like plasmic-network

And than refer cointainers together by their names inside this network like:
http://plasmic-wab:3003

Conclusion:
The main problem here is this command section (problem #1) which I haven’t fixed normally as a permanent solution, not temporary.

Maybe you could advice something to customize it so it will work just by
docker compose up -d ?

Since deploying in docker here is much more demanding, I already made a deployment by yarn without docker. But it would be wounderful if it could be just 1 docker command.

I see on reddit in r/selfhosted plasmic is not such popular only beacuse it’s hard to deploy. There are also no updated instructions on internet about this, but only step could fix it is to correct docker compose files.

Thank you for your response!

@david_d, we recently updated the Docker config files and the documentation for it, so everything should be up to date

I haven’t seen this issue with the permissions before. Just double-checked, and it’s building without errors on my end. Are you sure you haven’t launched any commands with sudo before that might’ve changed the default permissions?
Can you also send me the list of permissions for the folder where it tries to create the file?

For the second issue - yeah, we need to update that file @icaro_guerra @jason fyi

We are open to any contributions for Docker configs, if you think those would benefit the community!

What I’ve made:

git clone https://github.com/plasmicapp/plasmic.git
cd plasmic
docker compose up -d

After all created:

docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS                      PORTS                                         NAMES
f2a1ef792cc5   plasmic-plasmic-wab   "sh -c 'jq '(.host =…"   14 minutes ago   Exited (1) 12 minutes ago                                                 plasmic-plasmic-wab-1
93a2a35e18d6   postgres:15           "docker-entrypoint.s…"   14 minutes ago   Up 12 minutes (healthy)     0.0.0.0:5432->5432/tcp, [::]:5432->5432/tcp   plasmic-plasmic-db-1

Permission for creating tmp.json is denied:

plasmic:~/plasmic$ docker logs plasmic-plasmic-wab-1
sh: can't create tmp.json: Permission denied

The part of docker-compose.yml where tmp.json is trying to create:

# Plasmic WAB (Web App Builder)
  plasmic-wab:
    build:
      context: .
      dockerfile: ./platform/wab/tools/docker-dev/Dockerfile.dev.aio
    command: # Override the default dockerfile startup command here for debugging purpose
    - |
      jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > tmp.json && mv tmp.json ormconfig.json && \
      yarn typeorm migration:run && \
      yarn seed && \
      cd /plasmic && \
      yarn dev
plasmic:~$ echo $USER
webuser
ls -la
drwxr-sr-x   12 webuser  webuser       4096 Sep  4 11:01 plasmic
plasmic:~$ ls -la plasmic
total 1516
drwxr-sr-x   12 webuser  webuser       4096 Sep  4 11:01 .
drwxr-sr-x   14 webuser  webuser       4096 Sep  4 10:41 ..
-rw-r--r--    1 webuser  webuser         31 Sep  4 10:41 .envrc
-rw-r--r--    1 webuser  webuser          0 Sep  4 10:41 .eslintignore
-rw-r--r--    1 webuser  webuser      13427 Sep  4 10:41 .eslintrc.js
-rw-r--r--    1 webuser  webuser        177 Sep  4 10:41 .eslintrc.react.js
drwxr-sr-x    7 webuser  webuser       4096 Sep  4 10:41 .git
drwxr-sr-x    3 webuser  webuser       4096 Sep  4 10:41 .github
-rw-r--r--    1 webuser  webuser        666 Sep  4 10:41 .gitignore
-rw-r--r--    1 webuser  webuser         57 Sep  4 10:41 .gitreview
-rw-r--r--    1 webuser  webuser       1213 Sep  4 10:41 .lintstagedrc.js
-rw-r--r--    1 webuser  webuser          4 Sep  4 10:41 .nxignore
-rw-r--r--    1 webuser  webuser        428 Sep  4 10:41 .prettierignore
-rw-r--r--    1 webuser  webuser         54 Sep  4 10:41 .prettierrc
-rw-r--r--    1 webuser  webuser        170 Sep  4 10:41 .regula.yaml
-rw-r--r--    1 webuser  webuser         29 Sep  4 10:41 .tool-versions
-rw-r--r--    1 webuser  webuser       1452 Sep  4 10:41 CLAUDE.md
-rw-r--r--    1 webuser  webuser      11005 Sep  4 10:41 CONTRIBUTING.md
-rw-r--r--    1 webuser  webuser       1074 Sep  4 10:41 LICENSE.md
-rw-r--r--    1 webuser  webuser      33890 Sep  4 10:41 LICENSE.platform.md
-rw-r--r--    1 webuser  webuser      11876 Sep  4 10:41 README.md
-rw-r--r--    1 webuser  webuser       8509 Sep  4 10:41 build.mjs
-rw-r--r--    1 webuser  webuser         98 Sep  4 10:41 copy.bash
-rw-r--r--    1 webuser  webuser       3154 Sep  4 10:41 docker-compose.yml
drwxr-sr-x    3 webuser  webuser       4096 Sep  4 10:41 docs
drwxr-sr-x   36 webuser  webuser       4096 Sep  4 10:41 examples
-rw-r--r--    1 webuser  webuser        564 Sep  4 10:41 jest-transform-esbuild.js
-rw-r--r--    1 webuser  webuser        606 Sep  4 10:41 jest.config.js
-rw-r--r--    1 webuser  webuser       1751 Sep  4 10:41 knip.ts
-rw-r--r--    1 webuser  webuser         54 Sep  4 10:41 lerna.json
drwxr-sr-x    2 root     webuser       4096 Sep  4 11:01 node_modules
-rw-r--r--    1 webuser  webuser        664 Sep  4 10:41 nx.json
-rw-r--r--    1 webuser  webuser       6953 Sep  4 10:41 package.json
drwxr-sr-x   26 webuser  webuser       4096 Sep  4 10:41 packages
drwxr-sr-x   53 webuser  webuser       4096 Sep  4 10:41 plasmicpkgs
drwxr-sr-x    3 webuser  webuser       4096 Sep  4 10:41 plasmicpkgs-dev
drwxr-sr-x   13 webuser  webuser       4096 Sep  4 10:41 platform
drwxr-sr-x    2 webuser  webuser       4096 Sep  4 10:41 scripts
-rw-r--r--    1 webuser  webuser       2303 Sep  4 10:41 sweep.yaml
-rw-r--r--    1 webuser  webuser       1580 Sep  4 10:41 tsconfig.types.json
-rw-r--r--    1 webuser  webuser    1318628 Sep  4 10:41 yarn.lock

This is the whole log without -d:

plasmic:~/plasmic$ docker compose up
[+] Running 15/15
 ✔ plasmic-db Pulled                                                                                                                                                   14.6s 
   ✔ 396b1da7636e Pull complete                                                                                                                                         3.0s 
   ✔ fca2566eba32 Pull complete                                                                                                                                         3.0s 
   ✔ 631fe8c6d606 Pull complete                                                                                                                                         3.3s 
   ✔ 77c7671c4414 Pull complete                                                                                                                                         3.3s 
   ✔ 2d9e29180a27 Pull complete                                                                                                                                         3.8s 
   ✔ c6bcc2c9a041 Pull complete                                                                                                                                         3.8s 
   ✔ ac4b721eb66f Pull complete                                                                                                                                         7.5s 
   ✔ 606bd164980e Pull complete                                                                                                                                         7.5s 
   ✔ f5dfd246bc6e Pull complete                                                                                                                                        12.3s 
   ✔ ba7036bb0a60 Pull complete                                                                                                                                        12.3s 
   ✔ 799f859abbbd Pull complete                                                                                                                                        12.3s 
   ✔ d903e777080c Pull complete                                                                                                                                        12.3s 
   ✔ 04adcb462801 Pull complete                                                                                                                                        12.4s 
   ✔ 5c10925b29ff Pull complete                                                                                                                                        12.4s 
[+] Building 913.2s (18/18) FINISHED                                                                                                                                         
 => [internal] load local bake definitions                                                                                                                              0.0s
 => => reading from stdin 553B                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile.dev.aio                                                                                                            0.0s
 => => transferring dockerfile: 1.55kB                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:24-alpine                                                                                                       1.8s
 => [internal] load .dockerignore                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                         0.0s
 => [internal] load build context                                                                                                                                       3.5s
 => => transferring context: 463.12MB                                                                                                                                   3.4s
 => [builder 1/7] FROM docker.io/library/node:24-alpine@sha256:be4d5e92ac68483ec71440bf5934865b4b7fcb93588f17a24d411d15f0204e4f                                         4.7s
 => => resolve docker.io/library/node:24-alpine@sha256:be4d5e92ac68483ec71440bf5934865b4b7fcb93588f17a24d411d15f0204e4f                                                 0.0s
 => => sha256:5d6348389bac182393e2ebaf08e434eb805bee6de0aba983ff53535cbc62c94d 1.72kB / 1.72kB                                                                          0.0s
 => => sha256:50d0ce700b7cef5e023782dad867514c466faa1ce8254547fece8176aac373a0 6.42kB / 6.42kB                                                                          0.0s
 => => sha256:9824c27679d3b27c5e1cb00a73adb6f4f8d556994111c12db3c5d61a0c843df8 3.80MB / 3.80MB                                                                          0.5s
 => => sha256:2ce2972f24b7766be7783feaecf35ac2582db895c93c65c67f4bdb6f0dc9f6ad 53.50MB / 53.50MB                                                                        1.8s
 => => sha256:cd0833b131d9abd4601afe7497a8aa3972300101134d7685e5830667d98e71eb 1.26MB / 1.26MB                                                                          0.7s
 => => sha256:be4d5e92ac68483ec71440bf5934865b4b7fcb93588f17a24d411d15f0204e4f 3.87kB / 3.87kB                                                                          0.0s
 => => extracting sha256:9824c27679d3b27c5e1cb00a73adb6f4f8d556994111c12db3c5d61a0c843df8                                                                               0.2s
 => => sha256:b11b59e090e4228c6d071675c9e58fd652ef13742a294321f129f387a183126c 444B / 444B                                                                              0.9s
 => => extracting sha256:2ce2972f24b7766be7783feaecf35ac2582db895c93c65c67f4bdb6f0dc9f6ad                                                                               2.7s
 => => extracting sha256:cd0833b131d9abd4601afe7497a8aa3972300101134d7685e5830667d98e71eb                                                                               0.1s
 => => extracting sha256:b11b59e090e4228c6d071675c9e58fd652ef13742a294321f129f387a183126c                                                                               0.0s
 => [stage-1 2/5] RUN addgroup -S plasmic &&     adduser -S plasmic -G plasmic &&     apk add --no-cache git jq bash &&     echo "fs.inotify.max_user_watches=524288"   3.4s
 => [builder 2/7] WORKDIR /plasmic                                                                                                                                      1.2s
 => [builder 3/7] RUN apk add --no-cache     bash     git     curl     wget     python3     py3-pip     postgresql-client     build-base                                6.6s
 => [stage-1 3/5] WORKDIR /plasmic/platform/wab                                                                                                                         0.0s
 => [builder 4/7] COPY package.json yarn.lock ./                                                                                                                        0.0s 
 => [builder 5/7] RUN yarn install --frozen-lockfile --prefer-offline                                                                                                  39.8s 
 => [builder 6/7] COPY . .                                                                                                                                              1.6s 
 => [builder 7/7] RUN mkdir -p /tmp/.plasmic &&     cp platform/wab/tools/docker-dev/secrets.json /tmp/.plasmic/secrets.json &&     yarn setup &&     yarn setup:can  431.2s 
 => [stage-1 4/5] COPY --chown=plasmic:plasmic --from=builder /plasmic /plasmic                                                                                       143.6s 
 => [stage-1 5/5] COPY --chown=plasmic:plasmic --from=builder /tmp/.plasmic /home/plasmic/.plasmic                                                                      0.3s 
 => exporting to image                                                                                                                                                167.2s 
 => => exporting layers                                                                                                                                               167.1s 
 => => writing image sha256:cb0d47b4251b885a26c55e703cd8e12eba3b1fd611e8a6cd8f27d56d454747d7                                                                            0.0s 
 => => naming to docker.io/library/plasmic-plasmic-wab                                                                                                                  0.0s 
 => resolving provenance for metadata file                                                                                                                              0.0s 
[+] Running 19/19
 ✔ plasmic-plasmic-wab                                        Built                                                                                                     0.0s 
 ✔ Network plasmic_default                                    Created                                                                                                   0.1s 
 ✔ Volume "plasmic_plasmic_loader_html_hydrate_node_modules"  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_react_web_bundle_node_modules"     Created                                                                                                   0.0s 
 ✔ Volume "plasmic_postgres_data"                             Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_live_frame_node_modules"           Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_canvas_node_modules"               Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_wab_shared_model"                  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_sub_node_modules"                  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_playwright_cache"                  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_generated_styles"                  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_loader_bundle_env_node_modules"    Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_wab_node_modules"                  Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_public"                            Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_wab_client"                        Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_wab_gen"                           Created                                                                                                   0.0s 
 ✔ Volume "plasmic_plasmic_node_modules"                      Created                                                                                                   0.0s 
 ✔ Container plasmic-plasmic-db-1                             Created                                                                                                   0.4s 
 ✔ Container plasmic-plasmic-wab-1                            Created                                                                                                 113.1s 
Attaching to plasmic-db-1, plasmic-wab-1
plasmic-db-1  | The files belonging to this database system will be owned by user "postgres".
plasmic-db-1  | This user must also own the server process.
plasmic-db-1  | 
plasmic-db-1  | The database cluster will be initialized with locale "en_US.utf8".
plasmic-db-1  | The default database encoding has accordingly been set to "UTF8".
plasmic-db-1  | The default text search configuration will be set to "english".
plasmic-db-1  | 
plasmic-db-1  | Data page checksums are disabled.
plasmic-db-1  | 
plasmic-db-1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
plasmic-db-1  | creating subdirectories ... ok
plasmic-db-1  | selecting dynamic shared memory implementation ... posix
plasmic-db-1  | selecting default max_connections ... 100
plasmic-db-1  | selecting default shared_buffers ... 128MB
plasmic-db-1  | selecting default time zone ... Etc/UTC
plasmic-db-1  | creating configuration files ... ok
plasmic-db-1  | running bootstrap script ... ok
plasmic-db-1  | performing post-bootstrap initialization ... ok
plasmic-db-1  | initdb: warning: enabling "trust" authentication for local connections
plasmic-db-1  | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
plasmic-db-1  | syncing data to disk ... ok
plasmic-db-1  | 
plasmic-db-1  | 
plasmic-db-1  | Success. You can now start the database server using:
plasmic-db-1  | 
plasmic-db-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
plasmic-db-1  | 
plasmic-db-1  | waiting for server to start....2025-09-04 11:36:31.124 UTC [48] LOG:  starting PostgreSQL 15.14 (Debian 15.14-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
plasmic-db-1  | 2025-09-04 11:36:31.136 UTC [48] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
plasmic-db-1  | 2025-09-04 11:36:31.173 UTC [51] LOG:  database system was shut down at 2025-09-04 11:36:30 UTC
plasmic-db-1  | 2025-09-04 11:36:31.188 UTC [48] LOG:  database system is ready to accept connections
plasmic-db-1  |  done
plasmic-db-1  | server started
plasmic-db-1  | 
plasmic-db-1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/db-setup.sh
plasmic-db-1  | CREATE ROLE
plasmic-db-1  | CREATE ROLE
plasmic-db-1  | CREATE ROLE
plasmic-db-1  | CREATE ROLE
plasmic-db-1  | CREATE DATABASE
plasmic-db-1  | CREATE EXTENSION
plasmic-db-1  | 
plasmic-db-1  | 2025-09-04 11:36:31.761 UTC [48] LOG:  received fast shutdown request
plasmic-db-1  | waiting for server to shut down....2025-09-04 11:36:31.802 UTC [48] LOG:  aborting any active transactions
plasmic-db-1  | 2025-09-04 11:36:31.804 UTC [48] LOG:  background worker "logical replication launcher" (PID 54) exited with exit code 1
plasmic-db-1  | 2025-09-04 11:36:31.805 UTC [49] LOG:  shutting down
plasmic-db-1  | 2025-09-04 11:36:31.817 UTC [49] LOG:  checkpoint starting: shutdown immediate
plasmic-db-1  | 2025-09-04 11:36:32.035 UTC [49] LOG:  checkpoint complete: wrote 957 buffers (5.8%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.052 s, sync=0.105 s, total=0.230 s; sync files=329, longest=0.031 s, average=0.001 s; distance=4336 kB, estimate=4336 kB
plasmic-db-1  | 2025-09-04 11:36:32.041 UTC [48] LOG:  database system is shut down
plasmic-db-1  |  done
plasmic-db-1  | server stopped
plasmic-db-1  | 
plasmic-db-1  | PostgreSQL init process complete; ready for start up.
plasmic-db-1  | 
plasmic-db-1  | 2025-09-04 11:36:32.106 UTC [1] LOG:  starting PostgreSQL 15.14 (Debian 15.14-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
plasmic-db-1  | 2025-09-04 11:36:32.107 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
plasmic-db-1  | 2025-09-04 11:36:32.107 UTC [1] LOG:  listening on IPv6 address "::", port 5432
plasmic-db-1  | 2025-09-04 11:36:32.131 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
plasmic-db-1  | 2025-09-04 11:36:32.158 UTC [77] LOG:  database system was shut down at 2025-09-04 11:36:32 UTC
plasmic-db-1  | 2025-09-04 11:36:32.173 UTC [1] LOG:  database system is ready to accept connections
plasmic-wab-1  | sh: can't create tmp.json: Permission denied
plasmic-wab-1 exited with code 1

I also found ./platform/wab/tools/docker-dev/Dockerfile.dev.aio includes tmp.json creation, maybe the problem could be there or on docker-compose.yml file. No other files are mentioning tmp.json (I searched by grep).

plasmic:~/plasmic$ cat ./platform/wab/tools/docker-dev/Dockerfile.dev.aio 
# --- Build stage ---
FROM node:24-alpine AS builder

WORKDIR /plasmic

# Install system deps
RUN apk add --no-cache \
    bash \
    git \
    curl \
    wget \
    python3 \
    py3-pip \
    postgresql-client \
    build-base

# Copy only dependency files first for caching
COPY package.json yarn.lock ./

# Install deps early for cache
RUN yarn install --frozen-lockfile --prefer-offline

# Then copy rest of the app
COPY . .

# Secrets setup and build tools
RUN mkdir -p /tmp/.plasmic && \
    cp platform/wab/tools/docker-dev/secrets.json /tmp/.plasmic/secrets.json && \
    yarn setup && \
    yarn setup:canvas-packages && \
    yarn cache clean

# --- Final stage ---
FROM node:24-alpine

# Create non-root user and prepare env
RUN addgroup -S plasmic && \
    adduser -S plasmic -G plasmic && \
    apk add --no-cache git jq bash && \
    echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf && \
    sysctl -p && \
    mkdir -p $HOME && \
    chown -R plasmic:plasmic $HOME

USER plasmic

WORKDIR /plasmic/platform/wab

# Copy built app and secrets with correct ownership
COPY --chown=plasmic:plasmic --from=builder /plasmic /plasmic
COPY --chown=plasmic:plasmic --from=builder /tmp/.plasmic /home/plasmic/.plasmic

EXPOSE 3003 3004 3005

ENTRYPOINT ["sh", "-c"]
CMD [" jq '(.host = \"plasmic-db\") | (.password //= \"SEKRET\")' ormconfig.json > tmp.json && mv tmp.json ormconfig.json && \
    yarn typeorm migration:run && \
    yarn seed && \
    cd /plasmic && \
    yarn dev \

Maybe the problem is connected with node_modules folder which I have root:webuser

I am currently trying to rebuild it after changing the folder rights:

doas chown -R webuser:webuser platform/wab/node_modules
doas chown -R webuser:webuser node_modules

Since I use Alpine Linux, my node installed trough doas apk add node which installs node as root user for the whole system, but not for a current user. It could be the problem, so when it created node_modules folder, it sets root as an owner.

I also mentioned that I added yarn for system-wide by root user using doas:
doas corepack enable yarn

Since chown webuser:webuser is not working, I will remove yarn and node at all by:
doas corepack disable yarn && doas apk del npm

After that I will use a user-wide installation for node and yarn:

1 Like

@david_d might be the case, yes
This issue seems to be linux-specific
What are the permissions on the following:

  1. platform/wab/tools/docker-dev/secrets.json
  2. the folder that contains the ormconfig.json
  3. the folder that gets created in /tmp (/tmp/.plasmic) within the container

You can also try prepending the shell script commands with echo’s, to identify which one triggers before the error

@alex_noel @bharath_bhat

The main problem I have with tmp.json and ormconfig.json, with their rights.

I tried already a lot of different approaches, the main issue here is hidden on this line on the command section:
jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > tmp.json && mv tmp.json ormconfig.json && \

When I run it I get the following error: sh: can’t create tmp.json: Permission denied

So, I fixed it with changing the tmp.json path:

But it still no shows error, same with mv, mv -f, cp, cp -f:
jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > /tmp/tmp.json && mv -f /tmp/tmp.json ormconfig.json && \

jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > /tmp/tmp.json && cp /tmp/tmp.json ormconfig.json && \

I get the following error connected with ormconfig.json:

plasmic-wab-1  | + jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json
plasmic-wab-1  | + cp /tmp/tmp.json ormconfig.json
plasmic-wab-1  | cp: can't create 'ormconfig.json': File exists
plasmic-wab-1 exited with code 1

When I use a direct file creation another command:

jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > /tmp/tmp.json && \
mv /tmp/tmp.json ormconfig.json && \

Same for this

jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > /tmp/tmp.json && cp -f /tmp/tmp.json ormconfig.json && \

plasmic-wab-1  | + jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json
plasmic-wab-1  | + cp -f /tmp/tmp.json ormconfig.json
plasmic-wab-1  | cp: can't create 'ormconfig.json': File exists
plasmic-wab-1 exited with code 1

So, I really don’t know what to do with this ormconfig.json file.

This is how I debug it, but jq line command should be diffrent:

command:
    - |
      set -x
      jq '(.host = "plasmic-db") | (.password //= "SEKRET")' ormconfig.json > /tmp/tmp.json && cp -f /tmp/tmp.json ormconfig.json && \
      yarn typeorm migration:run --verbose && \
      yarn seed --verbose && \
      cd /plasmic && \
      yarn dev --verbose

Maybe you have any ideas, my host system is Alpine Linux.
I tried to install node gobally and locally, nothing helps.
I deployed already successfully with bare yarn, but never with docker compose.

Thank you.

@alex_noel Okay, now I know the solution.

Since on the last update changed node:18-alpine to node:24-alpine image.
There is a small difference inside containers.

Inside node:24-alpine container there is node user and node group already created. Which means they already have UID and GID 1000, like 1000:1000.

Here when Dockerfile creates a new user plasmic, it creates it with UID and GID 1001, like 1001:1001.

Since, the basice non-root user on the host has UID and GID 1000, plasmic user in the container never inherits all permissions form the main host user with UID 1000.

Just need to replace existing code considering node user deletion and setting 1000 UID and GID for our new plasmic user.

Instead of this one:

Need to put this one:

# Delete container default node user
RUN deluser --remove-home node 2>/dev/null || true && \
    delgroup node 2>/dev/null || true

# Create non-root user with UID 1000 and GID 1000 and prepare env
RUN addgroup -g 1000 plasmic && \
    adduser -u 1000 -G plasmic -S plasmic && \
    apk add --no-cache git jq bash && \
    echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf && \
    sysctl -p && \
    mkdir -p /home/plasmic && \
    chown -R 1000:1000 /home/plasmic

After all this it works properly :slight_smile:

I am currently trying to create the app from scratch by using the command you provided:

plasmic auth --host http://192.168.0.198:3003

If your browser doesn't automatically open, enter the following URL:
http://192.168.0.198:3003/auth/plasmic-init/d01869b2-aa7d-4846-adb5-13ac7ebae0d0

Please log in and authorize Plasmic CLI.
Waiting for token...

But when I log in from my browser, it never continues.

After some time I provide it manually and it succeeds:

Successfully created Plasmic credentials file at /home/webuser/.plasmic.auth
plasmic:~$

Than I use command you provided npx create-plasmic-app

plasmic:~$ npx create-plasmic-app
? What is your project named? my-app
? What React framework do you want to use? Next.js
? What language do you want to use? TypeScript
? Which scheme do you want to use to integrate Plasmic? PlasmicLoader

? If you don't have a project yet, create one by going to https://studio.plasmic.app/starters/blank
What is the URL of your project?

I got this error:

==================================================
AUTHENTICATING WITH PLASMIC
==================================================
Plasmic credentials are ok.

==================================================
CREATING THE PROJECT
==================================================
npx create-next-app@14 /home/webuser/my-app --ts --no-app  --eslint --no-src-dir  --import-alias "@/*" --no-tailwind
(node:457760) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Need to install the following packages:
create-next-app@14.2.32
Ok to proceed? (y) 

Creating a new Next.js app in /home/webuser/my-app.

Using npm.

Initializing project with template: default 


Installing dependencies:
- react
- react-dom
- next

Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- eslint
- eslint-config-next

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 366 packages, and audited 367 packages in 21s

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

found 0 vulnerabilities
Success! Created my-app at /home/webuser/my-app

A new version of `create-next-app` is available!
You can update by running: npm i -g create-next-app


Aborting installation.

==================================================
create-plasmic-app failed!
==================================================
Unexpected error: 
HandledError: Project with ID projects not found
    at PlasmicApi.<anonymous> (/home/webuser/.npm/_npx/69a84a1d81a98ae0/node_modules/@plasmicapp/cli/dist/api.js:179:23)
    at Generator.throw (<anonymous>)
    at rejected (/home/webuser/.npm/_npx/69a84a1d81a98ae0/node_modules/@plasmicapp/cli/dist/api.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Please remove /home/webuser/my-app and try again.

If I use yarn create plasmic-app I have another problem:



Let's get started! Here's what we'll do: 
1. Authenticate with Plasmic
2. Create a React/Next/Gatsby repo
3. Integrate with Plasmic

==================================================
AUTHENTICATING WITH PLASMIC
==================================================
Plasmic credentials are ok.

==================================================
CREATING THE PROJECT
==================================================
npx create-next-app@14 /home/webuser/my-app --ts --no-app  --eslint --no-src-dir  --import-alias "@/*" --no-tailwind
(node:458699) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm warn Unknown env config "version-commit-hooks". This will stop working in the next major version of npm.
npm warn Unknown env config "version-tag-prefix". This will stop working in the next major version of npm.
npm warn Unknown env config "version-git-message". This will stop working in the next major version of npm.
npm warn Unknown env config "argv". This will stop working in the next major version of npm.
npm warn Unknown env config "version-git-tag". This will stop working in the next major version of npm.
Need to install the following packages:
create-next-app@14.2.32
Ok to proceed? (y) 

Creating a new Next.js app in /home/webuser/my-app.

Using yarn.

Initializing project with template: default 


Installing dependencies:
- react
- react-dom
- next

Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- eslint
- eslint-config-next

yarn install v1.22.22
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:458831) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
warning eslint > @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
warning eslint > @humanwhocodes/config-array > @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
warning eslint > file-entry-cache > flat-cache > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 9.16s.
Success! Created my-app at /home/webuser/my-app

A new version of `create-next-app` is available!
You can update by running: yarn global add create-next-app


Aborting installation.

==================================================
create-plasmic-app failed!
==================================================
Unexpected error: 
HandledError: Project with ID projects not found
    at PlasmicApi.<anonymous> (/home/webuser/.config/yarn/global/node_modules/create-plasmic-app/node_modules/@plasmicapp/cli/dist/api.js:179:23)
    at Generator.throw (<anonymous>)
    at rejected (/home/webuser/.config/yarn/global/node_modules/create-plasmic-app/node_modules/@plasmicapp/cli/dist/api.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Please remove /home/webuser/my-app and try again.
error Command failed.
Exit code: 1
Command: /home/webuser/.yarn/bin/create-plasmic-app
Arguments: 
Directory: /home/webuser
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

I will try to fix it by installing node once again form my user, not globally, maybe this will help.

This is the error I get:


1 of 1 error
Next.js (14.2.32) is outdated (learn more)
Server Error
Error: Error parsing JSON response: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON; status: 200; response: <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="robots" content="noindex" />
    <script>
      const maybeParams = !!window.__PlasmicStudioArgs
        ? new URLSearchParams(window.__PlasmicStudioArgs.replace(/^#/, "?"))
        : undefined;
      const origin = maybeParams
        ? maybeParams.get("origin")
        : window.location.origin;
    </script>
    <script>
      if (typeof window !== "undefined") {
        if (window.parent !== window) {
          try {
            window.__REACT_DEVTOOLS_GLOBAL_HOOK__ =
              window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
          } catch (err) {}
        }
        if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
          const renderers = new Map();
          window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
            supportsFiber: true,
            renderers,
            inject: (renderer) => {
              renderers.set(renderers.size + 1, renderer);
            },
            onCommitFiberRoot: function () {},
            onCommitFiberUnmount: function () {},
          };
        }
        if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__.__PlasmicPreambleVersion) {
          window.__REACT_DEVTOOLS_GLOBAL_HOOK__.__PlasmicPreambleVersion = "1";
        }
      }
    </script>
    <script>
      const isProd =
        "isProd" in window
          ? window.isProd
          : window.origin === "https://studio.plasmic.app" ||
            window.origin === "https://plasmic.dev" ||
            window.origin === "https://host.plasmic.dev" ||
            window.origin === "https://staging.plasmic.app";
      window.isProd = isProd;
    </script>

    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no"
    />
    <meta name="theme-color" content="#000000" />
    <style>
      @font-face {
        font-family: plasmicTestFont;
        src: url(data:application/x-font-otf;base64,AAEAAAAOAIAAAwBgRFNJRwAAAAEAABOkAAAACE9TLzJY0VJbAAABaAAAAGBjbWFwf4zoRAAAAtAAAAGSY3Z0IAAhAnkAAARsAAAABGdhc3AAAAAQAAATnAAAAAhnbHlmOxSp9AAABPgAAAt4aGVhZBRbFBsAAADsAAAANmhoZWEEHwE9AAABJAAAACRobXR4K7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      }
      .fontTester {
        font-family: plasmicTestFont;
        display: block;
        position: absolute;
        left: 0px;
        top: -1000px;
      }

      .StudioPlaceholder {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        grid-template:
          "topBar topBar topBar topBar" 47px
          "leftToolbar leftPanel canvasArea rightPanel" auto / 56px 302px auto 303px;
        grid-gap: 1px;
        background: #ddd;
        transition: all 250ms;
        pointer-events: none;
      }

      .StudioPlaceholder.fadeOut {
        opacity: 0;
        visibility: hidden;
      }

      .StudioPlaceholder.visible {
        display: grid;
      }

      .StudioPlaceholder > * {
        background: white;
      }

      .placeholder_topBar {
        grid-area: topBar;
        padding-left: 10px;
        display: flex;
        align-items: center;
      }
      .placeholder_icon {
        width: 40px;
        height: 40px;
        color: #c8c7c1; /* sand8 color */
      }
      .placeholder_leftToolbar {
        grid-area: leftToolbar;
      }
      .placeholder_leftPanel {
        grid-area: leftPanel;
      }
      .placeholder_canvasArea {
        grid-area: canvasArea;
        background: #f9f9f8;
      }
      .placeholder_rightPanel {
        grid-area: rightPanel;
      }

      @keyframes growUntilFull {
        0% {
          transform: translateX(-100%);
        }
        75% {
          transform: translateX(0);
        }
        100% {
          transform: translateX(100%);
        }
      }

      @keyframes rotateColors {
        100% {
          background: hsl(0, 80%, 70%);
        }
        80% {
          background: hsl(51, 80%, 70%);
        }
        60% {
          background: hsl(102, 80%, 70%);
        }
        40% {
          background: hsl(153, 80%, 70%);
        }
        20% {
          background: hsl(204, 80%, 70%);
        }
        0% {
          background: hsl(255, 80%, 70%);
        }
      }

      .placeholder_loading {
        position: fixed;
        top: 47px;
        left: 0;
        right: 0;
        height: 3px;
        animation: growUntilFull 10s infinite, rotateColors 10s infinite;
        animation-timing-function: ease-in-out;
      }

      .placeholder_loading.placeholder_loading--fast {
        animation-duration: 3s;
      }
    </style>
    <link id="shortcutIcon" rel="shortcut icon" />
    <link
      href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Inter:wght@300;400;500;600;700;900&display=swap"
      rel="stylesheet"
      crossorigin="anonymous"
    />
    <link id="normalizeCss" rel="stylesheet" type="text/css" crossorigin="anonymous" />
    <!-- Inject URLs based on origin -->
    <script>
      document.getElementById("shortcutIcon").href = `${origin}/favicon.ico`;
      document.getElementById(
        "normalizeCss"
      ).href = `${origin}/static/css/normalize.css`;
    </script>

    <title>Plasmic</title>
    <!-- For style tokens and mixins -->
    <style id="globalCssVars"></style>

    <!-- For monaco editor
      see: "Using with webpack" https://github.com/superRaytin/react-monaco-editor
    -->
    <base href="/" />
  <script defer src="/static/js/lib-react.js"></script><script defer src="/static/js/lib-router.js"></script><script defer src="/static/js/vendors-node_modules_path_path_js-node_modules_plasmicapp_loader-react_dist_index_esm_js-node-f4420e.js"></script><script defer src="/static/js/index.js"></script><link href="/static/css/vendors-node_modules_path_path_js-node_modules_plasmicapp_loader-react_dist_index_esm_js-node-f4420e.css" rel="stylesheet"><link href="/static/css/index.css" rel="stylesheet"></head>
  <body>
    <noscript> You need to enable JavaScript to run this app. </noscript>
    <div id="root"></div>
    <div class="app-container"></div>
    <!-- This is to style the downshift-managed Ant dropdown specially. -->
    <div class="xselect"></div>
    <!-- This is used to test if a font is available or not -->
    <div class="fontTester" style="display: none">Plasmic</div>
    <!-- This is used to upload the file for "import project" menu -->
    <input
      class="hidden-file-selector"
      style="display: none"
      type="file"
      accept=".json,.txt"
    />
    <a class="hidden-file-download" href="" style="display: none"
      >hidden link</a
    >
    <div class="StudioPlaceholder">
      <div class="placeholder_topBar">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          class="placeholder_icon"
          fill="none"
          viewBox="0 0 32 32"
          role="img"
        >
          <path
            d="M3.2 22C3.2 14.93 8.93 9.2 16 9.2S28.8 14.93 28.8 22H32c0-8.837-7.163-16-16-16S0 13.163 0 22h3.2z"
            fill="currentColor"
          ></path>

          <path
            d="M24 22a8 8 0 10-16 0H4.8c0-6.185 5.015-11.2 11.2-11.2S27.2 15.815 27.2 22H24z"
            fill="currentColor"
          ></path>

          <path
            d="M12.8 22a3.2 3.2 0 016.4 0h3.2a6.4 6.4 0 10-12.8 0h3.2z"
            fill="currentColor"
          ></path>
        </svg>
      </div>
      <div class="placeholder_leftToolbar"></div>
      <div class="placeholder_leftPanel"></div>
      <div class="placeholder_canvasArea"></div>
      <div class="placeholder_rightPanel"></div>
      <div class="placeholder_loading"></div>
    </div>
    <script>
      function maybeShowStudioPlaceholder() {
        if (/^\/projects\/[a-z0-9]+/.test(window.location.pathname)) {
          document.querySelector(".StudioPlaceholder").classList.add("visible");
        }
      }

      maybeShowStudioPlaceholder();
    </script>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Api.<anonymous>
file:///home/webuser/my-app/node_modules/@plasmicapp/loader-fetcher/dist/index.js (172:15)
Generator.next
<anonymous>
fulfilled
file:///home/webuser/my-app/node_modules/@plasmicapp/loader-fetcher/dist/index.js (50:24)

@alex_noel @bharath_bhat @jason @sarah_ahmed @muhammad_asim

I do have a same error using this example from plasmic repo but trying to provide my working self-hosted domain as a backend server for plasmic plasmic.my.domain insead of studio.plasmic.app:

What am I doing wrong?

This is how my plasmic-init.ts looks like:

import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
import * as NextNavigation from "next/navigation";

export const PLASMIC = initPlasmicLoader({
  host: 'https://plasmic.my.domain/',
  projects: [
    {
      id: "***",
      token:
        "***",
    },
  ],
  preview: true,
});

Here is the error once again:


1 of 1 error
Next.js (14.2.16) is outdated (learn more)

Unhandled Runtime Error
Error: Error parsing JSON response: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON; status: 200; response: <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="robots" content="noindex" />
    <script>
      const maybeParams = !!window.__PlasmicStudioArgs
        ? new URLSearchParams(window.__PlasmicStudioArgs.replace(/^#/, "?"))
        : undefined;
      const origin = maybeParams
        ? maybeParams.get("origin")
        : window.location.origin;
    </script>
    <script>
      if (typeof window !== "undefined") {
        if (window.parent !== window) {
          try {
            window.__REACT_DEVTOOLS_GLOBAL_HOOK__ =
              window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
          } catch (err) {}
        }
        if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
          const renderers = new Map();
          window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
            supportsFiber: true,
            renderers,
            inject: (renderer) => {
              renderers.set(renderers.size + 1, renderer);
            },
            onCommitFiberRoot: function () {},
            onCommitFiberUnmount: function () {},
          };
        }
        if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__.__PlasmicPreambleVersion) {
          window.__REACT_DEVTOOLS_GLOBAL_HOOK__.__PlasmicPreambleVersion = "1";
        }
      }
    </script>
    <script>
      const isProd =
        "isProd" in window
          ? window.isProd
          : window.origin === "https://studio.plasmic.app" ||
            window.origin === "https://plasmic.dev" ||
            window.origin === "https://host.plasmic.dev" ||
            window.origin === "https://staging.plasmic.app";
      window.isProd = isProd;
    </script>

    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no"
    />
    <meta name="theme-color" content="#000000" />
    <style>
      @font-face {
        font-family: plasmicTestFont;
        src: url(data:application/x-font-otf;base64,AAEAAAAOAIAAAwBgRFNJRwAAAAEAABOkAAAACE9TLzJY0VJbAAABaAAAAGBjbWFwf4zoRAAAAtAAAAGSY3Z0IAAhAnkAAARsAAAABGdhc3AAAAAQAAATnAAAAAhnbHlmOxSp9AAABPgAAAt4aGVhZBRbFBsAAADsAAAANmhoZWEEHwE9AAABJAAAACRobXR4K7cL0wAAAcgAAAEIbG9jYV0AWjQAAARwAAAAhm1heHAAhgA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AAAwAuABIAAQAAAAAABAATAEAAAQAAAAAABQAPAFMAAQAAAAAABgATAGIAAQAAAAAACgAcAHUAAwABBAkAAQAWAJEAAwABBAkAAgAOAKcAAwABBAkAAwBcALUAAwABBAkABAAmAREAAwABBAkABQAeATcAAwABBAkABgAmAVUAAwABBAkACgA4AXsAAwABBAkAEAAWAJEAAwABBAkAEQAOAKdNaW5pbWFsZm9udFJlZ3VsYXJDYWxsaWdyYXBociA6IE1pbmltYWxmb250IFJlZ3VsYXIgOiAxOC0xMS0yMDE5TWluaW1hbGZvbnQgUmVndWxhclZlcnNpb24gMDAxLjAwMU1pbmltYWxmb250LVJlZ3VsYXJDcmVhdGVkIHdpdGggQ2FsbGlncmFwaHIuY29tAE0AaQBuAGkAbQBhAGwAZgBvAG4AdABSAGUAZwB1AGwAYQByAEMAYQBsAGwAaQBnAHIAYQBwAGgAcgAgADoAIABNAGkAbgBpAG0AYQBsAGYAbwBuAHQAIABSAGUAZwB1AGwAYQByACAAOgAgADEAOAAtADEAMQAtADIAMAAxADkATQBpAG4AaQBtAGEAbABmAG8AbgB0ACAAUgBlAGcAdQBsAGEAcgBWAGUAcgBzAGkAbwBuACAAMAAwADEALgAwADAAMQBNAGkAbgBpAG0AYQBsAGYAbwBuAHQALQBSAGUAZwB1AGwAYQByAEMAcgBlAGEAdABlAGQAIAB3AGkAdABoACAAQwBhAGwAbABpAGcAcgBhAHAAaAByAC4AYwBvAG0AAAAAAgAAAAAAAP+DADIAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAAAQACAQIAAwAEAAUACgAPABEAHQAeACIAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQEDAkNSBG5ic3AAAAABAAH//wAPAAAAAQAAAAA=);
      }
      .fontTester {
        font-family: plasmicTestFont;
        display: block;
        position: absolute;
        left: 0px;
        top: -1000px;
      }

      .StudioPlaceholder {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        grid-template:
          "topBar topBar topBar topBar" 47px
          "leftToolbar leftPanel canvasArea rightPanel" auto / 56px 302px auto 303px;
        grid-gap: 1px;
        background: #ddd;
        transition: all 250ms;
        pointer-events: none;
      }

      .StudioPlaceholder.fadeOut {
        opacity: 0;
        visibility: hidden;
      }

      .StudioPlaceholder.visible {
        display: grid;
      }

      .StudioPlaceholder > * {
        background: white;
      }

      .placeholder_topBar {
        grid-area: topBar;
        padding-left: 10px;
        display: flex;
        align-items: center;
      }
      .placeholder_icon {
        width: 40px;
        height: 40px;
        color: #c8c7c1; /* sand8 color */
      }
      .placeholder_leftToolbar {
        grid-area: leftToolbar;
      }
      .placeholder_leftPanel {
        grid-area: leftPanel;
      }
      .placeholder_canvasArea {
        grid-area: canvasArea;
        background: #f9f9f8;
      }
      .placeholder_rightPanel {
        grid-area: rightPanel;
      }

      @keyframes growUntilFull {
        0% {
          transform: translateX(-100%);
        }
        75% {
          transform: translateX(0);
        }
        100% {
          transform: translateX(100%);
        }
      }

      @keyframes rotateColors {
        100% {
          background: hsl(0, 80%, 70%);
        }
        80% {
          background: hsl(51, 80%, 70%);
        }
        60% {
          background: hsl(102, 80%, 70%);
        }
        40% {
          background: hsl(153, 80%, 70%);
        }
        20% {
          background: hsl(204, 80%, 70%);
        }
        0% {
          background: hsl(255, 80%, 70%);
        }
      }

      .placeholder_loading {
        position: fixed;
        top: 47px;
        left: 0;
        right: 0;
        height: 3px;
        animation: growUntilFull 10s infinite, rotateColors 10s infinite;
        animation-timing-function: ease-in-out;
      }

      .placeholder_loading.placeholder_loading--fast {
        animation-duration: 3s;
      }
    </style>
    <link id="shortcutIcon" rel="shortcut icon" />
    <link
      href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Inter:wght@300;400;500;600;700;900&display=swap"
      rel="stylesheet"
      crossorigin="anonymous"
    />
    <link id="normalizeCss" rel="stylesheet" type="text/css" crossorigin="anonymous" />
    <!-- Inject URLs based on origin -->
    <script>
      document.getElementById("shortcutIcon").href = `${origin}/favicon.ico`;
      document.getElementById(
        "normalizeCss"
      ).href = `${origin}/static/css/normalize.css`;
    </script>

    <title>Plasmic</title>
    <!-- For style tokens and mixins -->
    <style id="globalCssVars"></style>

    <!-- For monaco editor
      see: "Using with webpack" https://github.com/superRaytin/react-monaco-editor
    -->
    <base href="/" />
  <script defer src="/static/js/lib-react.js"></script><script defer src="/static/js/lib-router.js"></script><script defer src="/static/js/vendors-node_modules_path_path_js-node_modules_plasmicapp_loader-react_dist_index_esm_js-node-f4420e.js"></script><script defer src="/static/js/index.js"></script><link href="/static/css/vendors-node_modules_path_path_js-node_modules_plasmicapp_loader-react_dist_index_esm_js-node-f4420e.css" rel="stylesheet"><link href="/static/css/index.css" rel="stylesheet"></head>
  <body>
    <noscript> You need to enable JavaScript to run this app. </noscript>
    <div id="root"></div>
    <div class="app-container"></div>
    <!-- This is to style the downshift-managed Ant dropdown specially. -->
    <div class="xselect"></div>
    <!-- This is used to test if a font is available or not -->
    <div class="fontTester" style="display: none">Plasmic</div>
    <!-- This is used to upload the file for "import project" menu -->
    <input
      class="hidden-file-selector"
      style="display: none"
      type="file"
      accept=".json,.txt"
    />
    <a class="hidden-file-download" href="" style="display: none"
      >hidden link</a
    >
    <div class="StudioPlaceholder">
      <div class="placeholder_topBar">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          class="placeholder_icon"
          fill="none"
          viewBox="0 0 32 32"
          role="img"
        >
          <path
            d="M3.2 22C3.2 14.93 8.93 9.2 16 9.2S28.8 14.93 28.8 22H32c0-8.837-7.163-16-16-16S0 13.163 0 22h3.2z"
            fill="currentColor"
          ></path>

          <path
            d="M24 22a8 8 0 10-16 0H4.8c0-6.185 5.015-11.2 11.2-11.2S27.2 15.815 27.2 22H24z"
            fill="currentColor"
          ></path>

          <path
            d="M12.8 22a3.2 3.2 0 016.4 0h3.2a6.4 6.4 0 10-12.8 0h3.2z"
            fill="currentColor"
          ></path>
        </svg>
      </div>
      <div class="placeholder_leftToolbar"></div>
      <div class="placeholder_leftPanel"></div>
      <div class="placeholder_canvasArea"></div>
      <div class="placeholder_rightPanel"></div>
      <div class="placeholder_loading"></div>
    </div>
    <script>
      function maybeShowStudioPlaceholder() {
        if (/^\/projects\/[a-z0-9]+/.test(window.location.pathname)) {
          document.querySelector(".StudioPlaceholder").classList.add("visible");
        }
      }

      maybeShowStudioPlaceholder();
    </script>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

Call Stack
Api.eval
webpack-internal:/(rsc)/node_modules/@plasmicapp/loader-fetcher/dist/index.esm.js
Generator.next
<anonymous>
fulfilled
webpack-internal:/(rsc)/node_modules/@plasmicapp/loader-fetcher/dist/index.esm.js
digest: "2755903254"
 GET / 500 in 2288ms
2025-09-08T19:41:45.337Z: Encountered error No read access to projects *****

If I set host without slash on the end:
host: 'https://plasmic.my.domain'

I get the following error:



1 of 1 error
Next.js (14.2.16) is outdated (learn more)

Unhandled Runtime Error
Error: Error fetching loader data: Project ID and/or tokens are incorrect (and/or user has insufficient permissions)

Call Stack
Api.eval
node_modules/@plasmicapp/loader-fetcher/dist/index.esm.js (123:1)
Generator.next
<anonymous>
fulfilled
node_modules/@plasmicapp/loader-fetcher/dist/index.esm.js (24:1)
Plasmic: doing a fresh fetch...
 ⨯ Error: Error fetching loader data: Project ID and/or tokens are incorrect (and/or user has insufficient permissions)
    at Generator.next (<anonymous>)
digest: "665696821"
 ⨯ Error: Error fetching loader data: Project ID and/or tokens are incorrect (and/or user has insufficient permissions)
    at Generator.next (<anonymous>)
digest: "665696821"
 GET / 500 in 2551ms
2025-09-08T19:47:40.480Z: Encountered error No read access to projects ***

Please help me to connect my working plasmic backend with the fresh website setup.
I don’t really know how to provide a different hostname correctly instead of studio.plasmic.app, is it hardcoded or I do a wrong code change?