user-data-dir accessed via root url #2496
Replies: 2 comments
-
code-server will use the last non-flag argument as the default directory
to open, so something like this should work:
```
docker run code-server /doc
```
But code-server also should remember the last opened directory so if you
open it once with a query parameter you shouldn't need to do it again.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jsjoeio
-
See my containered version here, clone it, edit the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the linuxserver container version. I'm trying to grok how to set up the root url to point to the
--user-data-dir /doc
that was set. I've mapped that to a directory on my host. I've set up caddy2 as my reverse proxy and all is good if enter <my doman>/?folder=/docs that folder is loaded in the editor.Now I would like that to be my default so that entering just <my domain> will take me to that folder without needing the query string.
I've messed around with caddy2 but any rewrites I try the editor does not load at all. I suppose you can't help me with that but I was wondering if code-server itself has a way to set the default folder (or workspace) with flags. I did not see such when I ran the help. From the cli one can pass a [path] to open a particular folder but not seeing how to pass that when launching the container (really not a code-server issue but I'm asking anyway)
Beta Was this translation helpful? Give feedback.
All reactions