I have the cloudflared daemon running properly and have used it for tons of stuff(meaning the tunnel is installed properly on the server), but I am having trouble getting the Discourse setup(./discourse-setup) to recognize my hostname for my Discourse instance.
I am using biohacking.forum as the hostname for my instance.
This my my Cloudflare Tunnel configuration for biohacking.forum:
It prompts me for the hostname, I enter biohacking.forum
The following message is displayed:
Hostname for your Discourse? [discourse.example.com]: biohacking.forum
Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname: biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.
This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.
The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.
If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.
This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type
./launcher rebuild app
What should I do to get this step working, please let me know if you need any addtl. information. Thank you!
I am not using a standard A record, I am using cloudflare tunnels. Here an example of a service that works perfectly on my server(with cloudflare tunnels) and the associated config:
Ghost CMS is the service:
PORT: 8085:2368 (8085 is host and 2368 is service)
HOSTNAME: joshuahabka.com
Cloudflare Tunnel Setup:
The orange cloudflare icon is on since it uses Cloudflare tunnels but to Discourse it should report as a normal access port… I have over 40 services deployed and web-accessible and Discourse is the first where I am having some error with it.
Hi Lilly, the aforementioned guide did not work for me, I still receive the same error even though my cloudflare tunnel configuration is http://localhost:80 as stated I am still stuck on
starserver@Starserver:/var/discourse$ sudo ./discourse-setup
Ports 80 and 443 are free for use
'samples/standalone.yml' -> 'containers/app.yml'
./discourse-setup: line 261: 4
scaling* 2: syntax error in expression (error token is "scaling* 2")
Hostname for your Discourse? [discourse.example.com]: biohacking.forum
Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname: biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.
This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.
The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.
If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.
This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type
./launcher rebuild app
FAILED
--------------------
Pups::ExecError: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end' failed with return #<Process::Status: pid 134 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"precompile", "cmd"=>["/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_SMTP_ADDRESS\"] == \"smtp.example.com\"; puts \"Aborting! Mail is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_HOSTNAME\"] == \"discourse.example.com\"; puts \"Aborting! Domain is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if (ENV[\"DISCOURSE_CDN_URL\"] || \"\")[0..1] == \"//\"; puts \"Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts.\"; exit 1; end'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
Completed that and all is nominal now. I would just put a note in the self-install for cloudflare tunnel post that people need to edit the yaml doc to add their smtp, hostname, emails, etc