Reverse proxy... first installation, almost working

Hi.
Sorry to ask this.
I try this command:

caddy reverse-proxy --from trilium.xxxxxxx.xyz --to 192.168.0.10:8080

And is working perfect i could go to there, is https! all perfect but…
how i make this permanent?
if i just Ctrl+c the caddy stop and nothing is saved.

So, how i need to write the config file to reference that info?

Thanks

I have no idea what platform you’re on, but install Caddy from your package manager: Install — Caddy Documentation

Most of those, like apt or yum install methods will set up a system service for you. Then just modify the config:

trilium.xxxxxxx.xyz

reverse_proxy 192.168.0.10:8080

That’s it.

1 Like

oh, sorry.
Yes, im in Proxmox, inside a lxc with Alpine.

caddy:~# cat /etc/caddy/Caddyfile

Caddy’s configuration file

see: The Caddyfile — Caddy Documentation

caddy:~#

What i dont know is how write the file to save the config info.
I mean like in Nginx.conf that i made
{server name trilium.xxxxxxxxx.xyz
etc…
192.168.0.10:8000
etc…
}

Thanks

i suppose that i have to put that kind of info in caddyfile but i dont know how is the format, syntaxis

Start here to learn how the Caddyfile works:

What Matt gave you above is literally a valid Caddyfile.

2 Likes

yep, sorry!
i was just thinking that maybe that was a content, i just came here to copy/paste and try… and found your message! lol

but… it is so weird that with just that all is working¡?¡?¡? but it is.
Thanks!

1 Like