Skip to content

Getting started

Eugeny edited this page Apr 10, 2022 · 13 revisions

Installation (prebuilt Linux binaries)

  • Download the binary from the Releases page and save it as /usr/bin/warpgate.
  • Make it executable:
chmod +x /usr/bin/warpgate

Setup

Run warpgate setup and follow the prompts. If you want to use a non-default (/etc/warpgate.yaml) config path, pass it to all warpgate commands via --config <path>.

Here's what it might look like:

$ warpgate setup

13:43:10  INFO Welcome to Warpgate 0.1.0
13:43:10  INFO Let's do some basic setup first.
13:43:10  INFO The new config will be written in /etc/warpgate.yaml.
13:43:10  INFO * Paths can be either absolute or relative to /etc.
✔ Directory to store app data (up to a few MB) in · /var/lib/warpgate
✔ Endpoint to listen for SSH connections on · 0.0.0.0:2222
✔ Endpoint to expose admin web interface on · 0.0.0.0:8888
✔ Do you want to record user sessions? · yes
✔ Set a password for the Warpgate admin user · ********
13:43:28  INFO Generated configuration:
---
targets:
  - name: web-admin
    allow_roles:
      - "warpgate:admin"
    web_admin: {}
users:
  - username: admin
    credentials:
      - type: password
        hash: "$argon2id$v=19$m=4096,t=3,p=1$QbQRMA/d2F3FwBagls5/cg$gsULLBZRqhZQSMposrggzYxlTtE9xIQe3Zkt7tbQL6g"
    roles:
      - "warpgate:admin"
roles:
  - name: "warpgate:admin"
recordings:
  enable: true
  path: /var/lib/warpgate/recordings
web_admin:
  enable: true
  listen: "0.0.0.0:8888"
  certificate: /var/lib/warpgate/web-admin.certificate.pem
  key: /var/lib/warpgate/web-admin.key.pem
database_url: "sqlite:/var/lib/warpgate/db"
ssh:
  listen: "0.0.0.0:2222"
  keys: /var/lib/warpgate/ssh-keys
  client_key: "./client_key"
retention: 7days

13:43:28  INFO Saved into /etc/warpgate.yaml
13:43:28  INFO Using config: "/etc/warpgate.yaml" (users: 1, targets: 1, roles: 1)
13:43:28  INFO Generating HTTPS certificate
13:43:28  INFO 
13:43:28  INFO Admin user credentials:
13:43:28  INFO   * Username: admin
13:43:28  INFO   * Password: <your password>
13:43:28  INFO 
13:43:28  INFO You can now start Warpgate with:
13:43:28  INFO   warpgate --config /etc/warpgate.yaml run

You can now start Warpgate with warpgate run and the output should look like this:

$ warpgate run

13:44:13  INFO Warpgate version=0.1.0
13:44:13  INFO Using config: "/etc/warpgate.yaml" (users: 1, targets: 1, roles: 1)
13:44:13  INFO --------------------------------------------
13:44:13  INFO Warpgate is now running.
13:44:13  INFO Accepting SSH connections on 0.0.0.0:2222
13:44:13  INFO Access admin UI on https://0.0.0.0:8888
13:44:13  INFO --------------------------------------------
13:44:13  INFO Listening address=0.0.0.0:2222
13:44:13  INFO Listening address=0.0.0.0:8888