selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Lucky logo

Self-host Lucky

v2.27.2

Router toolkit for port forwarding, DDNS, proxying and WOL

ReleaseSource AvailableMIT
docker run -d --name lucky --restart=always --net=host gdy666/lucky
Updated8 months ago
LanguageGo
Setup difficultyEasy
Stars
8 270
Port
16601 (Web admin UI (HTTP and HTTPS))
Docker
gdy666/lucky

What is Lucky?

Lucky is an all-in-one networking toolkit aimed at router and homelab users, originally written in Go as a socat replacement for turning public IPv6 into internal IPv4 access. A single binary ships a Vue-based web admin (default port 16601) and bundles TCP/UDP port forwarding, DDNS for dozens of DNS providers, reverse proxying with redirects, STUN-based NAT traversal, Wake-on-LAN with voice-assistant hooks, an internal cron-like scheduler, ACME certificate issuance and renewal, and file services that mount local storage, WebDAV or Aliyun Drive into FTP/WebDAV/FileBrowser endpoints. The full Wanji build (the Docker image is Wanji) adds gRPC reverse proxying, CorazaWAF, rclone, DLNA and a Cloudflare Tunnel client, while the lightweight Lucky build targets resource-poor routers. You install it with a curl/wget one-click script, an OpenWrt IPK package, the gdy666/lucky Docker image (host network recommended), or a tar.gz binary you run with a config-folder flag. Note that source is only published up to v1.4.10 with no plans to continue open-sourcing, and since 2.13.9 external admin access is off by default and the shipped default login must be changed before modules work.

Should you self-host Lucky?

Lucky scores 57/100 on selfhost.directory (how scoring works) and ranks #12 of 20 in Network Utilities. It has 8 270 GitHub stars.

It shipped 5 stable releases in the past year. The latest, v2.27.2, came out on 15 February 2026. New versions land roughly every 3 weeks.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is MyIP (75/100, 12 239 stars). It scores higher overall, so compare the two before you pick. See Lucky vs MyIP side by side.

Features

  • ACME automatic certificates
  • Cloudflare Tunnel clientWanji (full) edition only, per the Lucky/Wanji edition comparison.
  • Config backup and restore
  • Dynamic DNS (DDNS)
  • IPv6/IPv4 port forwarding
  • Light navigation panelIntroduced as an Alpha/experience version in the v2.27.0 changelog.
  • Network storage mounting
  • REST API
  • Reverse Proxy
  • Scheduled Tasks
  • Security entrance path
  • STUN NAT traversal
  • Wake-on-LAN
  • Web admin UI
  • Web Application FirewallIncluded in the full Wanji edition (the Docker image is Wanji), not the lightweight Lucky build.

Lucky README

How to install Lucky

Install Lucky with Docker

# host模式, 同时支持IPv4/IPv6, Liunx系统推荐
docker run -d --name lucky --restart=always --net=host gdy666/lucky
# 桥接模式, 只支持IPv4, Mac/Windows推荐,windows 不推荐使用docker版本
docker run -d --name lucky --restart=always -p 16601:16601 gdy666/lucky

Optional persistent config folder:

docker run -d --name lucky --restart=always --net=host -v /root/luckyconf:/goodluck gdy666/lucky

From v2.23.1 the in-container config folder is /app/conf; host network mode is recommended on Linux, Docker on Windows is discouraged.

How to configure Lucky

  • -cPath to config file (relative or absolute); created automatically if missing (1.x style, still accepted by 2.x)

    Path to config file (relative or absolute); created automatically if missing (1.x style, still accepted by 2.x)

  • -cdPath to the config folder (2.x keeps each module's config in the folder); created if missing

    Path to the config folder (2.x keeps each module's config in the folder); created if missing

  • localipsOptional file in the config folder listing internal IPs/CIDRs, one per line; when non-empty it overrides the built-in private ranges (2.15.8+)

    Optional file in the config folder listing internal IPs/CIDRs, one per line; when non-empty it overrides the built-in private ranges (2.15.8+)

  • -rCancelSafeURLCancel the security entrance (hidden admin path) (needs 2.10.0+)

    Cancel the security entrance (hidden admin path) (needs 2.10.0+)

  • -rDisable2FADisable 2FA verification (needs 2.10.0+)

    Disable 2FA verification (needs 2.10.0+)

  • -rResetUserReset the admin login account and password (needs 2.10.0+)

    Reset the admin login account and password (needs 2.10.0+)

  • -rRestartRestart Lucky immediately without config-folder flag (needs 2.10.0+)

    Restart Lucky immediately without config-folder flag (needs 2.10.0+)

  • -rSetHttpAdminPortSet the admin panel HTTP port (needs 2.10.0+)

    Set the admin panel HTTP port (needs 2.10.0+)

  • -rSetHttpsAdminPortSet the admin panel HTTPS port (needs 2.10.0+)

    Set the admin panel HTTPS port (needs 2.10.0+)

  • -rUnlockUnlock login restrictions immediately without restarting (needs 2.10.0+)

    Unlock login restrictions immediately without restarting (needs 2.10.0+)

Lucky releases & version history

FAQ

My config was lost after upgrading OpenWrt.

Back up configs regularly from the bottom of the admin settings page, and prefer the official IPK package to reduce such problems.

I cannot reach the Lucky admin UI, how do I change the admin port?

Change the port on another machine where you can access the admin panel, then copy the modified lucky_base.lkcf file into the target environment.

What is the difference between the Lucky and Wanji (万吉) editions?

Lucky is the lightweight build with the common modules; Wanji is the all-in-one build that adds gRPC reverse proxying, CorazaWAF, rclone, FileBrowser, DLNA and a Cloudflare Tunnel client, and the Docker image is the Wanji build.

What if I forget the admin login password?

Delete the lucky_base.lkcf config file and restart the Lucky process or container; the settings-page data resets while the other modules' data is untouched.

Why does external access to the Lucky admin panel say access from outside the network is forbidden?

Since v2.13.9 the external-access switch is off by default, though external access is allowed for ten minutes after the base config is first created; enable and save the switch within that window, or delete the lucky_base.lkcf file, restart Lucky and enable it within ten minutes.

More in Network Utilities

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…