{"id":13617568,"url":"https://github.com/UISSH/backend","last_synced_at":"2025-04-14T06:34:25.639Z","repository":{"id":50568178,"uuid":"519459833","full_name":"UISSH/backend","owner":"UISSH","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-09T11:07:44.000Z","size":488,"stargazers_count":151,"open_issues_count":6,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-01T20:47:57.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UISSH.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-30T08:21:58.000Z","updated_at":"2024-03-07T06:06:47.000Z","dependencies_parsed_at":"2024-01-17T00:47:56.632Z","dependency_job_id":null,"html_url":"https://github.com/UISSH/backend","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UISSH%2Fbackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UISSH%2Fbackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UISSH%2Fbackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UISSH%2Fbackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UISSH","download_url":"https://codeload.github.com/UISSH/backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223621865,"owners_count":17174772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:43.864Z","updated_at":"2024-11-08T02:30:42.134Z","avatar_url":"https://github.com/UISSH.png","language":"Python","readme":"# 介绍\n\n本项目旨在摆脱繁琐的编译安装、命令行配置的运维工作，并尽最大的努力遵循 Linux 通用规范的一个可视化面板，提供一键安装、配置、管理、监控、备份、迁移等功能。\n\n并追求面板与系统环境隔离，面板仅仅是一个管理工具，部署的环境以及服务运行也不依赖面板功能。做到面板停止后，您配置的环境与服务依然可以正常运行，使您的系统环境更加稳定、更加安全。\n\n## 环境\n\n ![debian](https://img.shields.io/badge/OS-Debian%2011%20LTS-brightgreen.svg?style=flat-square\u0026logo=debian)\n ![ubuntu](https://img.shields.io/badge/OS-Ubuntu%2022%20LTS-brightgreen.svg?style=flat-square\u0026logo=ubuntu)\n ![UISSH](https://img.shields.io/badge/Python-3.9--3.11-brightgreen.svg?style=flat-square\u0026logo=python)\n ![UISSH](https://img.shields.io/badge/Django-4.2-brightgreen.svg?style=flat-square\u0026logo=django)\n## CI\n![django ci](https://github.com/UISSH/backend/actions/workflows/django.yml/badge.svg)\n[![Debian 11 CI](https://github.com/UISSH/install-script/actions/workflows/debian_11.yml/badge.svg)](https://github.com/UISSH/install-script/actions/workflows/debian_11.yml)\n[![Ubuntu 22.04 CI](https://github.com/UISSH/install-script/actions/workflows/ubuntu_22.04.yml/badge.svg)](https://github.com/UISSH/install-script/actions/workflows/ubuntu_22.04.yml)\n\n\n\n## 安装\n\n可使用一键安装脚本快速部署，仅支持 Debian 11 与 Ubuntu 22.04。\n\n- [安装脚本](https://github.com/UISSH/install-script)\n\n## 运行\n\n使用 systemd 管理\n\n```bash\nsystemctl enable|disable|start|stop| ui-ssh\n```\n\n用于开发目的，使用 gunicorn 运行，_某些情况会找不到静态文件（404）_。\n\n```\nsystemctl stop ui-ssh\ngunicorn UISSH.asgi:application -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 \n```\n\n## 目录结构\n\n安装后本项目的目录\n\n```bash\n# 程序默认位置\n/usr/local/uissh\n# systemd\n/lib/systemd/system/ui-ssh.service\n```\n\n其余程序目录以及配置文件（MariaDB、PHP、Nginx）结构都保持默认位置。\n\n\n## 规范标准\n\n底层接口尽量调用开源工具提供的接口，目录结构以主流开源工具默认行为为准，不额外造轮子。\n\n节约时间，拥抱美好生活。\n\n## Linux\n\n第一版基于 Debian 11 长期支持版本而开发并通过可用性测试，暂时不考虑支持其余发行版。\n\n项目将在 Debian 11 生命周期进入最后两年对 Debian 11 仅仅提供安全更新不额外添加功能，并在 debian 12 长期支持版本上继续开发。\n\n### Nginx\n\n**配置文件**\n\n配置文件都应该遵循映射实际配置文件的做法，\n\n```bash\n# 配置文件应该存放在 \ntouch /etc/nginx/sites-available/[name].conf\n# 生效\nln -s /etc/nginx/sites-available/[name].conf /etc/nginx/sites-enabled/[name].conf\n```\n\n**API 格式**\n\n原生格式传到前端编辑，然后再保存传回时验证格式有效，无效不保存，提示前端重新编辑。有效则保存并重载或重启对应服务\n\n**SSl 证书**\n\n目录结构遵循 certbot\n\n```bash\n# 仅获取证书\ncertbot certonly \\\n  -n --nginx --agree-tos \\\n  -m domain@gmail.com \\ \n  -d \"domain.com\" \\\n  --server \"https://dv.acme-v02.api.pki.goog/directory\" # 可选\n  \n# Certificate is saved at: /etc/letsencrypt/live/domain.com/fullchain.pem\n# Key is saved at:         /etc/letsencrypt/live/domain.com/privkey.pem\n```\n\n```bash\n# 注册第三方机构，如 Google 为例\n    certbot register \\\n    --agree-tos  \\\n    --email \"email@gmail.com\" \\\n    --no-eff-email \\\n    --server \"https://dv.acme-v02.api.pki.goog/directory\" \\\n    --eab-kid \"f3acca************7e7d9\" \\\n    --eab-hmac-key \"HBUay****************************************WPQ\"\n```\n\n**网站目录以及权限**\n\n```bash\n# 所有网站目录应该创建在 /var/www/[name folder] 下\n# 权限应默认为 www-data\nchown www-data.www-data -R /var/www/\n```\n\n### Systemd\n\n**配置文件**\n\n部署应用都建议使用 systemd 来管理，遵循映射实际配置文件的做法\n\n```bash\n\n# 如实际配置文件存放在\ntouch /lib/systemd/system/[name].service\n\n# 应该创建系统软链接\nln -s  /lib/systemd/system/[name].service /etc/systemd/system/[name].service\n# 启用\nsystemctl enable [name].service \n```\n\n\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUISSH%2Fbackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUISSH%2Fbackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUISSH%2Fbackend/lists"}