Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-Hosting: CHARM_HOST Env uses port 35353 instead of 443? #209

Closed
azoller1 opened this issue Mar 16, 2023 · 4 comments · Fixed by #221
Closed

Self-Hosting: CHARM_HOST Env uses port 35353 instead of 443? #209

azoller1 opened this issue Mar 16, 2023 · 4 comments · Fixed by #221
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@azoller1
Copy link

Hello, I have charm running in a docker container with charm.mydomain.net reverse proxied to the http port 35353 from the container with caddy.

Everything looks good with the container/host. Also have CHARM_SERVER_PUBLIC_URL=charm.mydomain.net set.

So, when using skate on a different host with CHARM_HOST=https://charm.mydomain.net, it seems to be using 35353 instead of 443, which I would assume it would use by default?

$ skate list
Error: authentication failed: dial tcp: address https://charm.mydomain.net:35353: too many colons in address

Is there possibly a PORT env I am missing? Also, I am assuming skate uses http and not ssh correct?

@bashbunni
Copy link
Member

Hey @azoller1 I think you're looking for the CHARM_SERVER_SSH_PORT. You can see all the env variables for Charm in this section of the readme. Skate uses SSH by default, not HTTP. The auth is done with SSH keys, so we generally use SSH > HTTP.

Hope that helps!!

@bashbunni bashbunni added the question Further information is requested label Apr 4, 2023
@bashbunni bashbunni self-assigned this Apr 4, 2023
@richard-kramer
Copy link

I don't think, that answers the question, does it?

The CHARM_SERVER_SSH_PORT variable ist a server setting, but the problem ist pointing the client to another port than 35353. For example, when running skate behind a reverse proxy, which accepts https connections on 443.

The mentioned setting simply tells the server (potentially inside the docker container) to listen on another port for ssh connections, which doesn't affect the client at all.

Can we please reopen this? Or are there some hidden settings, that already exist?

@bashbunni bashbunni reopened this Apr 5, 2023
@richard-kramer
Copy link

richard-kramer commented May 2, 2023

It seems like additionally setting CHARM_HTTP_PORT to 443 does the trick.

It now works for me behind a http reverse proxy which handles TLS and this in my .zshrcfile:

export CHARM_HOST="charm.my_domain.tld"
export CHARM_HTTP_PORT="443"

Unfortunately, this is not explained in the docs. I only found it by looking at the client sourcecode.

@bashbunni bashbunni added documentation Improvements or additions to documentation and removed question Further information is requested labels May 12, 2023
@bashbunni
Copy link
Member

Ah @richard-kramer gotcha, thank you for clarifying the issue! I assumed it was asking something different. I'll add a section to our docs to reflect the changes you can make on the client side to help in cases like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants