Levelrail
Skip to content

Self-host 2FAuth with Docker ​

A web app to manage your two-factor authentication accounts and generate one-time codes.

This page describes the Levelrail template for 2FAuth (Security). It deploys the services below as one Docker Compose app on your own server.

Project site: https://docs.2fauth.app.

Recommended memory: about 128 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
2fauth2fauth/2fauth:8.0.28000
twofauth_data -> /2fauth

Environment variables ​

ServiceVariableValue
2fauthAPP_KEYGenerated at deploy
2fauthAPP_URLPreset in the template
2fauthDB_CONNECTIONPreset in the template
2fauthSITE_OWNERPreset in the template

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy 2FAuth with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select 2FAuth. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy 2fauth --name my-2fauth

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More Security templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.