Reorganize and prettify wiki — add Hello, Gitea pages; clean up all pages; rename 3X-UI

2026-02-21 10:13:42 +00:00
parent 40a995310a
commit adfe36ddea
8 changed files with 167 additions and 82 deletions

@@ -1,22 +0,0 @@
Install with `sudo -i` : https://github.com/pterodactyl-installer/pterodactyl-installer/issues/29
```
────────────────────────┐
│ x-ui control menu usages (subcommands): │
│ │
│ x-ui - Admin Management Script │
│ x-ui start - Start │
│ x-ui stop - Stop │
│ x-ui restart - Restart │
│ x-ui status - Current Status │
│ x-ui settings - Current Settings │
│ x-ui enable - Enable Autostart on OS Startup │
│ x-ui disable - Disable Autostart on OS Startup │
│ x-ui log - Check logs │
│ x-ui banlog - Check Fail2ban ban logs │
│ x-ui update - Update │
│ x-ui legacy - Legacy version │
│ x-ui install - Install │
│ x-ui uninstall - Uninstall │
└────────────────────────
```

30
3X-UI.md Normal file

@@ -0,0 +1,30 @@
# 3X-UI
VPN proxy panel running on Agap.
## Install
Run as root:
```bash
sudo -i
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
```
## Management
```bash
x-ui # Admin menu
x-ui start # Start
x-ui stop # Stop
x-ui restart # Restart
x-ui status # Status
x-ui settings # Show settings
x-ui enable # Enable autostart
x-ui disable # Disable autostart
x-ui log # View logs
x-ui banlog # View Fail2ban logs
x-ui update # Update
x-ui install # Reinstall
x-ui uninstall # Uninstall
```

24
Gitea.md Normal file

@@ -0,0 +1,24 @@
# Gitea
Git hosting running on Agap via Docker.
## Compose
See `gitea/docker-compose.yml`.
## Access
- Web: `http://agap:3000`
- SSH: `ssh -p 222 git@agap`
## Data
| Path | Contents |
|------|----------|
| `/mnt/misc/gitea` | Repositories, config, attachments |
| `/home/git/.ssh` | SSH keys |
## Stack
- Gitea 1.25.3
- PostgreSQL 14

22
Hello.md Normal file

@@ -0,0 +1,22 @@
# Agap
Self-hosted home server. Runs Docker-based services for personal infrastructure.
## What's Here
This repository contains Docker Compose files, configuration templates, and deployment scripts for all services running on Agap.
## Services
| Service | Purpose |
|---------|---------|
| Gitea | Git repository hosting |
| Home Assistant | Home automation |
| 3X-UI | VPN / proxy |
## Stack
- **OS:** Ubuntu
- **Networking:** Netplan + Caddy reverse proxy
- **Storage:** LVM
- **Virtualization:** KVM / libvirt

@@ -1,28 +1,43 @@
# Home Assistant
Install virtlib:
Runs as a KVM virtual machine on Agap.
```
## Install libvirt
```bash
sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
```
Download haos KVM:
https://www.home-assistant.io/installation/linux/
then **UNZIP**
## Download Image
```
xz -d haos_ova-16.2.qcow2.xz
[Download HAOS for KVM](https://www.home-assistant.io/installation/linux/)
Extract and move:
```bash
xz -d haos_ova-*.qcow2.xz
mv haos_ova-*.qcow2 /var/lib/libvirt/images/
```
and move the image to /var/lib/libvirt/images/haos_ova-16.2.qcow2 and update permissions.
## Install VM
Installation using virtlib:
```
virt-install --name haos --description "Home Assistant OS" --os-variant=ubuntu24.04 --ram=4096 --vcpus=2 --disk /var/lib/libvirt/images/haos_ova-16.2.qcow2,bus=scsi --controller type=scsi,model=virtio-scsi --import --graphics none --boot uefi --network bridge=br0
```bash
virt-install \
--name haos \
--description "Home Assistant OS" \
--os-variant=ubuntu24.04 \
--ram=4096 \
--vcpus=2 \
--disk /var/lib/libvirt/images/haos_ova-16.2.qcow2,bus=scsi \
--controller type=scsi,model=virtio-scsi \
--import \
--graphics none \
--boot uefi \
--network bridge=br0
```
It goes to UIFC, need to go to device manager and disable secure boot https://www.reddit.com/r/homeassistant/comments/198yg1a/trying_to_install_ha_as_a_virtual_machine_in/
## Post-install
A new ip will be assigned to vm, can be checked at router config panel.
- If boot fails, disable Secure Boot in UEFI firmware settings ([reference](https://www.reddit.com/r/homeassistant/comments/198yg1a/trying_to_install_ha_as_a_virtual_machine_in/))
- Find assigned IP at router admin panel

17
Home.md

@@ -1,9 +1,16 @@
Install Ubuntu: https://documentation.ubuntu.com/lxd/latest/tutorial/first_steps/
# Agap — Index
Set up [[Network]]
## Infrastructure
[[Storage]]
- [[Network]] — Netplan, Caddy, port forwarding
- [[Storage]] — LVM setup
KVM
## Services
- [[Home Assistant]]
- [[Home-Assistant]] — KVM virtual machine
- [[3X-UI]] — VPN proxy
- [[Gitea]] — Git hosting
## Quick Start
See [[Hello]] for an overview of Agap.

@@ -1,45 +1,44 @@
# Netplan
# Network
This is high-priority, because changing Netplan will switch down ssh session.
## Netplan
Change /etc/netplan/**.yaml :
Edit `/etc/netplan/*.yaml`:
```
blabla
```yaml
bridges:
br0:
interfaces: [enp3s0]
```
then `sudo netplan apply`
Apply:
Note that MAC of the device will change, so IP can also change and ssh session will not re-appear.
Note that changing net or device config of host may change the name of enp3s0 interface, and reconfiguration will be needed.
AFTER HELL AMOUNT OF TIME I figured out that router setting remote IP is not MY ip, but the machine that sends requests remote ip, so just need to keep empty! fuck. also, access from intranet by ip does not actually goes outside the intranet. fuck.
# Caddy
https://caddyserver.com/docs/install#debian-ubuntu-raspbian
https://caddyserver.com/docs/getting-started
https://caddyserver.com/docs/running caddy service is running
temprorarily downloaded dns records, check if second-level domain is an issue.
FUCKING SHIT
1. caddy needs both 80 and 443 ports, otherwise permanent redirect issue
2. TSL and lets encrypt errors can be debugged by runnung ` curl -v http://alogins.net/.well-known/acme-challenge/test`. Needs to have HTTP 200 for success.
3. port forwarding MUST HAVE BOTH SRC AND TARGET PORTS! otherwise it forwards to the incorrect internal port
Reloading config:
```
curl localhost:2019/load -H "Content-Type: application/json" -d @caddy.json
```bash
sudo netplan apply
```
Need to adjust after adding new domains.
> MAC address changes after bridge setup — router may assign a new IP.
> Interface name (`enp3s0`) may change after hardware reconfiguration.
See Nextcloud section for setting up trusted proxies (otherwise there is bug with too many requests).
## Caddy
[Install](https://caddyserver.com/docs/install#debian-ubuntu-raspbian) | [Docs](https://caddyserver.com/docs/getting-started)
Reload config:
```bash
curl localhost:2019/load \
-H "Content-Type: application/json" \
-d @caddy.json
```
### Requirements
- Ports **80** and **443** must both be forwarded (source and target)
- Leave remote IP empty in router port forwarding for intranet access
### TLS debugging
```bash
curl -v http://yourdomain.net/.well-known/acme-challenge/test
# Expect HTTP 200
```

@@ -1,18 +1,28 @@
The host is using [LVM](https://wiki.archlinux.org/title/LVM).
# Storage
Useful commands to check the current status:
Agap uses [LVM](https://wiki.archlinux.org/title/LVM).
## Common Commands
```bash
sudo pvs # create new hard drive
# Physical volumes
sudo pvs
sudo pvcreate /dev/sda1
sudo lvs # similar to pvs
# Volume groups
sudo vgcreate group_name /dev/sda1
# Logical volumes
sudo lvcreate -L 30G group_name -n lv_name
sudo mkfs.ext4 /dev/group_name/volume_name
# Overview
lsblk
sudo lvs
```
Then, create a new directory in `/mnt`, load and also modify `/etc/fstab`.
## Mounting
1. Create directory under `/mnt`
2. Mount the volume
3. Add entry to `/etc/fstab` for persistence