Skip to content

Using the binary

For setups that do not require Docker, the Tinyauth binary provides a lightweight alternative. This approach is ideal for LXC containers or machines where Docker is unnecessary but Tinyauth is still required to protect services.

The binary can be downloaded from the latest GitHub release. Builds are available for both arm64 and amd64 Linux machines. Renaming the binary to tinyauth is recommended for consistency throughout this guide. Ensure the binary is executable:

Terminal window
chmod +x tinyauth

Configuration can be achieved using either CLI flags or environment variables (recommended). To use environment variables, download the example .env file from GitHub:

Terminal window
curl -o .env https://raw.githubusercontent.com/steveiliop56/tinyauth/refs/heads/main/.env.example

Edit the .env file to replace template values with actual values or remove unnecessary ones. Alternatively, CLI flags can be used for configuration, though this method is less recommended due to potential complexity and shell parsing issues. Always use quotes (') to ensure values are passed correctly.

A complete list of environment variables and CLI flags is available on the configuration page.

Once configured, start Tinyauth. For environment variable-based setups, export the variables in the shell:

Terminal window
export $(grep -v '^#' .env | xargs -d '\n')

Start the Tinyauth server:

Terminal window
./tinyauth

For CLI flag-based setups, pass the flags directly:

Terminal window
./tinyauth --appurl=https://tinyauth.example.com

To enable Tinyauth to start automatically on boot, create a systemd service. First, create the service file:

/etc/systemd/system/tinyauth.service
[Unit]
Description=Tinyauth service
After=network.target
[Service]
EnvironmentFile=/some/path/.env
ExecStart=/some/path/tinyauth
Restart=on-failure
[Install]
WantedBy=multi-user.target

Reload the systemd daemon:

Terminal window
sudo systemctl daemon-reload

Enable and start the service:

Terminal window
sudo systemctl enable --now tinyauth

Logs can be viewed with:

Terminal window
sudo journalctl -efu tinyauth

Tinyauth will now start automatically on boot.