Jauth
Lightweight SSL/TLS reverse proxy with authorization (via Telegram and SSH) for self-hosted apps.
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_keysformat, with one public key and its username per line. You can reuse the~/.ssh/authorized_keysfile 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-UserHTTP 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
- Download the latest release:
wget https://github.com/Jipok/Jauth/releases/latest/download/jauth - Make it executable:
chmod +x ./jauth - 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:8080once 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-autocertdirectory. - Sessions of logged-in users are stored in
./jauth-tokens.txtand remain valid after a restart. When privilege dropping is enabled, session state cannot be preserved across restarts. - The repository includes a
github-key-import.shscript that lets you search GitHub user profiles and quickly import their SSH public keys. The script requires fzf and jq.
Discover more
Algernon
Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support.
Caddy
Powerful, enterprise-ready, open source web server with automatic HTTPS.
Pomerium
An identity-aware reverse proxy, successor to now obsolete oauth_proxy. It inserts an OAuth step before proxying your request to the backend, so that you can safely expose your self-hosted websites to public Internet.
SWAG (Secure Web Application Gateway)
Nginx webserver and reverse proxy with PHP support, built-in Certbot (Let's Encrypt) client and fail2ban integration.
Varnish
Web application accelerator/caching HTTP reverse proxy.
Zoraxy
General purpose HTTP reverse proxy and forwarding tool.