How to create local Discourse with only http (no https)?

AI-generated summary

The discussion revolves around setting up a local Discourse instance without HTTPS, as the user is unable to obtain a Let’s Encrypt certificate due to lacking a domain name. Isambard initially faces bootstrap failures when trying to skip SSL, but eventually succeeds by commenting out SSL and Let’s Encrypt lines in the YAML file and using ./discourse-setup --skip-connection-test with localhost as the hostname Isambard. merefield suggests using a dev-install instead, noting that the standard setup is meant for cloud deployment and that a Docker-based dev-install is available. Isambard confirms that a local setup is possible, having previously run it on localhost, and attributes the earlier failure to not properly disabling Let’s Encrypt.

I’m trying to install discourse on my laptop to do some tests before making changes on my real version. (writing scripts that will run on the real docker instance)

My laptop has no domain name, so I can’t get a let’s encrypt SSL certificate.

How does one go about installing a http only instance?

I comment out SSL lines in app.yaml and try to bypass ssl in ./discourse-setup --skip-connection-test but the bootstrap fails:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 3649 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
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.

This is not suitable for a local install. The standard install is meant for cloud deployment.

Use a dev-install

It should be possible somehow as I have an install running on localhost on my desktop computer, but can’t remember how I did it.

I’m trying to get it done on my laptop before I go on a trip.

I see no value in wasting time here. Go the well trodden path and use a Dev install. There’s even a docker one!

I managed to get this working. In the YAML file comment out lines relating to port 443 and Let’s encrypt. Then use ./discourse-setup --skip-connection-test

I set it up with localhost as the hostname and it worked. I think last time, it didn’t work because I forgot to comment out the Let’s encrypt lines.