Code-server: Unable to use allow-http-, auth: none

Created on 18 Mar 2020  路  5Comments  路  Source: cdr/code-server

Although I found few references to using --allow-http, and --auth none in few issues, I still wasn't able to use them myself. My docker-compose file is:

version: '3.3'

services:
  code-server:
    image: code-server-hw
    volumes:
      - ./project:/home/coder/project
    ports:
      - "48080:8080"
    command:
      - "--allow-http"
      - "--auth none"

The results are:

code-server_1  | Option 'allow-http' is unknown. Ignoring.
code-server_1  | Option 'auth none' is unknown. Ignoring.
code-server_1  | Option 'allow-http' is unknown. Ignoring.
code-server_1  | Option 'auth none' is unknown. Ignoring.
code-server_1  | info  Server listening on http://0.0.0.0:8080
code-server_1  | info    - Password is 44a2da8ed099563b9d903813
code-server_1  | info      - To use your own password, set the PASSWORD environment variable
code-server_1  | info      - To disable use `--auth none`
code-server_1  | info    - Not serving HTTPS

version info:

Version: 1.41.1
Commit: f51e045cd5483561afc07694f39307fb673b6d1d
Date: 2020-01-17T22:58:55.612Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Edg/80.0.361.66
Code Server Version: 2.1698-vsc1.41.1

Most helpful comment

I see. I'll give this a shot with v3 and post what I find back here. However, I'm closing this as it's already answering all my concerns.

Thanks and keep up that good work. Also, stay safe 馃檶.

All 5 comments

cc: @code-asher. Do these flags still exist in v2? I know they were removed in v3.

allow-http was removed in v2. auth is still valid but it looks like
the entire option name is being interpreted as "auth none", probably
because of the quotes in the docker-compose file. I imagine removing the
quotes would fix it.

Very well, @kylecarbs, @code-asher. That makes sense now.

Although you answered the issue main question, I'm now finding even harder time to understand how to expose code-server via nginx reverse proxy running as subdirectory like:

https://my-domain.com/code-server-1
https://my-domain.com/code-server-2

To my understanding the option base-path isn't required anymore, and all issues regarding the same ended up resolving the issue by enabling allow-http, base-path options. Could you assist with what I'm missing? Should I rename and edit the issue itself to reflect the actual purpose of it, or open a new one?

The base path was removed in v3 so you'll need to use that. Based on your version output you're still on v2 which requires the base-path flag.

I see. I'll give this a shot with v3 and post what I find back here. However, I'm closing this as it's already answering all my concerns.

Thanks and keep up that good work. Also, stay safe 馃檶.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tecosaur picture tecosaur  路  3Comments

balazssoltesz picture balazssoltesz  路  3Comments

rcarmo picture rcarmo  路  3Comments

grant picture grant  路  3Comments

KSXGitHub picture KSXGitHub  路  3Comments