Skip to content

Zhaba1337228/3x-ui-PostgreSQL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | فارسی | العربية | 中文 | Español | Русский

3x-ui

Release Build GO Version Downloads License Go Reference Go Report Card

3X-UI — advanced, open-source web-based control panel designed for managing Xray-core server. It offers a user-friendly interface for configuring and monitoring various VPN and proxy protocols.

Important

This project is only for personal usage, please do not use it for illegal purposes, and please do not use it in a production environment.

As an enhanced fork of the original X-UI project, 3X-UI provides improved stability, broader protocol support, and additional features.

Quick Start

bash <(curl -Ls https://raw.githubusercontent.com/Zhaba1337228/3x-ui-PostgreSQL/master/install.sh)

For full documentation, please visit the project Wiki.

PostgreSQL Setup

The panel now supports both sqlite and postgres.

Systemd install

The packaged systemd units already load environment files:

  • Debian/Ubuntu: /etc/default/x-ui
  • RHEL/CentOS/Alma/Rocky: /etc/sysconfig/x-ui

Example:

cat >/etc/default/x-ui <<'EOF'
XRAY_VMESS_AEAD_FORCED=false
XUI_DB_DRIVER=postgres
XUI_POSTGRES_DSN=host=127.0.0.1 port=5432 user=xui password=change_me dbname=xui sslmode=disable TimeZone=UTC
XUI_DB_MAX_IDLE_CONNS=10
XUI_DB_MAX_OPEN_CONNS=50
EOF

systemctl daemon-reload
systemctl restart x-ui
systemctl status x-ui

Minimal PostgreSQL bootstrap on the server:

sudo -u postgres psql <<'SQL'
CREATE USER xui WITH PASSWORD 'change_me';
CREATE DATABASE xui OWNER xui;
SQL

Docker Compose install

  1. Copy .env.example to .env
  2. Set:
    • XUI_DB_DRIVER=postgres
    • XUI_POSTGRES_DSN=host=127.0.0.1 port=5432 user=xui password=change_me dbname=xui sslmode=disable TimeZone=UTC
  3. Start Postgres profile and panel:
docker compose --profile postgres up -d --build

If you keep XUI_DB_DRIVER=sqlite, Postgres is not required and the panel continues using the local DB file.

A Special Thanks to

Acknowledgment

  • Iran v2ray rules (License: GPL-3.0): Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking.
  • Russia v2ray rules (License: GPL-3.0): This repository contains automatically updated V2Ray routing rules based on data on blocked domains and addresses in Russia.

Support project

If this project is helpful to you, you may wish to give it a🌟

Buy Me A Coffee
Crypto donation button by NOWPayments

Stargazers over Time

Stargazers over time

About

Xray panel supporting multi-protocol multi-user expire day & traffic & IP limit (Vmess, Vless, Trojan, ShadowSocks, Wireguard, Tunnel, Mixed, HTTP, Tun) with Postgres

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 37.1%
  • Go 35.5%
  • JavaScript 15.2%
  • Shell 11.9%
  • Other 0.3%