Unable to access Foundry server through domain name

1. The problem I’m having:

I’m trying to self host a FoundryVTT server from an old Dell Optilex-3010 that I moved to Ubuntu 24.04.2 LTS. I plan on keeping it running in a closet or somewhere so that my players can access it whenever. I moved it over specifically for this purpose, so it should be a clean install. I followed this guide, which was executed without issue (multiple steps have now been re-executed in failed troubleshooting attempts). The only additional software I installed was Docker, but that was when I was following a different guide. I do not plan on using it.

I can access the server through localhost and by my direct IP, but I cannot access it through the domain name I created on DuckDNS, TheRedCity.duckdns.org. Trying to go through that domain I get connection timed out errors. When double checking the various services used to set everything up (Node.JS, FoundryVTT, pm2, Caddy, unzip, nano, DuckDNS) I saw sudo service caddy status return the following:

2. Error messages and/or full log output:

 caddy.service - Caddy
     Loaded: loaded (/usr/lib/systemd/system/caddy.service; enabled; preset: enable>
     Active: active (running) since Sun 2025-07-20 09:20:57 PDT; 1h 13min ago
       Docs: https://caddyserver.com/docs/
   Main PID: 29564 (caddy)
      Tasks: 10 (limit: 4486)
     Memory: 22.2M (peak: 24.6M)
        CPU: 3.727s
     CGroup: /system.slice/caddy.service
             └─29564 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile

Jul 20 10:26:59 yisun-OptiPlex-3010 caddy[29564]: {"level":"info","ts":1753032419.0>
Jul 20 10:26:59 yisun-OptiPlex-3010 caddy[29564]: {"level":"info","ts":1753032419.1>
Jul 20 10:26:59 yisun-OptiPlex-3010 caddy[29564]: {"level":"info","ts":1753032419.6>
Jul 20 10:27:19 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032439.>
Jul 20 10:27:19 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032439.>
Jul 20 10:27:21 yisun-OptiPlex-3010 caddy[29564]: {"level":"info","ts":1753032441.0>
Jul 20 10:27:41 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032461.>
Jul 20 10:27:41 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032461.>
Jul 20 10:27:41 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032461.>
Jul 20 10:27:41 yisun-OptiPlex-3010 caddy[29564]: {"level":"error","ts":1753032461.>
~

The ““level”:“error”,“ts”:…” lines are what concern me here. Does that mean the client isn’t being passed through due to some caddy glitch?

$ journalctl -u caddy --no-pager | less +G`

returns nothing, just a prompt for more entries (at least, that’s what I’m guessing it is): “>”. I am not sure if these are the correct “error logs” or not, as the results are the same regardless of debug being listed in the caddy file as shown in the example from the hidden section header.

3. Caddy version:

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=
(found with caddy version, not the Docker command)

4. How I installed and ran Caddy:

I installed and ran Caddy exactly as described in the guide linked earlier. That is, after doing the same for Node.js, I added the caddy repository to the system package manager:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list

then I installed caddy (at the same time as nodejs, unzip, and nano):

sudo apt update
sudo apt install nodejs caddy unzip nano -y

Then I installed and started pm2 after checking that node and npm were the correct versions. I also enabled pm2 as its startup output described.

a. System environment:

OS: Ubuntu 24.04.2 LTS, 64-bit, firmware version A09, Gnome version 46
Kernel: Linux 6.14.0-24-generic

Docker is installed but not being used (since I’m only running foundry, I didn’t think it was helpful). I’m not familiar with systemd so I can’t provide info there. I am IPv6 capable (running from an Xfinity Xfi Gateway). Which, to my understanding, means that I do not need to use port forwarding.

b. Command:

sudo service caddy status
sudo service caddy start
sudo service caddy restart

Are all the commands I use to interact with caddy. I use

sudo nano /etc/caddy/Caddyfile

to edit the Caddy File

c. Service/unit/compose file:

Not using Docker/systemd/Kubernetes/make etc. so I believe this is not relevant

d. My complete Caddy config:

The debug bit is obviously new

#A CONFIG SECTION FOR YOUR HOSTNAME
{
    debug
}

theredcity.duckdns.org {
    reverse_proxy localhost:30000
    encode zstd gzip
}

https:// {
    tls internal {
        on_demand
    }

    reverse_proxy localhost:30000
    encode zstd gzip
}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

5. Links to relevant resources:

I cannot provide more than 4 links so I will have to be conservative here.
DuckDNS install guide which was also followed and executed without issue.
Relevant forum question, seperated only bc the problem is Docker. It contains a link to Foundry’s guide for hosting from a Caddy proxy server, which is relevant.

I checked that foundry guide and couldn’t find any disagreements with what is listed in the guide I followed.

I did finish the first guide (linked at the start of the topic) before downloading and installing DuckDNS. I hoped this was the issue, so after I installed DuckDNS (which I think is just for auto-updating my DNS with the correct IPv6 address) I restarted everything from caddy to my foundry server in pm2, but no luck.

Can you try again with sudo? We can’t help without actual logs messages

2 Likes

Still just returns “>”, prompting me for an input (I have to hit ctrl+c to stop it). Is there something else I’m supposed to be putting there or entering afterwards?

Try the command that Mohammed90 provided without the backtick on the end.

Here’s how I use the command to output the content to a file in the home directory for easy access.

journalctl -u caddy --no-pager | less +G > ~/caddy.log

Note I am still a Linux beginner and more of a Caddy noob. Above is just something that works. Almost certainly able to be made more efficient by those with greater knowledge.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.