Somehow I finally ran the site on Raspberry and it’s live.
I don’t really understand how. I am removed Cloudflared and re-install it with root user. And it works…
I have two questions,
1- It seems my SSL certificate not work correctly so I can’t login to my admin account on Discourse. (It appears to be running in incognito tab. Maybe it’s something about cache.) Are you using full or full(strict)?
2- I have questions about running cloudflared as a service. https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/run-as-service
I ran tunnel with
cloudflared tunnel run <UUID or NAME> command. But when i close the iterm windows will it stop working?
If you have already logged in and have a configuration file in
~/.cloudflared/ , these will be copied to
If you do not have a configuration file, you will need to create a config.yml file with fields listed above. You can pass a custom file by running
cloudflared --config CONFIG-FILE service install .
I checked, i don’t have configuration file in
/etc/cloudflared/. In this case, what should I do to run this service automatically?
Questions that are more specific about the Cloudflare tunnel service may receive better answers at Topics tagged cloudflaretunnel
I think reinstalling it would of fixed the issue of cloudflared not finding the certificate…
With regards to running Cloudflare as a service - the configuration file you created when running the service manually will need to be moved to /etc/cloudflared.
I’m unsure about linking personal sites here so please let me know if I need to remove this but I’ve covered this under my one of my blogs under the section called: ‘Setup and Run Cloudflared as a Service’
Let us know how you get on!
Thank you for the reply.
Great blog post, thanks for sharing.
Run Cloudflared as a Service
sudo cloudflared service install
config.yml file automatically copied to /etc/cloudflared/.
sudo systemctl start cloudflared
sudo systemctl enable cloudflared
And it’s working great. I haven’t tried rebooting yet but I hope it will work.
I just installed Discourse and Cloudflared on my R-Pi 4, and I followed the instructions in the original post, but I am not sure on what to put as a host for Discourse, should I just put localhost since cloudflared tunnel will forward it ?
Maybe @Falco could help ?
You still need to own a domain for this guide, so the host value will be either the domain apex or the subdomaon you configured for Discourse and for the tunnel.
So the host value should be the subdomain I want Discourse to be in ?
Yes it should be the url where you want Discourse to be.
Are you sure ?
If I do that, it gives me this error :
Do you think i did something wrong ?
I set the Discourse hostname to the exact subdomain where I want discourse to be.
I installed Cloudflared on R-Pi4 from the CLI (as written here : https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/#5-start-routing-traffic) and I am running it as a service.
And I installed discourse as mentioned in your original post I am pretty sure.
Can you share the domain?
Could I send it to you in DMs ? Don’t really want random people to see it.
Is it working now that you put up the proper domain?
Yes ! Just booted it up ! Thanks for your help ! I only have an issue with MailJet (the mail provider I use for STMP), which is having fun pre-blocking my verification emails…
A post was split to a new topic: Any MailJet alternatives?
A post was merged into an existing topic: Any MailJet alternatives?
Hey there, I managed to have a working install ! Just had a small question, how much activity/members do you think a R-Pi 4 Model B with 4 gigs of RAM can handle ?
That’s a great question. Since it’s hard to make a direct correlation between number of users and the server load in a complex system like Discourse, it’s fair to acknowledge that the main bottleneck in a RaspberryPi system is the storage IOPS.
So as long as most of your needed resources are in the RAM, between proccesses RSS and Linux caching, you should have a smooth experience. The fact that Cloudflare is acting like a caching CDN will also help quite a bit, and you can even stretch the longevity of the Pi setup by using Using Object Storage for Uploads (S3 & Clones) after a while.
i got this error parts of docker
Pups::ExecError: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end' failed with return #<Process::Status: pid 115 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_HOSTNAME\"] == \"discourse.example.com\"; puts \"Aborting! Domain is not configured!\"; 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.
That means you didn’t configure your domain properly. You need a valid domain for this to work. Run
./discourse-setup again or edit the app.yml file to fix it.
thx for reply
i sucessed deploy it on RockPi4