Files
tabby-web/README.md

75 lines
2.9 KiB
Markdown
Raw Normal View History

2021-10-31 18:15:23 +01:00
# Tabby Web
2023-06-05 21:18:57 +02:00
> 👋 Tabby Web is looking for sponsors. As I can't afford to host it myself any longer, I'm looking for a sponsor to cover the hosting costs. If you're interested, please [get in touch](https://twitter.com/eugeeeeny)!
2021-10-31 18:15:23 +01:00
![](docs/screenshot.png)
This is the exact code that runs at https://tabby.sh. In fact, it's being deployed straight out of this repository.
You can use this to deploy your own copy or to make improvements - pull requests are welcome!
# How it works
2021-10-31 22:50:49 +01:00
Tabby Web serves the [Tabby Terminal](https://github.com/Eugeny/tabby) as a web application while managing multiple config files, authentication, and providing TCP connections via a [separate gateway service](https://github.com/Eugeny/tabby-connection-gateway).
2021-10-31 18:15:23 +01:00
# Requirements
* Python 3.7+
* A database server supported by Django (MariaDB, Postgres, SQLite, etc.)
* Storage for distribution files - local, S3, GCS or others supported by `fsspec`
2021-11-21 00:08:04 +01:00
# Quickstart (using `docker-compose`)
2021-10-31 18:15:23 +01:00
2021-11-21 00:08:04 +01:00
You'll need:
2021-10-31 18:15:23 +01:00
2021-11-21 00:08:04 +01:00
* OAuth credentials from GitHub, GitLab, Google or Microsoft for authentication.
* For SSH and Telnet: a [`tabby-connection-gateway`](https://github.com/Eugeny/tabby-connection-gateway) to forward traffic.
2022-08-13 10:36:04 +02:00
* Docker BuildKit: `export DOCKER_BUILDKIT=1`
2021-11-21 00:08:04 +01:00
```bash
docker-compose up -e SOCIAL_AUTH_GITHUB_KEY=xxx -e SOCIAL_AUTH_GITHUB_SECRET=yyy
```
2021-10-31 18:15:23 +01:00
2021-11-21 00:08:04 +01:00
will start Tabby Web on port 9090 with MariaDB as a storage backend.
2021-10-31 18:15:23 +01:00
2021-11-21 00:08:04 +01:00
For SSH and Telnet, once logged in, enter your connection gateway address and auth token in the settings.
2021-10-31 18:15:23 +01:00
2021-11-21 00:08:04 +01:00
## Environment variables
2021-10-31 18:15:23 +01:00
* `DATABASE_URL` (required).
* `APP_DIST_STORAGE`: a `file://`, `s3://`, or `gcs://` URL to store app distros in.
* `SOCIAL_AUTH_*_KEY` & `SOCIAL_AUTH_*_SECRET`: social login credentials, supported providers are `GITHUB`, `GITLAB`, `MICROSOFT_GRAPH` and `GOOGLE_OAUTH2`.
## Adding Tabby app versions
2021-11-21 00:08:04 +01:00
* `docker-compose run tabby /manage.sh add_version 1.0.163`
2021-10-31 18:15:23 +01:00
You can find the available version numbers [here](https://www.npmjs.com/package/tabby-web-container).
2021-10-31 18:15:23 +01:00
# Development setup
Put your environment vars (`DATABASE_URL`, etc.) in the `.env` file in the root of the repo.
For the frontend:
```shell
cd frontend
yarn
yarn run build # or yarn run watch
```
For the backend:
```shell
cd backend
poetry install
./manage.py migrate # set up the database
./manage.py add_version 1.0.156-nightly.2 # install an app distribution
PORT=9000 poetry run gunicorn # optionally with --reload
```
# Security
* When using Tabby Web for SSH/Telnet connectivity, your traffic will pass through a hosted gateway service. It's encrypted in transit (HTTPS) and the gateway servers authenticate themselves with a certificate before connections are made. However there's a non-zero risk of a MITM if a gateway service is compromised and the attacker gains access to the service's private key.
* You can alleviate this risk by [hosting your own gateway service](https://github.com/Eugeny/tabby-connection-gateway), or your own copy of Tabby Web altogether.