ZefiraZEFIRA Docs GitHub ↗

ZEFIRA Installation

From empty server to working panel in about 5 minutes.

Requirements

One-line install

bash <(curl -fsSL https://raw.githubusercontent.com/mrlurix/zefira/main/install.sh)
Piped scripts run non-interactively with safe defaults and print a random admin password at the end. For the guided setup, download the script first and run sudo bash install.sh.

The 7 guided steps

StepWhat you choose
1 · PortPanel port (default 8000)
2 · DomainDomain for links & SSL, or empty to use the server IP
3 · AdminAdmin username + password (empty = strong random password)
4 · DatabaseSQLite (zero setup), MySQL, MariaDB or PostgreSQL
5 · SubscriptionSubscription URL path (default /sub)
6 · TelegramOptional bot token + chat ID for notifications
7 · Nginx + SSLReverse proxy + Let's Encrypt certificate (needs port 80 free)

What the installer does

  1. Installs Python, Nginx and Certbot
  2. Clones Zefira to /opt/zefira
  3. Creates a virtualenv and installs dependencies
  4. Writes a locked-down .env (mode 600)
  5. Registers a systemd service (zefira.service)
  6. Optionally configures Nginx and issues the SSL certificate with auto-renew cron

After install

# your URL, login and paths are printed at the end, e.g.
# URL   : https://vpn.example.com
# Local : http://127.0.0.1:8000

systemctl status zefira
journalctl -u zefira -n 100 --no-pager   # logs
First login: open Settings, change the password and enable 2FA (TOTP). Do this before creating users.

Non-interactive install

ZEFIRA_DOMAIN=vpn.example.com \
ZEFIRA_SSL_EMAIL=admin@example.com \
ZEFIRA_SETUP_NGINX=y ZEFIRA_USE_SSL=y \
ZEFIRA_ADMIN_USERNAME=admin \
ZEFIRA_ADMIN_PASSWORD='S3cure-Pass-99' \
bash <(curl -fsSL https://raw.githubusercontent.com/mrlurix/zefira/main/install.sh)

Uninstall

sudo bash install.sh --uninstall