Skip to content

Commit

Permalink
docs: add client env vars to README (#221)
Browse files Browse the repository at this point in the history
* docs: add client env variables

* chore(docs): move install instructions

* chore(docs): update brew installation

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>

---------

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
  • Loading branch information
bashbunni and aymanbagabas authored May 24, 2023
1 parent a813d33 commit a5f4109
Showing 1 changed file with 60 additions and 41 deletions.
101 changes: 60 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,47 @@ There’s also the powerful [Charm Client](#charm-client) for directly accessing
Charm services. [Self-hosting](#self-hosting) a Charm Cloud is as simple as
running `charm serve`.

## Installation

Use a package manager:

```bash
# macOS or Linux
brew install charmbracelet/tap/charm

# Arch Linux (btw)
pacman -S charm

# Nix
nix-env -iA nixpkgs.charm

# Debian/Ubuntu
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install charm

# Fedora/RHEL
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
sudo yum install charm
```

Or download a package or binary from the [releases][releases] page. All
major platforms and architectures are supported, including FreeBSD and ARM.

You can also just build and install it yourself:

```bash
git clone https://github.com/charmbracelet/charm.git
cd charm
go install
```

## Charm KV

A powerful, embeddable key-value store built on [BadgerDB][badger]. Store user
Expand Down Expand Up @@ -138,7 +179,8 @@ course, users can revoke machines’ access too.

### Backups

You can use `charm backup-keys` to backup your account keys. Your account can be recovered using `charm import-keys charm-keys-backup.tar`
You can use `charm backup-keys` to backup your account keys. Your account can
be recovered using `charm import-keys charm-keys-backup.tar`

## Charm Client

Expand All @@ -163,46 +205,19 @@ charm crypt encrypt < secretphoto.jpg > encrypted.jpg.json
charm help
```

### Installation

Use a package manager:

```bash
# macOS or Linux
brew tap charmbracelet/tap && brew install charmbracelet/tap/charm
### Client Settings

# Arch Linux (btw)
pacman -S charm
The Charm client can be configured using environment variables. These are the
defaults:

# Nix
nix-env -iA nixpkgs.charm

# Debian/Ubuntu
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install charm

# Fedora/RHEL
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
sudo yum install charm
```

Or download a package or binary from the [releases][releases] page. All
major platforms and architectures are supported, including FreeBSD and ARM.

You can also just build and install it yourself:

```bash
git clone https://github.com/charmbracelet/charm.git
cd charm
go install
```
* `CHARM_HOST`: Server public URL (_default cloud.charm.sh_)
* `CHARM_SSH_PORT`: SSH port to connect to (_default 35353_)
* `CHARM_HTTP_PORT`: HTTP port to connect to (_default 35354_)
* `CHARM_DEBUG`: Whether debugging logs are enabled (_default false_)
* `CHARM_LOGFILE`: The file path to output debug logs
* `CHARM_KEY_TYPE`: The type of key to create for new users (_default ed25519_)
* `CHARM_DATA_DIR`: The path to where the user data is stored
* `CHARM_IDENTITY_KEY`: The path to the identity key used for auth

## Self-Hosting

Expand Down Expand Up @@ -240,12 +255,16 @@ choosing:
export CHARM_HOST=burrito.example.com
```

See instructions for [Systemd](https://github.com/charmbracelet/charm/blob/main/systemd.md) and [Docker](https://github.com/charmbracelet/charm/blob/main/docker.md).
See instructions for
[Systemd](https://github.com/charmbracelet/charm/blob/main/systemd.md) and
[Docker](https://github.com/charmbracelet/charm/blob/main/docker.md).

#### Storage Considerations

The max data you can store on our Charm Cloud servers is 1GB per account.
By default, self-hosted servers don't have a data storage limit. Should you want to set a max storage limit on your server, you can do so using `CHARM_SERVER_USER_MAX_STORAGE`
By default, self-hosted servers don't have a data storage limit. Should you
want to set a max storage limit on your server, you can do so using
`CHARM_SERVER_USER_MAX_STORAGE`

### TLS

Expand Down

0 comments on commit a5f4109

Please # to comment.