Back to services

Jauth

Lightweight SSL/TLS reverse proxy with authorization (via Telegram and SSH) for self-hosted apps.

View alternatives to Jauth
Suggest edit
Open source
Self-hostable
GPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

Jauth is a lightweight SSL/TLS reverse proxy written in Go and released as open source under the GPL-3.0 license. It sits in front of self-hosted apps and adds HTTPS encryption and login authentication to web apps that are bloated or have security concerns. It can also enable single sign-on (SSO). The whole system uses no passwords and no account registration: users prove their identity with an SSH key or a Telegram account.

Key Features

  • Single executable: no external dependencies. Download it and run it.
  • SSL/TLS encryption: it can generate a self-signed certificate automatically, obtain certificates automatically through Let's Encrypt, or use a certificate you specify manually.
  • SSH login: a built-in SSH server (default port 2222) uses the standard authorized_keys format, with one public key and its username per line. You can reuse the ~/.ssh/authorized_keys file already on your system.
  • Telegram login: authentication is done through the Telegram Login Widget. The Bot Token is only used to verify the login result; Jauth never calls the Telegram Bot API.
  • Optional single sign-on: log in on one domain and gain access to the other protected services.
  • Whitelist access control: by default every user can access all domains, and you can restrict access with a per-domain whitelist.
  • Multi-domain support: each domain can be forwarded to a different backend address and port.
  • User identity passthrough: the authenticated username is passed to the backend app in the Remote-User HTTP header. If the backend identifies users by email, you can append a common suffix to usernames, such as @local.

Who It's For

Jauth suits individual or home self-hosters and small teams. If you want to quickly add HTTPS and login protection to self-hosted web apps such as Paperless-ngx or Grist, and you don't want to deploy heavier authentication systems like Authelia or Keycloak, Jauth is worth considering.

Installation and Usage

  1. Download the latest release: wget https://github.com/Jipok/Jauth/releases/latest/download/jauth
  2. Make it executable: chmod +x ./jauth
  3. Run it: ./jauth

When run without a configuration file, Jauth will:

  • generate a self-signed certificate valid for one year;
  • start a web server on port 80 that redirects all requests to port 443;
  • show the login page on port 443;
  • start an SSH authentication server on port 2222;
  • forward requests to 127.0.0.1:8080 once the user is authenticated.

Configuration

By default, Jauth reads ./jauth.toml in the current directory. You can also specify the path to a configuration file as the first command-line argument. Common settings include:

  • certificate type: autocert, self-signed, or manual;
  • SSO domain;
  • Telegram user mapping, using either a user ID or @username;
  • multiple [[Domains]] entries, each with its own target address, whitelist, username suffix, and Telegram Bot information;
  • listen address and ports, session timeout, and logout URL;
  • a custom login page;
  • filtering scanning noise out of the logs;
  • dropping privileges when started as root.

Notes

  • Before using Telegram login, you need to create your own Bot through @BotFather and bind a domain to it with /setdomain. Each Bot can only be tied to one domain.
  • When using Let's Encrypt, a certificate must be requested separately for each domain. The process may not show up in the logs, so wait about 30 seconds before visiting the site in your browser. Certificates are stored in the ./jauth-autocert directory.
  • Sessions of logged-in users are stored in ./jauth-tokens.txt and remain valid after a restart. When privilege dropping is enabled, session state cannot be preserved across restarts.
  • The repository includes a github-key-import.sh script that lets you search GitHub user profiles and quickly import their SSH public keys. The script requires fzf and jq.