local.yaml - selfhost - Incus configurations for my self-hosted setup.
(HTM) git clone git://jay.scot/selfhost
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
local.yaml (1620B)
---
1 devices:
2 dashboard:
3 path: /srv/www/dashboard
4 source: /srv/services/static/dashboard
5 type: disk
6
7 docs:
8 path: /srv/www/docs
9 source: /srv/services/static/docs
10 type: disk
11
12 feeds:
13 path: /srv/www/feeds
14 source: /srv/services/static/feeds
15 type: disk
16
17 git:
18 path: /srv/www/git
19 source: /srv/services/static/git
20 type: disk
21
22 certs:
23 path: /etc/lighttpd/certs
24 source: /srv/certs
25 type: disk
26 shift: true
27
28 config:
29 cloud-init.network-config: |
30 version: 2
31 ethernets:
32 eth0:
33 addresses:
34 - 192.168.2.11/24
35 gateway4: 192.168.2.1
36 cloud-init.user-data: |
37 #cloud-config
38 package_upgrade: true
39 hostname: local.jay.scot
40 timezone: Europe/London
41 manage_resolv_conf: true
42 resolv_conf:
43 nameservers: ['192.168.2.10', '1.1.1.1']
44 packages:
45 - lighttpd
46 runcmd:
47 - rc-service lighttpd start
48 write_files:
49 - path: /etc/lighttpd/lighttpd.conf
50 defer: true
51 append: true
52 content: |
53
54 server.modules += ( "mod_redirect", "mod_openssl")
55
56 ssl.engine = "enable"
57 ssl.pemfile = "/etc/lighttpd/certs/jay.scot.cer"
58 ssl.privkey = "/etc/lighttpd/certs/jay.scot.key"
59 ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.3", "Options" => "-ServerPreference")
60
61 $HTTP["host"] == "local.jay.scot" {
62 server.document-root = "/srv/www"
63 }
64
65 $HTTP["scheme"] == "http" {
66 $HTTP["host"] =~ ".*" {
67 url.redirect = (".*" => "https://%0$0")
68 }
69 }