Segfault when running on VPS

I can run the official release binary on Arch Linux on my laptop, no problems. When I run on either of my two Arch KVM VPSes (on different providers in different countries) “config start” and “keys generate” work fine but “serve” segfaults. Both VPSes have 1G RAM - not a lot but a lot more than it’s reported as using on my laptop. Any ideas what’s wrong?

[blog@hilly writefreely]$ ./writefreely serve
2023/01/15 18:09:31 Starting WriteFreely 0.13.2...
2023/01/15 18:09:31 Loading config.ini configuration...
2023/01/15 18:09:31 Loading templates...
2023/01/15 18:09:31 Loading pages...
2023/01/15 18:09:31 Loading user pages...
2023/01/15 18:09:31 Loading encryption keys...
2023/01/15 18:09:31 Connecting to sqlite3 database...
2023/01/15 18:09:31 Adding {domain} routes (single user)...
2023/01/15 18:09:31 Going to serve...
2023/01/15 18:09:31 Serving on http://localhost:8080
2023/01/15 18:09:31 ---
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1d94a0 pc=0x7f86e559a9c6]

runtime stack:
runtime.throw({0x164cafe?, 0x353?})
        /usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7f86e71f5fc8 sp=0x7f86e71f5f98 pc=0x43859d
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:819 +0x369 fp=0x7f86e71f6018 sp=0x7f86e71f5fc8 pc=0x44e249

goroutine 238 [syscall]:
runtime.cgocall(0x1334f30, 0xc0007c9d98)
        /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0007c9d70 sp=0xc0007c9d38 pc=0x405bfc
net._C2func_getaddrinfo(0xc00090d3a0, 0x0, 0xc0009075c0, 0xc00084af60)
        _cgo_gotypes.go:94 +0x56 fp=0xc0007c9d98 sp=0xc0007c9d70 pc=0x679e96
net.cgoLookupIPCNAME.func1({0xc00090d3a0, 0x7d00000004?, 0xc0007c9e30?}, 0xc00090d1f0?, 0xc000048800?)
        /usr/local/go/src/net/cgo_unix.go:160 +0x9f fp=0xc0007c9df0 sp=0xc0007c9d98 pc=0x67b73f
net.cgoLookupIPCNAME({0x1620523, 0x3}, {0xc00090d1f0, 0x9})
        /usr/local/go/src/net/cgo_unix.go:160 +0x173 fp=0xc0007c9f38 sp=0xc0007c9df0 pc=0x67af93
net.cgoIPLookup(0x503f65?, {0x1620523?, 0xc0007c9fd0?}, {0xc00090d1f0?, 0xc000381950?})
        /usr/local/go/src/net/cgo_unix.go:217 +0x3b fp=0xc0007c9fa8 sp=0xc0007c9f38 pc=0x67b7fb
net.cgoLookupIP.func1()
        /usr/local/go/src/net/cgo_unix.go:227 +0x36 fp=0xc0007c9fe0 sp=0xc0007c9fa8 pc=0x67bc36
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0007c9fe8 sp=0xc0007c9fe0 pc=0x4691a1
created by net.cgoLookupIP
        /usr/local/go/src/net/cgo_unix.go:227 +0x12a

goroutine 1 [select]:
runtime.gopark(0xc000491580?, 0x2?, 0xdf?, 0xf4?, 0xc0004914c4?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000491300 sp=0xc0004912e0 pc=0x43b1b6
runtime.selectgo(0xc000491580, 0xc0004914c0, 0xd?, 0x0, 0x10842108421084?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x7bc fp=0xc000491440 sp=0xc000491300 pc=0x44a61c
net.(*Resolver).lookupIPAddr(0x2197460, {0x17a41f0?, 0xc000028080}, {0x1620523, 0x3}, {0xc00090d1f0, 0x9})
        /usr/local/go/src/net/lookup.go:327 +0x51b fp=0xc000491650 sp=0xc000491440 pc=0x6691db
net.(*Resolver).internetAddrList(0x17a41f0?, {0x17a41f0?, 0xc000028080?}, {0x1620523, 0x3}, {0xc00090d1f0?, 0xe?})
        /usr/local/go/src/net/ipsock.go:288 +0x67a fp=0xc000491770 sp=0xc000491650 pc=0x666fda
net.(*Resolver).resolveAddrList(0x18?, {0x17a41f0, 0xc000028080}, {0x16241e7, 0x6}, {0x1620523?, 0x0?}, {0xc00090d1f0, 0xe}, {0x0, ...})
        /usr/local/go/src/net/dial.go:222 +0x41b fp=0xc000491878 sp=0xc000491770 pc=0x65195b
net.(*ListenConfig).Listen(0xc0004919a0, {0x17a41f0, 0xc000028080}, {0x1620523, 0x3}, {0xc00090d1f0, 0xe})
        /usr/local/go/src/net/dial.go:625 +0x8a fp=0xc000491968 sp=0xc000491878 pc=0x65496a
net.Listen({0x1620523?, 0xe8?}, {0xc00090d1f0?, 0xc00007e401?})
        /usr/local/go/src/net/dial.go:711 +0x4b fp=0xc0004919c0 sp=0xc000491968 pc=0x65550b
net/http.(*Server).ListenAndServe(0xc00088a690)
        /usr/local/go/src/net/http/server.go:2995 +0x58 fp=0xc0004919f0 sp=0xc0004919c0 pc=0x7660f8
net/http.ListenAndServe(...)
        /usr/local/go/src/net/http/server.go:3255
github.com/writefreely/writefreely.Serve(0xc0000664e0, 0xc0001c0000)
        /home/matt/projects/go/src/github.com/writefreely/writefreely/app.go:508 +0xb12 fp=0xc000491b70 sp=0xc0004919f0 pc=0x11eeef2
main.serveAction(0x21321c0?)
        /home/matt/projects/go/src/github.com/writefreely/writefreely/cmd/writefreely/web.go:45 +0x185 fp=0xc000491bf8 sp=0xc000491b70 pc=0x126c8e5
github.com/urfave/cli/v2.(*Command).Run(0x21321c0, 0xc00046bc00)
        /home/matt/projects/go/pkg/mod/github.com/urfave/cli/v2@v2.5.1/command.go:163 +0x5dc fp=0xc000491d08 sp=0xc000491bf8 pc=0x5816fc
github.com/urfave/cli/v2.(*App).RunContext(0xc0000b3380, {0x17a41f0?, 0xc000028080}, {0xc000024040, 0x2, 0x2})
        /home/matt/projects/go/pkg/mod/github.com/urfave/cli/v2@v2.5.1/app.go:313 +0xb7d fp=0xc000491e98 sp=0xc000491d08 pc=0x57ee3d
github.com/urfave/cli/v2.(*App).Run(...)
        /home/matt/projects/go/pkg/mod/github.com/urfave/cli/v2@v2.5.1/app.go:224
main.main()
        /home/matt/projects/go/src/github.com/writefreely/writefreely/cmd/writefreely/main.go:118 +0x7dc fp=0xc000491f80 sp=0xc000491e98 pc=0x126bcfc
runtime.main()
        /usr/local/go/src/runtime/proc.go:250 +0x212 fp=0xc000491fe0 sp=0xc000491f80 pc=0x43adf2
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000491fe8 sp=0xc000491fe0 pc=0x4691a1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000044fb0 sp=0xc000044f90 pc=0x43b1b6
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.forcegchelper()
        /usr/local/go/src/runtime/proc.go:302 +0xad fp=0xc000044fe0 sp=0xc000044fb0 pc=0x43b04d
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000044fe8 sp=0xc000044fe0 pc=0x4691a1
created by runtime.init.6
        /usr/local/go/src/runtime/proc.go:290 +0x25

goroutine 3 [runnable]:
runtime.Gosched(...)
        /usr/local/go/src/runtime/proc.go:318
runtime.bgsweep(0x0?)
        /usr/local/go/src/runtime/mgcsweep.go:283 +0xfc fp=0xc0000457c8 sp=0xc000045790 pc=0x426d5c
runtime.gcenable.func1()
        /usr/local/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000457e0 sp=0xc0000457c8 pc=0x41b9a6
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000457e8 sp=0xc0000457e0 pc=0x4691a1
created by runtime.gcenable
        /usr/local/go/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000030070?, 0x179d6b0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000045f70 sp=0xc000045f50 pc=0x43b1b6
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x2198260)
        /usr/local/go/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000045fa0 sp=0xc000045f70 pc=0x424d93
runtime.bgscavenge(0x0?)
        /usr/local/go/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc000045fc8 sp=0xc000045fa0 pc=0x425385
runtime.gcenable.func2()
        /usr/local/go/src/runtime/mgc.go:179 +0x26 fp=0xc000045fe0 sp=0xc000045fc8 pc=0x41b946
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000045fe8 sp=0xc000045fe0 pc=0x4691a1
created by runtime.gcenable
        /usr/local/go/src/runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x2198d40?, 0xc000007860?, 0x0?, 0x0?, 0xc000044770?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000044628 sp=0xc000044608 pc=0x43b1b6
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.runfinq()
        /usr/local/go/src/runtime/mfinal.go:180 +0x10f fp=0xc0000447e0 sp=0xc000044628 pc=0x41aaaf
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000447e8 sp=0xc0000447e0 pc=0x4691a1
created by runtime.createfing
        /usr/local/go/src/runtime/mfinal.go:157 +0x45

goroutine 6 [GC worker (idle)]:
runtime.gopark(0x7cd804b6c30b?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000046750 sp=0xc000046730 pc=0x43b1b6
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000467e0 sp=0xc000046750 pc=0x41daf1
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000467e8 sp=0xc0000467e0 pc=0x4691a1
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 235 [syscall]:
runtime.notetsleepg(0x4421a5?, 0x503f65?)
        /usr/local/go/src/runtime/lock_futex.go:236 +0x34 fp=0xc00056ffa0 sp=0xc00056ff68 pc=0x40dff4
os/signal.signal_recv()
        /usr/local/go/src/runtime/sigqueue.go:152 +0x2f fp=0xc00056ffc0 sp=0xc00056ffa0 pc=0x465b8f
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:23 +0x19 fp=0xc00056ffe0 sp=0xc00056ffc0 pc=0x7fa759
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00056ffe8 sp=0xc00056ffe0 pc=0x4691a1
created by os/signal.Notify.func1.1
        /usr/local/go/src/os/signal/signal.go:151 +0x2a

goroutine 234 [runnable, locked to thread]:
runtime.gopark(0x1?, 0x2?, 0x40?, 0x57?, 0xc0005706e8?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc0005706a0 sp=0xc000570680 pc=0x43b1b6
runtime.chansend(0xc0008d8360, 0xc00057078f, 0x1, 0x2?)
        /usr/local/go/src/runtime/chan.go:259 +0x42c fp=0xc000570728 sp=0xc0005706a0 pc=0x407dec
runtime.chansend1(0xc000000002?, 0xc000570798?)
        /usr/local/go/src/runtime/chan.go:145 +0x1d fp=0xc000570758 sp=0xc000570728 pc=0x40799d
runtime.ensureSigM.func1()
        /usr/local/go/src/runtime/signal_unix.go:1002 +0x15a fp=0xc0005707e0 sp=0xc000570758 pc=0x44e69a
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0005707e8 sp=0xc0005707e0 pc=0x4691a1
created by runtime.ensureSigM
        /usr/local/go/src/runtime/signal_unix.go:974 +0xbd

goroutine 236 [runnable]:
github.com/writefreely/writefreely.Serve.func1()
        /home/matt/projects/go/src/github.com/writefreely/writefreely/app.go:436 fp=0xc000570fe0 sp=0xc000570fd8 pc=0x11ef420
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000570fe8 sp=0xc000570fe0 pc=0x4691a1
created by github.com/writefreely/writefreely.Serve
        /home/matt/projects/go/src/github.com/writefreely/writefreely/app.go:436 +0x16a

goroutine 237 [select]:
runtime.gopark(0xc000055c28?, 0x2?, 0x0?, 0x30?, 0xc000055c0c?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000055a98 sp=0xc000055a78 pc=0x43b1b6
runtime.selectgo(0xc000055c28, 0xc000055c08, 0x0?, 0x0, 0xc000914640?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x7bc fp=0xc000055bd8 sp=0xc000055a98 pc=0x44a61c
net.cgoLookupIP({0x17a41b8, 0xc000908580}, {0x1620523, 0x3}, {0xc00090d1f0, 0x9})
        /usr/local/go/src/net/cgo_unix.go:228 +0x1aa fp=0xc000055cc8 sp=0xc000055bd8 pc=0x67ba4a
net.(*Resolver).lookupIP(0x2197460, {0x17a41b8, 0xc000908580}, {0x1620523, 0x3}, {0xc00090d1f0, 0x9})
        /usr/local/go/src/net/lookup_unix.go:74 +0x128 fp=0xc000055e18 sp=0xc000055cc8 pc=0x66a608
net.(*Resolver).lookupIP-fm({0x17a41b8?, 0xc000908580?}, {0x1620523?, 0xc0007aafc0?}, {0xc00090d1f0?, 0xc000743ba0?})
        <autogenerated>:1 +0x5b fp=0xc000055e60 sp=0xc000055e18 pc=0x67ec7b
net.glob..func1({0x17a41b8?, 0xc000908580?}, 0x3?, {0x1620523?, 0x40799d?}, {0xc00090d1f0?, 0xc000571778?})
        /usr/local/go/src/net/hook.go:23 +0x3d fp=0xc000055ea0 sp=0xc000055e60 pc=0x65ebdd
net.(*Resolver).lookupIPAddr.func1()
        /usr/local/go/src/net/lookup.go:321 +0x9f fp=0xc000055f38 sp=0xc000055ea0 pc=0x669a7f
internal/singleflight.(*Group).doCall(0x2197470, 0xc0008f8dc0, {0xc00090d200, 0xd}, 0xc0003819e0?)
        /usr/local/go/src/internal/singleflight/singleflight.go:95 +0x3b fp=0xc000055fa8 sp=0xc000055f38 pc=0x64dbfb
internal/singleflight.(*Group).DoChan.func1()
        /usr/local/go/src/internal/singleflight/singleflight.go:88 +0x36 fp=0xc000055fe0 sp=0xc000055fa8 pc=0x64db96
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0x4691a1
created by internal/singleflight.(*Group).DoChan
        /usr/local/go/src/internal/singleflight/singleflight.go:88 +0x315

goroutine 228 [select]:
runtime.gopark(0xc0007cb788?, 0x2?, 0x78?, 0xb7?, 0xc0007cb784?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc0007cb610 sp=0xc0007cb5f0 pc=0x43b1b6
runtime.selectgo(0xc0007cb788, 0xc0007cb780, 0xc0007cb7a0?, 0x0, 0x73?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x7bc fp=0xc0007cb750 sp=0xc0007cb610 pc=0x44a61c
database/sql.(*DB).connectionOpener(0xc0004d8d00, {0x17a41b8, 0xc00087b500})
        /usr/local/go/src/database/sql/sql.go:1224 +0x8d fp=0xc0007cb7b8 sp=0xc0007cb750 pc=0x7c7e6d
database/sql.OpenDB.func1()
        /usr/local/go/src/database/sql/sql.go:792 +0x2e fp=0xc0007cb7e0 sp=0xc0007cb7b8 pc=0x7c624e
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0007cb7e8 sp=0xc0007cb7e0 pc=0x4691a1
created by database/sql.OpenDB
        /usr/local/go/src/database/sql/sql.go:792 +0x18d