16 Commits
1.4.0 ... 1.7.3

Author SHA1 Message Date
il
d1e0eb30c0 config, docs: update secrets.yaml, vikunja.container.j2, vikunja.md to remove oidc fallback options and local-oidc dual login configuration 2026-03-31 20:31:51 +09:00
il
0f38df0100 config: update fw/nftables.conf.j2 to add the rule that allow connection from console to printer 2026-03-29 13:01:59 +09:00
il
7911657c8c version: update group_vars/all.yaml to update immich from v2.6.2 to v2.6.3 2026-03-28 15:53:03 +09:00
il
fd5d0ce4f8 roles: update set_vikunja.yaml to fix the task name error 2026-03-28 13:23:01 +09:00
il
98bc863d08 docs: update environment.md to reflect newest changes on environment 2026-03-28 10:49:52 +09:00
il
9137791aac 1.7.0: Release vikunja 2026-03-28 10:44:18 +09:00
il
f9179282b8 roles: update set_immich.yaml to add redis_immich container restart logic 2026-03-28 10:19:41 +09:00
il
25e33caec9 roles, config, docs: update set_paperless.yaml, paperless.container.j2, paperless-ngx.md to add redis_paperless container restart logic and to optimize paperless-ngx configuration 2026-03-25 23:47:50 +09:00
il
d5090503d8 version: update group_vars/all.yaml to update immich from v2.6.1 to v2.6.2 2026-03-25 19:44:28 +09:00
il
b7a038dcab docs: update paperless-ngx.md to add how to deal with non-standard format pdf such as korean government documents 2026-03-25 00:01:06 +09:00
il
5f063d82d5 1.6.0 Release paperless-ngx 2026-03-24 21:55:04 +09:00
il
95eff329b6 docs: update immich.md to polish the document 2026-03-24 11:18:26 +09:00
il
e8f523c2af config, docs: update whitelists.yaml.j2 and crowdsec.md to add whitelist expression to fix false positive of immich thumbnails 404 error 2026-03-21 21:35:41 +09:00
il
726c0c3523 config: update whitelists.yaml.j2 to add whitelist expression to fix false positive of actual budget 2026-03-21 19:32:25 +09:00
il
8bff16d172 1.5.0 Release actual budget 2026-03-21 19:27:05 +09:00
il
fc3b5a1e05 config: update each of Caddyfile to add resolver as bind directly to avoid pass through blocky to verify acme txt record 2026-03-21 16:07:28 +09:00
25 changed files with 816 additions and 19 deletions

View File

@@ -76,4 +76,7 @@ version:
vaultwarden: "1.35.4"
gitea: "1.25.5"
redis: "8.6.1"
immich: "v2.6.1"
immich: "v2.6.3"
actualbudget: "26.3.0"
paperless: "2.20.13"
vikunja: "2.2.2"

View File

@@ -42,3 +42,4 @@ storage:
redis:
immich: "6379"
paperless: "6380"

View File

@@ -185,6 +185,30 @@
tags: ["site", "immich"]
tags: ["site", "immich"]
- name: Set actual budget
ansible.builtin.include_role:
name: "app"
tasks_from: "services/set_actual-budget"
apply:
tags: ["site", "actual-budget"]
tags: ["site", "actual-budget"]
- name: Set paperless
ansible.builtin.include_role:
name: "app"
tasks_from: "services/set_paperless"
apply:
tags: ["site", "paperless"]
tags: ["site", "paperless"]
- name: Set vikunja
ansible.builtin.include_role:
name: "app"
tasks_from: "services/set_vikunja"
apply:
tags: ["site", "vikunja"]
tags: ["site", "vikunja"]
- name: Flush handlers right now
ansible.builtin.meta: "flush_handlers"

View File

@@ -42,3 +42,36 @@
changed_when: false
listen: "notification_restart_immich-ml"
ignore_errors: true # noqa: ignore-errors
- name: Restart actual-budget
ansible.builtin.systemd:
name: "actual-budget.service"
state: "restarted"
enabled: true
scope: "user"
daemon_reload: true
changed_when: false
listen: "notification_restart_actual-budget"
ignore_errors: true # noqa: ignore-errors
- name: Restart paperless
ansible.builtin.systemd:
name: "paperless.service"
state: "restarted"
enabled: true
scope: "user"
daemon_reload: true
changed_when: false
listen: "notification_restart_paperless"
ignore_errors: true # noqa: ignore-errors
- name: Restart vikunja
ansible.builtin.systemd:
name: "vikunja.service"
state: "restarted"
enabled: true
scope: "user"
daemon_reload: true
changed_when: false
listen: "notification_restart_vikunja"
ignore_errors: true # noqa: ignore-errors

View File

@@ -0,0 +1,39 @@
---
- name: Set actual budget container subuid
ansible.builtin.set_fact:
actualbudget_subuid: "101000"
- name: Create actual budget directory
ansible.builtin.file:
path: "{{ node['home_path'] }}/data/containers/actual-budget"
state: "directory"
owner: "{{ actualbudget_subuid }}"
group: "svadmins"
mode: "0770"
become: true
- name: Register secret value to podman secret
containers.podman.podman_secret:
name: "ACTUAL_OPENID_CLIENT_SECRET"
data: "{{ hostvars['console']['actualbudget']['oidc']['secret'] }}"
state: "present"
force: true
notify: "notification_restart_actual-budget"
no_log: true
- name: Deploy container file
ansible.builtin.template:
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/actual-budget/actual-budget.container.j2"
dest: "{{ node['home_path'] }}/.config/containers/systemd/actual-budget.container"
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
notify: "notification_restart_actual-budget"
- name: Enable actual-budget.service
ansible.builtin.systemd:
name: "actual-budget.service"
state: "started"
enabled: true
daemon_reload: true
scope: "user"

View File

@@ -24,6 +24,7 @@
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
register: "is_redis_conf"
- name: Deploy redis container file
ansible.builtin.template:
@@ -32,7 +33,7 @@
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
register: "is_redis_conf"
register: "is_redis_containerfile"
- name: Enable (Restart) redis service
ansible.builtin.systemd:
@@ -41,7 +42,7 @@
enabled: true
daemon_reload: true
scope: "user"
when: is_redis_conf.changed # noqa: no-handler
when: is_redis_conf.changed or is_redis_containerfile.changed # noqa: no-handler
- name: Add user in video, render group
ansible.builtin.user:

View File

@@ -0,0 +1,129 @@
---
- name: Set redis service name
ansible.builtin.set_fact:
redis_service: "paperless"
redis_subuid: "100998"
- name: Create redis_paperless directory
ansible.builtin.file:
path: "{{ node['home_path'] }}/{{ item }}"
state: "directory"
owner: "{{ redis_subuid }}"
group: "svadmins"
mode: "0770"
loop:
- "containers/redis"
- "containers/redis/{{ redis_service }}"
- "containers/redis/{{ redis_service }}/data"
become: true
- name: Deploy redis config file
ansible.builtin.template:
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/redis/redis.conf.j2"
dest: "{{ node['home_path'] }}/containers/redis/{{ redis_service }}/redis.conf"
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
register: "is_redis_conf"
- name: Deploy redis container file
ansible.builtin.template:
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/redis/redis.container.j2"
dest: "{{ node['home_path'] }}/.config/containers/systemd/redis_{{ redis_service }}.container"
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
register: "is_redis_containerfile"
- name: Enable (Restart) redis service
ansible.builtin.systemd:
name: "redis_{{ redis_service }}.service"
state: "restarted"
enabled: true
daemon_reload: true
scope: "user"
when: is_redis_conf.changed or is_redis_containerfile.changed # noqa: no-handler
- name: Set paperless subuid
ansible.builtin.set_fact:
paperless_subuid: "100999"
- name: Create paperless directory
ansible.builtin.file:
path: "{{ node['home_path'] }}/{{ item }}"
state: "directory"
owner: "{{ paperless_subuid }}"
group: "svadmins"
mode: "0770"
loop:
- "data/containers/paperless"
- "data/containers/paperless/data"
- "data/containers/paperless/media"
- "data/containers/paperless/consume"
- "containers/paperless"
- "containers/paperless/ssl"
become: true
- name: Deploy root certificate
ansible.builtin.copy:
content: |
{{ hostvars['console']['ca']['root']['crt'] }}
dest: "{{ node['home_path'] }}/containers/paperless/ssl/ilnmors_root_ca.crt"
owner: "{{ paperless_subuid }}"
group: "svadmins"
mode: "0440"
become: true
notify: "notification_restart_paperless"
no_log: true
- name: Register secret value to podman secret
containers.podman.podman_secret:
name: "{{ item.name }}"
data: "{{ item.value }}"
state: "present"
force: true
loop:
- name: "PAPERLESS_SECRET_KEY"
value: "{{ hostvars['console']['paperless']['session_secret'] }}"
- name: "PAPERLESS_DBPASS"
value: "{{ hostvars['console']['postgresql']['password']['paperless'] }}"
- name: "PAPERLESS_SOCIALACCOUNT_PROVIDERS"
value: |-
{
"openid_connect": {
"SCOPE": ["openid", "profile", "email"],
"OAUTH_PKCE_ENABLED": true,
"APPS": [
{
"provider_id": "authelia",
"name": "Authelia",
"client_id": "paperless",
"secret": "{{ hostvars['console']['paperless']['oidc']['secret'] }}",
"settings": {
"server_url": "https://authelia.ilnmors.com/.well-known/openid-configuration",
"token_auth_method": "client_secret_post"
}
}
]
}
}
notify: "notification_restart_paperless"
no_log: true
- name: Deploy paperless.container file
ansible.builtin.template:
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/paperless/paperless.container.j2"
dest: "{{ node['home_path'] }}/.config/containers/systemd/paperless.container"
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
notify: "notification_restart_paperless"
- name: Enable paperless.service
ansible.builtin.systemd:
name: "paperless.service"
state: "started"
enabled: true
daemon_reload: true
scope: "user"

View File

@@ -0,0 +1,62 @@
---
- name: Set vikunja subuid
ansible.builtin.set_fact:
vikunja_subuid: "100999"
- name: Create vikunja directory
ansible.builtin.file:
path: "{{ node['home_path'] }}/{{ item }}"
state: "directory"
owner: "{{ vikunja_subuid }}"
group: "svadmins"
mode: "0770"
loop:
- "data/containers/vikunja"
- "containers/vikunja"
- "containers/vikunja/ssl"
become: true
- name: Deploy root certificate
ansible.builtin.copy:
content: |
{{ hostvars['console']['ca']['root']['crt'] }}
dest: "{{ node['home_path'] }}/containers/vikunja/ssl/ilnmors_root_ca.crt"
owner: "{{ vikunja_subuid }}"
group: "svadmins"
mode: "0440"
become: true
notify: "notification_restart_vikunja"
no_log: true
- name: Register secret value to podman secret
containers.podman.podman_secret:
name: "{{ item.name }}"
data: "{{ item.value }}"
state: "present"
force: true
loop:
- name: "VIKUNJA_SERVICE_JWTSECRET"
value: "{{ hostvars['console']['vikunja']['session_secret'] }}"
- name: "VIKUNJA_DATABASE_PASSWORD"
value: "{{ hostvars['console']['postgresql']['password']['vikunja'] }}"
- name: "VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_CLIENTSECRET"
value: "{{ hostvars['console']['vikunja']['oidc']['secret'] }}"
notify: "notification_restart_vikunja"
no_log: true
- name: Deploy vikunja.container file
ansible.builtin.template:
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/vikunja/vikunja.container.j2"
dest: "{{ node['home_path'] }}/.config/containers/systemd/vikunja.container"
owner: "{{ ansible_user }}"
group: "svadmins"
mode: "0644"
notify: "notification_restart_vikunja"
- name: Enable vikunja.service
ansible.builtin.systemd:
name: "vikunja.service"
state: "started"
enabled: true
daemon_reload: true
scope: "user"

View File

@@ -12,6 +12,8 @@
- "vaultwarden"
- "gitea"
- "immich"
- "paperless"
- "vikunja"
- name: Create postgresql directory
ansible.builtin.file:

View File

@@ -30,6 +30,7 @@ define HOSTS4_INFRA = {{ hostvars['fw']['network4']['infra']['server'] }}
define HOSTS4_AUTH = {{ hostvars['fw']['network4']['auth']['server'] }}
define HOSTS4_APP = {{ hostvars['fw']['network4']['app']['server'] }}
define HOSTS4_NAS = {{ hostvars['fw']['network4']['nas']['client'] }}
define HOSTS4_PRINTER = {{ hostvars['fw']['network4']['printer']['client'] }}
define HOSTS6_FW = { {{ hostvars['fw']['network6']['firewall'].values() | join(', ') }} }
define HOSTS6_BLOCKY = {{ hostvars['fw']['network6']['blocky']['server'] }}
@@ -146,6 +147,8 @@ table inet filter {
# Kopia/NAS Console > NAS
oifname $IF_CLIENT ip saddr $HOSTS4_CONSOLE ip daddr $HOSTS4_NAS tcp dport { $PORTS_NAS, $PORTS_KOPIA } accept comment "allow ipv4 web connection (DSM, KOPIA): CONSOLE > FW > CLIENT NAS"
oifname $IF_CLIENT ip6 saddr $HOSTS6_CONSOLE ip6 daddr $HOSTS6_NAS tcp dport { $PORTS_NAS, $PORTS_KOPIA } accept comment "allow ipv6 web connection (DSM, KOPIA): CONSOLE > FW > CLIENT NAS"
# Printer
oifname $IF_CLIENT ip saddr $HOSTS4_CONSOLE ip daddr $HOSTS4_PRINTER accept comment "allow ipv4 printer connection: CONSOLE > FW > PRINTER"
iifname $IF_WAN jump wan comment "set WAN interface rules"
iifname $IF_CLIENT jump client comment "set CLIENT interface rules"

View File

@@ -116,6 +116,8 @@ postgresql:
vaultwarden: ENC[AES256_GCM,data:BPj5eFo54DTZ82n3yTIqEbm7kb/jWT0n2kZY//oV5q48eRch3C2RBuxn/Ko=,iv:DGC4ipHMyVs25gc4sNMt8LN1RsHjiR/b303vgiFoxMY=,tag:k1eb4DoRPLKvvMstSI1faQ==,type:str]
gitea: ENC[AES256_GCM,data:l+pBCzyQa3000SE9z1R4htD0V0ONsBtKy92dfgsVYsZ3XlEyVJDIBOsugwM=,iv:5t/oHW1vFAmV/s2Ze/cV9Vuqo96Qu6QvZeRbio7VX2s=,tag:4zeQaXiXIzBpy+tXsxmN7Q==,type:str]
immich: ENC[AES256_GCM,data:11jvxTKA/RL0DGL6y2/X092hnDohj6yTrYGK4IVojqBd1gCOBnDvUjgmx14=,iv:oBfHxsx9nxhyKY/WOuWfybxEX2bf+lHEtsaifFRS9lg=,tag:tAfkBdgQ8ZEkLIFcDICKDw==,type:str]
paperless: ENC[AES256_GCM,data:6VBrBbjVoam7SkZCSvoBTdrfkUoDghdGTiBmFLul04X/okXOHeC5zusJffY=,iv:iZumcJ3TWwZD77FzYx8THwCqC+EbnXUBrEKuPh3zgV8=,tag:u2m8SppAdxZ/duNdpuS3oQ==,type:str]
vikunja: ENC[AES256_GCM,data:/+wQdoFPTBG2elI9kZbAVWrHZ0DhMaYr4dc+2z9QNdb3TcDS2PEia0JuSAg=,iv:MViZTyUD8YqMmxSTWCQpJ30f/KQdQGOzPlRHHsQ8lAw=,tag:zov3POno139dkMxFDpj2gg==,type:str]
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
#
#
@@ -206,6 +208,34 @@ immich:
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
#
#
#ENC[AES256_GCM,data:bzMt0Ox0Za4dOhoo7S6dYCdK32JI9Q==,iv:PRTryIJk0tR545XY0LoHwklvsJp5+A5bEljNmzUvRhY=,tag:EVsjRUGMOadaNbMu0Xr4XA==,type:comment]
actualbudget:
oidc:
secret: ENC[AES256_GCM,data:TE2umZ9Vvr7cSfA2+TAfRadIWZN3hyOKQ6U9NqJFm5e9iiw1avI+QlnYcKI=,iv:rUWoclBRqh0tsGnMq29395Fn2NP7AXnSCd0s+S8jQ6I=,tag:qPX/TcdIo6BJeex7wmi02Q==,type:str]
hash: ENC[AES256_GCM,data:UjhNkGj+sxbnmPUx1V5kVYwZnzsB0aEvN8YV29lcvMbSnf9xpQWwD5C93Zu8SYrnS/p88qZpGBgAjr9Pcly3y0H1YMRt9zzbHZU3Uo0DPDrSWRQdeB/8LkcM/cwMAs8arS6PO03ECNnN5Z6aTmFdFnLjUkvUuSWMFscItAzMzhWCpeY=,iv:B06LI7Cq3NN8haOLfN3gWIpUFnvdUlq6D2XmARojDpk=,tag:MflE8qcY5j/aAA7xfPCqng==,type:str]
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
#
#
#ENC[AES256_GCM,data:McPUAbIUvtC1gdPaxTgAxAMCMWcLfg==,iv:Tp6idRf7he3sYzo8LW596C905JAaoTIhIoDUzSyRT0k=,tag:4mZQ0Swu1X9uuwjsRNhr2A==,type:comment]
paperless:
session_secret: ENC[AES256_GCM,data:siwCs2noeVpg9DCEZybnmo/oz11BdrHSTnHciMOu/6g=,iv:XVjhu10TIujIdUopN9+TVVqRade9EvItDWxym6YXnZs=,tag:TxLYm+4Bo7IMaTQBtMg9pQ==,type:str]
il:
password: ENC[AES256_GCM,data:9bJHf+chTg1rppgNVafNgEuvwQ69Gx+w5d65hu68q9XeeaVb2pO9HE4BOgg=,iv:1kaXBg/iOoIZxDjEVEdaMJLDtp6zQjep3vxLmIgQN5o=,tag:+MgX8Oa3tmhjx6u9aHkDfQ==,type:str]
oidc:
secret: ENC[AES256_GCM,data:wjRDVCJsINM4z5946a6uZD+6bhN5BChLMdRzgMEJFGRGFNcXd7A1p2Iqn4I=,iv:Y4QDA09L8ULKr4hhvoiduzCD8Hifo1gAnpzjCr8e520=,tag:R0RvGxYnXo3zwykXJykRug==,type:str]
hash: ENC[AES256_GCM,data:pali6WwPNhJA+6QL4O+tKv42PnpGqmojb8JQUZLqxGizv1bJSCgdUN8upCy5Ke0DYZs5P+JY5vh23xfMZFnHduGxGwOuPX6J5lYgvJRV58LqS3/+yIBBprTJyro3MwsurTTEWesgKMr8/2H9lirhaLjWUOSPxAmQ6e4wPNpHycDVyj4=,iv:cg2trI7t1MfIcMo1/M+IY6JEl2msDoKRGgAx/Y5nyGk=,tag:gnOq7sBq9z5zrRY0yhIabg==,type:str]
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
#
#
#ENC[AES256_GCM,data:V7DJHA2JQirfBsrCGhXrhg==,iv:+jYqX9hGNnuyYj9o9LpCYFVOoD6nSrtc4t40Ag0mMzo=,tag:1wSxKtkJm42reUxdwYDvlg==,type:comment]
vikunja:
session_secret: ENC[AES256_GCM,data:CMyw8JGHyTczGsrOJJwQBKfXMU4Sudvwkur1Lgx4o64=,iv:F2VmpqddiDT4jGaGDKGl6FARsQOt3lLz3X6TjC2MIVU=,tag:UJYyzrl/FX1BNwY4ROFncA==,type:str]
oidc:
secret: ENC[AES256_GCM,data:QwqndYsfr+fh9OLkHYtLYCa6WUdhnL7A4btz1d1eelTwq3Kps5S6BUN5qZg=,iv:51N8byIAAUh4ky7YBAuEJOBEWu1d9AX5W1m37/cLlCM=,tag:GD7jbxNGd748TCPgqsxyMg==,type:str]
hash: ENC[AES256_GCM,data:ORifyT4u1V2CyBCNBgF72wwS2i05mlzA4iIVEa1cH9aaE69PdiQvGGzMHK+tmlfpVaVQEENSt1QDUSSlMyeuZT/3a0JwAvlz+XDbpS7bicL2cB6DCa4JyEd/rbGRXs0/COfxPxXzYv7jq9gd2uSJ+cCGYb/93WuEXSEI6PHi+FF7N94=,iv:FVSGySa4YB2vwenqSagBzxeIexg91ewvcQMix+etmng=,tag:yyQtOgzOZypba+rV3A1K9g==,type:str]
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
#
#
#ENC[AES256_GCM,data:T4Wtn49AAxPd2QUFTR+q,iv:bH5goGWBDqumAat9dUv2OwfCUJUpuVqncTMqMBZUXhI=,tag:G+W6hHA+yftQ+4RJpXrxHg==,type:comment]
switch:
password: ENC[AES256_GCM,data:qu0f9L7A0eFq/UCpaRs=,iv:W8LLOp3MSfd/+EfNEZNf91K8GgI5eUfVPoWTRES2C0Y=,tag:Q5FlAOfwqwJwPvd7k6i+0g==,type:str]
@@ -235,7 +265,7 @@ sops:
UmliaFNxVTBqRkI1QWJpWGpTRWxETW8KEY/8AfU73UOzCGhny1cNnd5dCNv7bHXt
k+uyWPPi+enFkVaceSwMFrA66uaWWrwAj11sXEB7yzvGFPrnAGezjQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2026-03-21T00:50:58Z"
mac: ENC[AES256_GCM,data:xLYH+20TGYk0piWG7OaJqysuEc2xlqpKZcvCIKj9xOIgQIXVS8l5YXXAv6c4uen2cNe/0DIWs04Cb6cdItRWWq46jV3F6+u1BOy7mSmQ40nmbKCy+qls8TaYBeqhlrffpy5yYolDdztYqBjZYQDjY6rNXUIp7UU1VJEZkpY96lI=,iv:EZUezHsy6pghcWa/rq5CObaw3CRW7JJB5zdmCp6mIAA=,tag:JJVI0EDuA90uafbLwdn4ww==,type:str]
lastmodified: "2026-03-31T11:16:41Z"
mac: ENC[AES256_GCM,data:VsWpQ6epQ6ZnA3f2dn3pWqj18xkM3KNIkFC5oeG14QOdWi3c6YQXs+aIr69H15L1UUDen9g0tp165PVs191lECW8WzibZ3y5SfY8xGdXl6GeDDQ47fM059CEYnoIeN084+swCXW5aenmk2Mxmk00a6IX0XSIGB66SMB33w4cH0Q=,iv:t1omYq8SmOTeKHBoinfPZi+TBwGjTZ/23T6ZR5pmdmQ=,tag:1c7eL97pro1uK1QeNo9ePg==,type:str]
unencrypted_suffix: _unencrypted
version: 3.12.1

View File

@@ -0,0 +1,29 @@
[Quadlet]
DefaultDependencies=false
[Unit]
Description=Actual Budget
[Container]
Image=ghcr.io/actualbudget/actual-server:{{ version['containers']['actualbudget'] }}
ContainerName=actual-budget
HostName=actual-budget
PublishPort=5006:5006
Volume=%h/data/containers/actual-budget:/data:rw
Environment="TZ=Asia/Seoul"
Environment="ACTUAL_OPENID_DISCOVERY_URL=https://authelia.ilnmors.com/.well-known/openid-configuration"
Environment="ACTUAL_OPENID_CLIENT_ID=actual-budget"
Environment="ACTUAL_OPENID_SERVER_HOSTNAME=https://budget.ilnmors.com"
Environment="ACTUAL_OPENID_AUTH_METHOD=oauth2"
Secret=ACTUAL_OPENID_CLIENT_SECRET,type=env
[Service]
Restart=always
RestartSec=10s
TimeoutStopSec=120
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,59 @@
[Quadlet]
DefaultDependencies=false
[Unit]
Description=Paperless
After=redis_paperless.service
Wants=redis_paperless.service
[Container]
Image=ghcr.io/paperless-ngx/paperless-ngx:{{ version['containers']['paperless'] }}
ContainerName=paperless
HostName=paperless
PublishPort=8001:8000/tcp
# Volumes
Volume=%h/data/containers/paperless/data:/usr/src/paperless/data:rw
Volume=%h/data/containers/paperless/media:/usr/src/paperless/media:rw
Volume=%h/data/containers/paperless/consume:/usr/src/paperless/consume:rw
Volume=%h/containers/paperless/ssl:/etc/ssl/paperless:ro
# General
Environment="TZ=Asia/Seoul"
Environment="PAPERLESS_TIME_ZONE=Asia/Seoul"
Environment="PAPERLESS_URL=https://paperless.ilnmors.com"
Environment="PAPERLESS_OCR_LANGUAGE=kor+eng"
Environment="PAPERLESS_OCR_LANGUAGES=kor"
# Environment="PAPERLESS_OCR_MODE=force"
# Environment="PAPERLESS_TASK_WORKERS=1"
# Environment="PAPERLESS_THREADS_PER_WORKER=1"
Environment="PAPERLESS_WORKER_TIMEOUT=7200"
Secret=PAPERLESS_SECRET_KEY,type=env
# Redis
Environment="PAPERLESS_REDIS=redis://host.containers.internal:{{ hostvars['app']['redis']['paperless'] }}"
# Database
Environment="PAPERLESS_DBHOST={{ infra_uri['postgresql']['domain'] }}"
Environment="PAPERLESS_DBPORT={{ infra_uri['postgresql']['ports']['tcp'] }}"
Environment="PAPERLESS_DBNAME=paperless_db"
Environment="PAPERLESS_DBUSER=paperless"
Environment="PAPERLESS_DBSSLMODE=verify-full"
Environment="PAPERLESS_DBSSLROOTCERT=/etc/ssl/paperless/ilnmors_root_ca.crt"
Secret=PAPERLESS_DBPASS,type=env
# OIDC
Environment="PAPERLESS_APPS=allauth.socialaccount.providers.openid_connect"
Environment="PAPERLESS_SOCIAL_AUTO_SIGNUP=true"
Environment="PAPERLESS_SOCIALACCOUNT_ALLOW_SIGNUPS=true"
Secret=PAPERLESS_SOCIALACCOUNT_PROVIDERS,type=env
[Service]
ExecStartPre=/usr/bin/nc -zv {{ infra_uri['postgresql']['domain'] }} {{ infra_uri['postgresql']['ports']['tcp'] }}
Restart=always
RestartSec=10s
TimeoutStopSec=120
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,57 @@
[Quadlet]
DefaultDependencies=false
[Unit]
Description=Vikunja
After=network-online.target
Wants=network-online.target
[Container]
Image=docker.io/vikunja/vikunja:{{ version['containers']['vikunja'] }}
ContainerName=vikunja
HostName=vikunja
PublishPort=3456:3456/tcp
# Volumes
Volume=%h/data/containers/vikunja:/app/vikunja/files:rw
Volume=%h/containers/vikunja/ssl:/etc/ssl/vikunja:ro
# General
Environment="TZ=Asia/Seoul"
Environment="VIKUNJA_DEFAULTSETTINGS_TIMEZONE=Asia/Seoul"
Environment="VIKUNJA_SERVICE_TIMEZONE=Asia/Seoul"
Environment="VIKUNJA_SERVICE_PUBLICURL=https://vikunja.ilnmors.com"
Environment="VIKUNJA_SERVICE_ENABLEREGISTRATION=false"
Secret=VIKUNJA_SERVICE_JWTSECRET,type=env
# Database
Environment="VIKUNJA_DATABASE_TYPE=postgres"
Environment="VIKUNJA_DATABASE_HOST={{ infra_uri['postgresql']['domain'] }}"
Environment="VIKUNJA_DATABASE_USER=vikunja"
Environment="VIKUNJA_DATABASE_DATABASE=vikunja_db"
Environment="VIKUNJA_DATABASE_SSLMODE=verify-full"
Environment="VIKUNJA_DATABASE_SSLROOTCERT=/etc/ssl/vikunja/ilnmors_root_ca.crt"
Secret=VIKUNJA_DATABASE_PASSWORD,type=env
# OIDC
Environment="VIKUNJA_AUTH_OPENID_ENABLED=true"
Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_NAME=Authelia"
Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_AUTHURL=https://authelia.ilnmors.com"
Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_CLIENTID=vikunja"
# Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_SCOPE=" default value = openid email profile
# Vikunja doesn't support OIDC and local dual login.
# Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_USERNAMEFALLBACK=true"
# Environment="VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_EMAILFALLBACK=true"
Secret=VIKUNJA_AUTH_OPENID_PROVIDERS_authelia_CLIENTSECRET,type=env
[Service]
ExecStartPre=/usr/bin/nc -zv {{ infra_uri['postgresql']['domain'] }} {{ infra_uri['postgresql']['ports']['tcp'] }}
Restart=always
RestartSec=10s
TimeoutStopSec=120
[Install]
WantedBy=default.target

View File

@@ -175,3 +175,68 @@ identity_providers:
access_token_signed_response_alg: 'none'
userinfo_signed_response_alg: 'none'
token_endpoint_auth_method: 'client_secret_post'
# https://www.authelia.com/integration/openid-connect/clients/actual-budget/
- client_id: 'actual-budget'
client_name: 'Actual Budget'
client_secret: '{{ hostvars['console']['actualbudget']['oidc']['hash'] }}'
public: false
authorization_policy: 'one_factor'
require_pkce: false
pkce_challenge_method: ''
redirect_uris:
- 'https://budget.ilnmors.com/openid/callback'
scopes:
- 'openid'
- 'profile'
- 'groups'
- 'email'
response_types:
- 'code'
grant_types:
- 'authorization_code'
access_token_signed_response_alg: 'none'
userinfo_signed_response_alg: 'none'
token_endpoint_auth_method: 'client_secret_basic'
# https://www.authelia.com/integration/openid-connect/clients/paperless/
- client_id: 'paperless'
client_name: 'Paperless'
client_secret: '{{ hostvars['console']['paperless']['oidc']['hash'] }}'
public: false
authorization_policy: 'one_factor'
require_pkce: true
pkce_challenge_method: 'S256'
redirect_uris:
- 'https://paperless.ilnmors.com/accounts/oidc/authelia/login/callback/'
scopes:
- 'openid'
- 'profile'
- 'email'
- 'groups'
response_types:
- 'code'
grant_types:
- 'authorization_code'
access_token_signed_response_alg: 'none'
userinfo_signed_response_alg: 'none'
token_endpoint_auth_method: 'client_secret_post'
# https://www.authelia.com/integration/openid-connect/clients/vikunja/
- client_id: 'vikunja'
client_name: 'Vikunja'
client_secret: '{{ hostvars['console']['vikunja']['oidc']['hash'] }}'
public: false
authorization_policy: 'one_factor'
require_pkce: false
pkce_challenge_method: ''
redirect_uris:
- 'https://vikunja.ilnmors.com/auth/openid/authelia'
scopes:
- 'openid'
- 'profile'
- 'email'
response_types:
- 'code'
grant_types:
- 'authorization_code'
access_token_signed_response_alg: 'none'
userinfo_signed_response_alg: 'none'
token_endpoint_auth_method: 'client_secret_basic'

View File

@@ -15,6 +15,7 @@
key_alg hmac-sha256
key "{file./run/secrets/CADDY_ACME_KEY}"
}
resolvers {{ infra_uri['bind']['domain'] }}
}
}
}
@@ -46,3 +47,21 @@ immich.app.ilnmors.internal {
header_up Host {http.request.header.X-Forwarded-Host}
}
}
budget.app.ilnmors.internal {
import private_tls
reverse_proxy host.containers.internal:5006 {
header_up Host {http.request.header.X-Forwarded-Host}
}
}
paperless.app.ilnmors.internal {
import private_tls
reverse_proxy host.containers.internal:8001 {
header_up Host {http.request.header.X-Forwarded-Host}
}
}
vikunja.app.ilnmors.internal {
import private_tls
reverse_proxy host.containers.internal:3456 {
header_up Host {http.request.header.X-Forwarded-Host}
}
}

View File

@@ -29,6 +29,7 @@
key_alg hmac-sha256
key "{file./run/secrets/CADDY_ACME_KEY}"
}
resolvers {{ infra_uri['bind']['domain'] }}
}
}
}
@@ -90,6 +91,33 @@ immich.ilnmors.com {
}
}
}
budget.ilnmors.com {
import crowdsec_log
route {
crowdsec
reverse_proxy https://budget.app.ilnmors.internal {
header_up Host {http.reverse_proxy.upstream.host}
}
}
}
paperless.ilnmors.com {
import crowdsec_log
route {
crowdsec
reverse_proxy https://paperless.app.ilnmors.internal {
header_up Host {http.reverse_proxy.upstream.host}
}
}
}
vikunja.ilnmors.com {
import crowdsec_log
route {
crowdsec
reverse_proxy https://vikunja.app.ilnmors.internal {
header_up HOST {http.reverse_proxy.upstream.host}
}
}
}
# Internal domain
auth.ilnmors.internal {

View File

@@ -9,6 +9,7 @@
key_alg hmac-sha256
key "{file./run/secrets/CADDY_ACME_KEY}"
}
resolvers {{ infra_uri['bind']['domain'] }}
}
}
}

View File

@@ -1,11 +1,19 @@
name: crowdsecurity/whitelists
description: "Whitelist console/admin hosts only"
description: "Local whitelist policy"
whitelist:
reason: "trusted admin hosts"
reason: "rules"
ip:
# Console IP lists
- "127.0.0.1"
- "::1"
- "{{ hostvars['fw']['network4']['console']['client'] }}"
- "{{ hostvars['fw']['network4']['console']['wg'] }}"
- "{{ hostvars['fw']['network6']['console']['client'] }}"
- "{{ hostvars['fw']['network6']['console']['wg'] }}"
{% if node['name'] == 'auth' %}
expression:
# budget local-first sql scrap rule
- "evt.Meta.target_fqdn == 'budget.ilnmors.com' && evt.Meta.http_path contains '/data/migrations/'"
# immich thumbnail request 404 error false positive
- "evt.Meta.target_fqdn == 'immich.ilnmors.com' && evt.Meta.http_path contains '/api/assets/' && evt.Meta.http_path contains '/thumbnail'"
{% endif %}

View File

@@ -0,0 +1,22 @@
# Actual budget
## Prerequisite
### Create oidc secret and hash
- Create the secret with `openssl rand -base64 32`
- access to auth vm
- `podman exec -it authelia sh`
- `authelia crypto hash generate pbkdf2 --password 'actualbudget.oidc.secret'`
- Save this value in secrets.yaml in `actualbudget.oidc.secret` and `actualbudget.oidc.hash`
## Configuration
### Initialization
- Use current domain
- ok
- Start Using OpenID
- Start fresh
- Server Online: User directory: Add User: the user name which is defined on LDAP
- Server Online: User Access: enable user

View File

@@ -33,7 +33,7 @@ CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE;
- Create the secret with `openssl rand -base64 32`
- Save this value in secrets.yaml in `immich.il.password`
-
### Add postgresql dump backup list
- [set_postgresql.yaml](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)

View File

@@ -0,0 +1,116 @@
# paperless
## Prerequisite
### Create database
- Create the password with `openssl rand -base64 32`
- Save this value in secrets.yaml in `postgresql.password.paperless`
- Access infra server to create paperless_db with `podman exec -it postgresql psql -U postgres`
```SQL
CREATE USER paperless WITH PASSWORD 'postgresql.password.paperless';
CREATE DATABASE paperless_db;
ALTER DATABASE paperless_db OWNER TO paperless;
```
### Create oidc secret and hash
- Create the secret with `openssl rand -base64 32`
- access to auth vm
- `podman exec -it authelia sh`
- `authelia crypto hash generate pbkdf2 --password 'paperless.oidc.secret'`
- Save this value in secrets.yaml in `paperless.oidc.secret` and `paperless.oidc.hash`
- Use `client_secret_post`, django encodes the secret value wrong frequently.
### Create session secret value
- Create the secret with `LC_ALL=C tr -dc 'A-Za-z0-9!#%&()*+,-./:;<=>?@[\]^_{|}~' </dev/urandom | head -c 32`
- Save this value in secrets.yaml in `paperless.session_secret`
### Create admin password
- Create the secret with `openssl rand -base64 32`
- Save this value in secrets.yaml in `paperless.il.password`
### Add postgresql dump backup list
- [set_postgresql.yaml](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)
```yaml
- name: Set connected services list
ansible.builtin.set_fact:
connected_services:
- ...
- "paperless"
```
## Configuration
### Access to paperless
- https://paperless.ilnmors.com
- name: il
- E-mail: il@ilnmors.internal
- password: `paperless.il.password`
### Oauth configuration
- My Profiles: Connect new social account: Authelia
- Continue
- Login with Authelia
### OCR configuration
- Configuration: OCR settings
- Output Type: pdfa
- Mode: skip
- When the archive file has broken ocr text, then conduct replcae command manually
- Skip archive File: never
- Deskew: disable \(toggle to enable and once more to active disable option\)
- rotate: disable \(toggle to enable and once more to active disable option\)
## The non-standard pdf file
- Some pdf files doesn't follow the standard, for example korean court or government pdf files.
- Before upload this kind of non-standard pdf files, convert it first.
- This process uses ghostscript and powershell in Windows for console
```PowerShell
# 1. The engine
$gsPath = "C:\Program Files\gs\gs10.07.0\bin\gswin64c.exe"
# 2. new folder which the converted file will be stored
$outputDirName = "converted_pdfs"
$outputDir = Join-Path (Get-Location) $outputDirName
if (!(Test-Path $outputDir)) { New-Item -ItemType Directory -Path $outputDir }
# 3. Find all pdf files
$files = Get-ChildItem -Filter *.pdf
foreach ($file in $files) {
if ($file.FullName -like "*$outputDirName*") { continue }
$inputPath = $file.FullName
$outputPath = Join-Path $outputDir $file.Name
Write-Host "convert: $($file.Name)" -ForegroundColor Cyan
$gsArgs = @(
"-sDEVICE=pdfwrite",
"-dCompatibilityLevel=1.4",
"-dPDFSETTINGS=/default",
"-dNOPAUSE",
"-dQUIET",
"-dBATCH",
"-dNoOutputFonts", # Change all text as image
"-sOutputFile=$outputPath",
"$inputPath"
)
# 실행
& $gsPath @gsArgs
}
Write-Host "`n[Complete] All file is stored in '$outputDirName'." -ForegroundColor Green
```

View File

@@ -0,0 +1,62 @@
# vikunja
## Prerequisite
### Create database
- Create the password with `openssl rand -base64 32`
- Save this value in secrets.yaml in `postgresql.password.vikunja`
- Access infra server to create vikunja_db with `podman exec -it postgresql psql -U postgres`
```SQL
CREATE USER vikunja WITH PASSWORD 'postgresql.password.vikunja';
CREATE DATABASE vikunja_db;
ALTER DATABASE vikunja_db OWNER TO vikunja;
```
### Create oidc secret and hash
- Create the secret with `openssl rand -base64 32`
- access to auth vm
- `podman exec -it authelia sh`
- `authelia crypto hash generate pbkdf2 --password 'vikunja.oidc.secret'`
- Save this value in secrets.yaml in `vikunja.oidc.secret` and `vikunja.oidc.hash`
### Create session secret value
- Create the secret with `LC_ALL=C tr -dc 'A-Za-z0-9!#%&()*+,-./:;<=>?@[\]^_{|}~' </dev/urandom | head -c 32`
- Save this value in secrets.yaml in `vikunja.session_secret`
### Add postgresql dump backup list
- [set_postgresql.yaml](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)
```yaml
- name: Set connected services list
ansible.builtin.set_fact:
connected_services:
- ...
- "vikunja"
```
## Configuration
- !NOTE!
- vikunja doesn't support local + oidc dual login environment. Don't use local account.
- Just use oidc login.
- ignore process below.
### Create local account
- Access to app vm via ssh
```bash
ssh app
podman exec -it vikunja /app/vikunja/vikunja user create --email il@ilnmors.internal --username il
# Enter Password: vikunja.il.password
# Confirm Password: vikunja.il.password
```
- https://vikunja.ilnmors.com
- Try to login locally
- Try to login via Authelia

View File

@@ -228,6 +228,11 @@ auth@auth:~$ sudo cscli alerts list
│ 9 │ Ip:138.68.144.227 │ crowdsecurity/jira_cve-2021-26086 │ │ │ ban:1 │ 2026-03-06 04:18:18.35776077 +0000 UTC │
╰────┴────────────────────┴───────────────────────────────────┴─────────┴────┴───────────┴─────────────────────────────────────────╯
## Log check and inspect
fw@fw:~$ sudo cscli alerts inspect 230 -d
- check the log and analyze and make expression
- e.g. immich
- evt.Meta.target_fqdn == 'immich.ilnmors.com' && evt.Meta.http_path contains '/api/assets/' && evt.Meta.http_path contains '/thumbnail'

View File

@@ -74,17 +74,16 @@
- [x] Prometheus \(alloy - push\)
- [x] Loki \(alloy\)
- [x] Grafana
<!--
<!--
Mail service is not needed, especially Diun is not needed.
- Postfix
- Dovecot
- mbsync
- Diun
-->
- Study \(Rootless container\):
- Kali
- Debian
-->
## auth \(Authorization\)
@@ -115,30 +114,30 @@
- Disk: SATA Controller
- Services:
- OIDC native services:
- [x] Vaultwarden
- [x] Gitea
- [x] Immich
- [x] Actual budget
- [x] Paperless-ngx
- [x] vikunja
- OpenCloud \(with Radicale, Collabora Web Office\)
- Vikunja \(with CalDAV\)
- Gitea
- Outline
- Wiki.js
- WriteFreely
- Immich
- MediaCMS
- Funkwhale
- Kavita
- Audiobookshelf
- we-promise/sure - budget
- Paperless-ngx
- Miniflux
- Linkwarden
- Ralph
- Conduit
- SnappyMail
- Vaultwarden
<!--
<!--
- n8n
-->
- Forward_auth
- Homepage
-->
## External Backup server