README.md 13.2 KB
Newer Older
Recolic Keghart's avatar
Recolic Keghart committed
1 2
# recolic's private notebook

Recolic Keghart's avatar
Recolic Keghart committed
3
Some note about deploying my website and other services. 
Recolic Keghart's avatar
Recolic Keghart committed
4

Recolic Keghart's avatar
Recolic Keghart committed
5
I'm just making it public for convenience. **Commands here won't succeed without authorization.**
Recolic Keghart's avatar
Recolic Keghart committed
6

Recolic Keghart's avatar
Recolic Keghart committed
7
If you want to deploy a similiar service, the following content may help. But be careful, this is not a guide, this is my private notebook. 
Recolic Keghart's avatar
Recolic Keghart committed
8 9 10 11 12

## common

currently using uswest server by DO, docker image is hosted by Amazon ECR (600163736385.dkr.ecr.us-west-2.amazonaws.com). 

Recolic Keghart's avatar
Recolic Keghart committed
13
Get login info (valid for 12h)
Recolic Keghart's avatar
Recolic Keghart committed
14 15 16 17
```
aws ecr get-login --no-include-email --region us-west-2
```

Recolic Keghart's avatar
Recolic Keghart committed
18
do not use docker attach. 
Recolic Keghart's avatar
Recolic Keghart committed
19
```
Recolic Keghart's avatar
Recolic Keghart committed
20
docker exec -ti rweb /bin/bash
Recolic Keghart's avatar
Recolic Keghart committed
21 22
```

Recolic K's avatar
archive  
Recolic K committed
23 24
Every server saves `acme.sh`, `nginx.conf`, `crontab.log`, `cert.sh`, `startup.sh` into `/srv/conf`. Every server has an nginx, which redirects 
all HTTPS traffic to `http://localhost:xxxx`. 
Recolic Keghart's avatar
Recolic Keghart committed
25

Recolic Keghart's avatar
Recolic Keghart committed
26
## docker-ipv6 support (NAT mode)
Recolic Keghart's avatar
Recolic Keghart committed
27

Recolic K's avatar
archive  
Recolic K committed
28
Requires docker > 20.10.2, edit `/etc/docker/daemon.json`: 
Recolic Keghart's avatar
Recolic Keghart committed
29

Recolic K's avatar
archive  
Recolic K committed
30 31 32 33 34
```json
{
  "experimental": true,
  "ip6tables": true,
  "ipv6": true,
Recolic Keghart's avatar
Recolic Keghart committed
35
  "fixed-cidr-v6": "fd00:dead:beef::/48",
Recolic K's avatar
archive  
Recolic K committed
36 37 38 39 40
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  }
}
Recolic Keghart's avatar
Recolic Keghart committed
41 42
```

Recolic Keghart's avatar
Recolic Keghart committed
43
# DO NOT FORGET WRITING DOCKER-START INTO rc.local
Recolic Keghart's avatar
Recolic Keghart committed
44

Recolic Keghart's avatar
Recolic Keghart committed
45 46 47 48
## proxi-ed http port usage:

|port|service|
|-----|-----|
Recolic Keghart's avatar
Recolic Keghart committed
49
|2080|git|
Recolic Keghart's avatar
Recolic Keghart committed
50
|3000|rocket|
Recolic Keghart's avatar
Recolic Keghart committed
51
|3002|riot.backend|
Recolic Keghart's avatar
Recolic Keghart committed
52
|3003|riot.web|
Recolic Keghart's avatar
Recolic Keghart committed
53
|3004(https)|zulip|
54
|3007|wishbox|
Recolic Keghart's avatar
Recolic Keghart committed
55 56 57 58 59 60
|3008|onlyoffice|
|3080|tm|
|3081|baidupan_proxy|
|3083|drive|
|3091|www|
|3092(https)|mail|
Recolic Keghart's avatar
Recolic Keghart committed
61
|6080|WebVirtMgr(VNC-Proxy)|
Recolic Keghart's avatar
Recolic Keghart committed
62 63 64 65 66
|6081|WebVirtMgr|
|6088|Android ADB Web|
|8080|test_only|
|8448(https)|matrix.api|
|10000|v2ray|
Recolic Keghart's avatar
Recolic Keghart committed
67

Recolic Keghart's avatar
Recolic Keghart committed
68 69 70 71 72 73
## reserved port on all recolic servers:

|port|service|
|-----|-----|
|80|nginx-only rproxy http|
|443|nginx-only rproxy https|
Recolic Keghart's avatar
Recolic Keghart committed
74 75 76 77 78
|81|secondary-http|
|444|secondary-https|
|22|ssh|
|4022|secondary-ssh|
|25566|secondary-ssh|
Recolic Keghart's avatar
Recolic Keghart committed
79
|25567|secondary-ssh|
Recolic Keghart's avatar
Recolic Keghart committed
80 81
|5700-5710|VNC|
|3389|RDP|
Recolic Keghart's avatar
Recolic Keghart committed
82 83 84
|3128|http_proxy|
|1080|socks5|
|10808|socks5|
85
|25551|shadowsocks|
Recolic Keghart's avatar
Recolic Keghart committed
86
|25580|shadowsocks|
Recolic Keghart's avatar
Recolic Keghart committed
87
|25581|snakesocks|
Recolic Keghart's avatar
Recolic Keghart committed
88 89
|25554|openvpn|
|1194|openvpn|
Recolic Keghart's avatar
Recolic Keghart committed
90 91
|466|shadowsocksR|
|588|shadowsocksR|
Recolic Keghart's avatar
Recolic Keghart committed
92 93 94 95
|30999|FRPS server|
|30998|FRPS monitor|
|30997|FRPC console|
|30500-30899|FRP server dynamic ports|
Recolic Keghart's avatar
Recolic Keghart committed
96
|9399|Virtualbox web interface|
Recolic Keghart's avatar
Recolic Keghart committed
97 98
|9000-9389|Virtualbox dynamic ports (RDP)|
|31000-31499|Virtualbox dynamic ports (Other use)|
Recolic Keghart's avatar
Recolic Keghart committed
99
|30400-30499|Generic dynamic ports (Other use)|
Recolic Keghart's avatar
Recolic Keghart committed
100

Recolic K's avatar
archive  
Recolic K committed
101
--------
Recolic Keghart's avatar
Recolic Keghart committed
102

Recolic K's avatar
archive  
Recolic K committed
103
# Services
Recolic Keghart's avatar
Recolic Keghart committed
104

Recolic K's avatar
archive  
Recolic K committed
105
> doc for closed services are archived into archived/README.md
Recolic Keghart's avatar
Recolic Keghart committed
106

Recolic K's avatar
archive  
Recolic K committed
107
## www.recolic.net
Recolic Keghart's avatar
Recolic Keghart committed
108

Recolic Keghart's avatar
Recolic Keghart committed
109 110
fresh deploy:
201905 update: move all /var out.
Recolic Keghart's avatar
Recolic Keghart committed
111
201911 update: remove https, remove zhixiang, logs, reconstructed.
112
202106 update: re-written from stretch, simple state-less dockerfile. https://git.recolic.net/root/scripts/-/tree/one/groundup/php-nginx
Recolic Keghart's avatar
Recolic Keghart committed
113

114
Put the website into /srv/html, and make sure `/srv/html/.config/nginx.conf` exists. 
Recolic Keghart's avatar
Recolic Keghart committed
115 116

```
Recolic K's avatar
addsrc  
Recolic K committed
117
docker run --log-opt max-size=10M -tid -p 3091:80 -v /srv/html:/var/www/html --name rwww --restart=always recolic/php-nginx /entry.sh
Recolic Keghart's avatar
Recolic Keghart committed
118 119
```

Recolic K's avatar
archive  
Recolic K committed
120
The docker image is HTTP-only and contains no certificate since 20210630. 
Recolic Keghart's avatar
Recolic Keghart committed
121

Recolic Keghart's avatar
Recolic Keghart committed
122 123
## mail.recolic.net

Recolic Keghart's avatar
Recolic Keghart committed
124
too complicated. Refer to this article: https://recolic.net/blog/2020/10/self-build-iredmail-in-docker
Recolic Keghart's avatar
Recolic Keghart committed
125

Recolic Keghart's avatar
Recolic Keghart committed
126
mig: copy /srv/iredmail out, commit and push docker(nothing may changed).
Recolic Keghart's avatar
Recolic Keghart committed
127
```
Recolic Keghart's avatar
Recolic Keghart committed
128
docker commit rmail 600163736385.dkr.ecr.us-west-2.amazonaws.com/mail.recolic.net
Recolic Keghart's avatar
Recolic Keghart committed
129
docker push 600163736385.dkr.ecr.us-west-2.amazonaws.com/mail.recolic.net
Recolic Keghart's avatar
Recolic Keghart committed
130

Recolic Keghart's avatar
Recolic Keghart committed
131 132 133 134
rsync -avz /srv/iredmail/mysql/ $newServerIp:/srv/iredmail/mysql
rsync -avz /srv/iredmail/vmail/ $newServerIp:/srv/iredmail/vmail
#           ------------------^-------------
# Be caution to the slash     |
Recolic Keghart's avatar
Recolic Keghart committed
135
```
Recolic Keghart's avatar
Recolic Keghart committed
136 137

passwd:
Recolic Keghart's avatar
Recolic Keghart committed
138 139
postmaster -> passwd(mail.recolic.net)
root, admin -> passwd(recolic.net)
Recolic Keghart's avatar
Recolic Keghart committed
140
    
Recolic Keghart's avatar
Recolic Keghart committed
141
crontab should restart docker container every 3 month, to renew email server certificate. 
Recolic Keghart's avatar
Recolic Keghart committed
142 143 144 145 146 147 148 149 150

## openvpn-server

build from stretch (modified from kylemanna)
```
git clone https://github.com/kylemanna/docker-openvpn.git
# remove the line: VOLUME ["/etc/openvpn"]
docker build --pull --tag recolic/openvpn -f Dockerfile .

Recolic K's avatar
addsrc  
Recolic K committed
151
docker run --log-opt max-size=10M -ti -p 1194:1194/udp --cap-add=NET_ADMIN --name rvpn recolic/openvpn
Recolic Keghart's avatar
Recolic Keghart committed
152 153 154 155 156 157 158 159
#### Now you're in container
#### ovpn_genconfig -u udp://ovpn.recolic.net
#### ovpn_initpki
#### vi /add_cli.sh
#### ctrl-P-Q

docker exec -ti rvpn /add_cli.sh recolic
# add more users
Recolic Keghart's avatar
Recolic Keghart committed
160
docker commit rvpn recolic/openvpn
Recolic Keghart's avatar
Recolic Keghart committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
docker tag recolic/openvpn:latest 600163736385.dkr.ecr.us-west-2.amazonaws.com/openvpn-server:latest
docker push 600163736385.dkr.ecr.us-west-2.amazonaws.com/openvpn-server:latest
```

/add_cli.sh
```
#!/bin/bash

[[ $1 == '' ]] && echo "Usage: $0 clientName" && exit 1

echo 'Use CA password genpasswd(ovpn.recolic.net)'
client="$1"

easyrsa build-client-full "$client" nopass &&
    ovpn_getclient "$client"
```

fresh deploy && mig (nodata!)
```
Recolic K's avatar
addsrc  
Recolic K committed
180
docker run --log-opt max-size=10M -tid -p 1194:1194/udp --cap-add=NET_ADMIN --name rvpn --privileged --restart=always 600163736385.dkr.ecr.us-west-2.amazonaws.com/openvpn-server ovpn_run
Recolic Keghart's avatar
Recolic Keghart committed
181 182 183 184 185 186 187 188
```

push your changes(after adding some users)
```
docker commit rvpn 600163736385.dkr.ecr.us-west-2.amazonaws.com/openvpn-server
docker push 600163736385.dkr.ecr.us-west-2.amazonaws.com/openvpn-server
```

Recolic Keghart's avatar
Recolic Keghart committed
189
## git.recolic.net
Recolic Keghart's avatar
Recolic Keghart committed
190

Recolic Keghart's avatar
Recolic Keghart committed
191 192
deploy (using /srv as datadir)
```
Recolic K's avatar
addsrc  
Recolic K committed
193
docker run --log-opt max-size=10M --detach \
Recolic Keghart's avatar
Recolic Keghart committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207
  --hostname git.recolic.net \
  --publish 20443:443 --publish 2080:80 --publish 0.0.0.0:22:22 \
  --name rgit \
  --restart always \
  --volume /srv/gitlab/config:/etc/gitlab \
  --volume /srv/gitlab/logs:/var/log/gitlab \
  --volume /srv/gitlab/data:/var/opt/gitlab \
  gitlab/gitlab-ce:latest
```

exec
```
docker exec -ti rgit /bin/bash
```
Recolic Keghart's avatar
Recolic Keghart committed
208

Recolic Keghart's avatar
Recolic Keghart committed
209 210 211 212 213
frontend cert issue:
```
./acme.sh --issue -d git.recolic.net -d tm.recolic.net -d hustdb.recolic.net -d git.recolic.org -d tm.recolic.org -d hustdb.recolic.org --dns dns_cf
```

Recolic Keghart's avatar
Recolic Keghart committed
214 215 216 217 218
## drive.recolic.net

data dir: `/srv/nextcloud`.

```
Recolic K's avatar
addsrc  
Recolic K committed
219
docker run --log-opt max-size=10M -d -p 3083:80 --name rdrive --restart=always -v /srv/nextcloud/nextcloud:/var/www/html -v /srv/nextcloud/apps:/var/www/html/custom_apps -v /srv/nextcloud/config:/var/www/html/config -v /srv/nextcloud/data:/var/www/html/data -v /srv/nextcloud/theme:/var/www/html/themes/rdef nextcloud
Recolic Keghart's avatar
Recolic Keghart committed
220 221
```

Recolic Keghart's avatar
Recolic Keghart committed
222 223
upgrade: at most one BIG-version each time. just stop and run with new image version. 

Recolic Keghart's avatar
Recolic Keghart committed
224 225
## rserver-monitor

Recolic K's avatar
addsrc  
Recolic K committed
226 227
source=<https://git.recolic.net/root/server-monitor>

Recolic Keghart's avatar
Recolic Keghart committed
228 229
```
touch /srv/html/status.html
Recolic K's avatar
addsrc  
Recolic K committed
230
docker run --log-opt max-size=10M -d --name rmon --restart=always -v /srv/html/status.html:/app/status.html recolic/rserver-status
Recolic Keghart's avatar
Recolic Keghart committed
231 232
```

Recolic K's avatar
archive  
Recolic K committed
233
## Matrix + Riot.im (TODO: it's outdated)
Recolic Keghart's avatar
Recolic Keghart committed
234 235 236

> https://git.recolic.net/root/matrix-riot-docker

Recolic Keghart's avatar
Recolic Keghart committed
237 238 239 240 241 242 243 244 245 246 247 248
## new Shadowsocks server setup 2020

```
wget https://golang.org/dl/go1.15.linux-amd64.tar.gz -O - | tar -xz -C /usr/local
cp /usr/local/go/bin/go /usr/bin
go get -v github.com/shadowsocks/go-shadowsocks2
```

- /etc/rc.local:
```
nohup /root/go/bin/go-shadowsocks2 -s 'ss://chacha20-ietf-poly1305:>>>>>>>>>>>>>>>>>>>ADD_PASSWORD<<<<<<<<<<<<<<<<<<<<@:25551' -verbose >> /var/log/ss.log 2>&1 & disown 
```
Recolic Keghart's avatar
Recolic Keghart committed
249

Recolic Keghart's avatar
Recolic Keghart committed
250
gen url: https://zhiyuan-l.github.io/SS-Config-Generator/
Recolic Keghart's avatar
Recolic Keghart committed
251

Recolic Keghart's avatar
Recolic Keghart committed
252 253
## blog (htmly), included in www.recolic.net docker image

Recolic Keghart's avatar
Recolic Keghart committed
254 255
- fresh deploy

Recolic K's avatar
addsrc  
Recolic K committed
256
Patched: https://github.com/recolic/htmly
Recolic Keghart's avatar
Recolic Keghart committed
257

Recolic Keghart's avatar
Recolic Keghart committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
htmly is flat-file-d, so just add nginx config: 

```
    location /htmly/ {
        try_files $uri $uri/ /htmly/index.php?$args;
    }
  location ~ /htmly/config/ {
     deny all;
  }
  location ~ \.php$ {
        fastcgi_pass			unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
  }
```

then `mkdir htmly && chmod 777 htmly && cd htmly && wget https://github.com/danpros/htmly/releases/download/v2.7.5/installer.php`. 

Then everything is done. Admin password is `recolic, genpasswd(recolic.net, v4)`

Recolic Keghart's avatar
Recolic Keghart committed
279
> Warning: installer.php not working on my prod environment. Seems like URL prefix error. Please download source code zip, and modify `config/*` manually. 
Recolic Keghart's avatar
Recolic Keghart committed
280

Recolic Keghart's avatar
Recolic Keghart committed
281 282
- patch

Recolic Keghart's avatar
Recolic Keghart committed
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
modify functions.php to make disqus working:

```
// Disqus on post.
function disqus($title = null, $url = null)
{
    $comment = config('comment.system');
    $disqus = config('disqus.shortname');
    $script = <<<EOF
    <script type="text/javascript">
        var getAbsolutePath = function(href) { 
            var link = document.createElement('a');
            link.href = href;
            return link.href;
        };
    var disqus_config = function () {
    this.page.url = getAbsolutePath('{$url}');  // Replace PAGE_URL with your page's canonical URL variable
    };
    (function() { // DON'T EDIT BELOW THIS LINE
    var d = document, s = d.createElement('script');
    s.src = 'https://{$disqus}.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
    </script>
EOF;
    if (!empty($disqus) && $comment == 'disqus') {
        return $script;
    }
}
Recolic Keghart's avatar
Recolic Keghart committed
313 314
```

Recolic Keghart's avatar
Recolic Keghart committed
315 316 317 318
- migrate

all files inside /srv/html. Migrate together with www.recolic.net. 

Recolic Keghart's avatar
Recolic Keghart committed
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
## LAN printer (CUPS)

- build from stretch (from archwiki)

```
pacman -S cups avahi nss-mdns
```

edit /etc/nsswitch.conf: find the `hosts` line, add `mdns_minimal [NOTFOUND=return]` BEFORE `resolve ... dns`. 

To allow LAN to access the web interface, do

```sh
vim /etc/cups/cupsd.conf # EDIT: listen 0.0.0.0:631
cupsctl --remote-admin --remote-any --share-printers
```

Enable and start `avahi-daemon.service` and `org.cups.cupsd.service`. 

Recolic Keghart's avatar
Recolic Keghart committed
338 339 340
- PPD file for HP 1020

https://github.com/koenkooi/foo2zjs/blob/master/PPD/HP-LaserJet_1020.ppd
Recolic Keghart's avatar
Recolic Keghart committed
341

Recolic Keghart's avatar
Recolic Keghart committed
342
HP1020 should use CUPS 2.3.3-3 (ArchLinux) and **should not upgrade**. 
Recolic Keghart's avatar
Recolic Keghart committed
343

Recolic Keghart's avatar
Recolic Keghart committed
344 345 346
- FAQ: 

1. Filter failed: Please read /var/log/cups/error.log to find the actual error. 
Recolic Keghart's avatar
Recolic Keghart committed
347
2. In error.log, foo2zjs-wrapper: command not found: Install AUR package `foo2zjs-nightly`. 
Recolic Keghart's avatar
Recolic Keghart committed
348
3. `lpinfo -v` shows `usb://unknown/printer`, or `Waiting for printer to become available` after archlinux upgrade:   
Recolic Keghart's avatar
Recolic Keghart committed
349
  Please [downgrade cups/libcups to 2.3.3-3](https://wiki.archlinux.org/index.php/CUPS/Troubleshooting#Issues_Relating_to_Upgrade_2.3.3-3_-%3E_2.3.3+106+ga72b0140e-1), and downgrade cups-filters to 1.28.5-1, and set these packages as IgnorePkg in `/etc/pacman.conf`. Switching Arch's CUPS upstream from Apple's senescent original to the actively-developed OpenPrinting fork broke your CUPS. 
Recolic Keghart's avatar
Recolic Keghart committed
350
4. TODO
Recolic Keghart's avatar
Recolic Keghart committed
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365

## Gitlab runner

```
# Linux x86-64
sudo curl -L --output /usr/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

sudo chmod +x /usr/bin/gitlab-runner
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

#############################

apt install -y docker.io
Recolic Keghart's avatar
Recolic Keghart committed
366 367 368 369 370 371 372 373
sudo gitlab-runner register -n \
  --url https://git.recolic.net/ \
  --registration-token K9bsS-UPjjyxxLX1FVUW \
  --executor docker \
  --description "Give a name here" \
  --docker-image "ubuntu" \
  --docker-privileged

Recolic Keghart's avatar
Recolic Keghart committed
374
# remove the `locked` tag from gitlab manually
Recolic Keghart's avatar
Recolic Keghart committed
375
# Use `sudo gitlab-runner register --docker-privileged` to register manually. 
Recolic Keghart's avatar
Recolic Keghart committed
376 377
```

Recolic Keghart's avatar
Recolic Keghart committed
378 379
Docker-in-docker: Set firewall rule to prevent Internet from accessing port 2375. 

Recolic Keghart's avatar
Recolic Keghart committed
380 381
> disable tls if there's any problem. https://docs.gitlab.com/ee/ci/docker/using_docker_build.html

Recolic Keghart's avatar
Recolic Keghart committed
382 383 384 385 386 387 388 389
## WebVirtMgr

- Setup Web Portal

First run (setup database):

```
# Web Portal
Recolic K's avatar
addsrc  
Recolic K committed
390
sudo docker run --log-opt max-size=10M -d --name webvirtmgr -v /srv/webvirt:/data/ -e WEBVIRTMGR_ADMIN_USERNAME=admin -e WEBVIRTMGR_ADMIN_EMAIL=admin@local.domain -e WEBVIRTMGR_ADMIN_PASSWORD=password -p 6081:8000 odivlad/webvirtmgr
Recolic Keghart's avatar
Recolic Keghart committed
391 392 393 394 395 396
```

Then use

```
# Web Portal
Recolic K's avatar
addsrc  
Recolic K committed
397
sudo docker run --log-opt max-size=10M -d --restart=always --name webvirtmgr -v /srv/webvirt:/data/ -p 6081:8000 odivlad/webvirtmgr
Recolic Keghart's avatar
Recolic Keghart committed
398
# VNC proxy
Recolic K's avatar
addsrc  
Recolic K committed
399
sudo docker run --log-opt max-size=10M -d --restart=always --name webvirtmgr-console -v /srv/webvirt:/data/ -p 6080:6080 odivlad/webvirtmgr webvirtmgr-console
Recolic Keghart's avatar
Recolic Keghart committed
400 401 402 403
```

- Setup Host machine

Recolic Keghart's avatar
Recolic Keghart committed
404
Arch packages: `ebtables bridge-utils dnsmasq openbsd-netcat libvirt edk2-ovmf dmidecode qemu-headless`
Recolic Keghart's avatar
Recolic Keghart committed
405

Recolic Keghart's avatar
Recolic Keghart committed
406 407 408 409 410 411 412 413 414 415 416 417 418
Read [archwiki](https://wiki.archlinux.org/index.php/Libvirt) and set libvirtd.conf:

```
listen_tls = 0
listen_tcp = 1
tcp_port = "16509"
listen_addr = "0.0.0.0"
auth_tcp = "none"
```

If requiring auth, set `auth_tcp = "sasl"` and read <https://github.com/retspen/webvirtmgr/wiki/Setup-TCP-authorization>

DO NOT use systemd service (it always crash with `--listen parameter not permitted with systemd activation sockets`). Directly run `sudo libvirtd --listen`
Recolic Keghart's avatar
Recolic Keghart committed
419

Recolic Keghart's avatar
Recolic Keghart committed
420 421 422 423 424
```
sudo systemctl enable --now virtlogd
sudo libvirtd --listen
```

Recolic Keghart's avatar
Recolic Keghart committed
425 426 427 428
## Android ADB web

<https://github.com/say-no-to-wechat/android-web-control-docker>

Recolic Keghart's avatar
Recolic Keghart committed
429 430
## Gitlab2github gitsync

Recolic K's avatar
addsrc  
Recolic K committed
431 432
source=<https://git.recolic.net/root/gitlab2github>

Recolic Keghart's avatar
Recolic Keghart committed
433
```
Recolic K's avatar
addsrc  
Recolic K committed
434
docker run --log-opt max-size=10M -d --restart=always --name rgitsync --env github_user_dst="recolic:ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" recolic/gitlab2github
Recolic Keghart's avatar
Recolic Keghart committed
435
```
Recolic K's avatar
addsrc  
Recolic K committed
436 437 438 439 440 441 442

## recolic mirror site

source=<https://git.recolic.net/root/aur-autobuild-mirror>

Clone the repo and setup crontab. 

Recolic K's avatar
add  
Recolic K committed
443 444 445 446
## storage.recolic.net

follow the guide at source=<https://git.recolic.net/root/scripts/-/tree/one/storage-server-backup-sh>

Recolic Keghart's avatar
Recolic Keghart committed
447
## dedicated v2ray
Recolic Keghart's avatar
Recolic Keghart committed
448

Recolic Keghart's avatar
Recolic Keghart committed
449 450 451 452 453
usually, I run v2ray with a real web server, usually drive.recolic.net or git.recolic.net. However, sometimes, we want to setup v2ray on a dedicated toy cock. 

```
curl -O https://raw.githubusercontent.com/jinwyp/one_click_script/master/trojan_v2ray_install.sh && chmod +x ./trojan_v2ray_install.sh && ./trojan_v2ray_install.sh
```