Tabby is a cross-platform SSH terminal with configuration synchronization in its web version. I will introduce building Tabby Web with podman and using Tabby's built-in configuration synchronization feature.

Previously, I tried using Nextcloud to synchronize the profile directory1, and then switched to the plugin Setting Sync, which hasn't worked very well for a long time, and often failed to synchronize. Tabby's built-in synchronization service is much more stable and supports synchronization and switching between multiple profiles. The built-in sync requires you to connect to a Tabby Web instance and log in with an account such as Github to get a sync key. If someone you trust has a Tabby Web instance, you can borrow it.

Register Github App

Visit https://github.com/settings/applications/new to register a new app。Fill in the URL and the callback URL. for example::

  • Homepage URL: https://tabby.example.com
  • Authorization callback URL: https://tabby.example.com/api/1/auth/social/complete/github/

When registration is complete, record the Client ID and obtain the Client secrets.

Run Tabby Web

Create podman-compose.ymlNote1

services:
  tabby:
    image: ghcr.io/eugeny/tabby-web:latest
    container_name: tabby
    restart: always
    ports:
      - '8000:8000'
    volumes:
      - ./data:/app-dist
    environment:
      - DATABASE_URL=sqlite:////app-dist/db.sqlite3 
      - PORT=8000
      - DEBUG=False
      - SOCIAL_AUTH_GITHUB_KEY=<Your Github App Client ID>
      - SOCIAL_AUTH_GITHUB_SECRET=<Your Github App Client Secret>
podman pull ghcr.io/eugeny/tabby-web:latest
podman-compose up -d

Then use Nginx, etc. to do a reverse generation for the Tabby Web instance.

Config Tabby Web

Enter the container shell:

podman exec -it tabby /bin/sh

Find a newer version number from https://registry.npmjs.org/tabby-web-container/, to register it in Tabby Web:

./manage.sh add_version 1.0.163

Config Tabby Setting Sync

First, enable the Vault, set the master password, and be careful not to turn on the Encrypt config file, as this will affect the synchronization. Go to https://tabby.example.com, click the login button on the bottom left of the page and select Github Login; click the Settings button on the bottom left of the page and copy the synchronization Token.

In the Tabby setup, go to the Config file and backup the current configuration. Then go to the Config Sync setting and fill in the information:

  • Sync Host: https://tabby.example.com
  • Secret sync token:

Wait a few moments and you will see the synchronized configuration (profile) below. You can upload and write, download and overwrite, or create a new one. It is recommended to turn on the Sync automatically option.


Notes

  1. You can also use docker and docker-compose. For this article, we've chosen to use podman and podman-compose.

References

  1. Dallas Lu. Sync Tabby Config with Nextcloud. ISSN 2770-7288. 2021.