Skip to main content

Discourse Docker Install

Access Your Cloud Server
Connect to your server via its IP address using SSH, or Putty on Windows:

ssh [email protected]
Either use the root password from the email DigitalOcean sent you when the server was set up, or have a valid SSH key configured on your local machine.

Install Prerequisites for Docker (Debian/Ubuntu based Distro example)
sudo apt install docker.io
sudo apt install git
Install Discourse
Clone the Official Discourse Docker Image into /var/discourse.

sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers
You will need to be root through the rest of the setup and bootstrap process.

Edit Discourse Configuration
Launch the setup tool at

./discourse-setup
Answer the following questions when prompted:

Hostname for your Discourse? [discourse.example.com]: 
Email address for admin account(s)? [[email protected],[email protected]]: 
SMTP server address? [smtp.example.com]: 
SMTP port? [587]: 
SMTP user name? [[email protected]]: 
SMTP password? [pa$$word]:  ------------注意并不是登陆密码,而是专用密码
Let's Encrypt account email? (ENTER to skip) [[email protected]]: 
Optional Maxmind License key () [xxxxxxxxxxxxxxxx]:
You'll get the SMTP details from your email setup, be sure to complete that section.

Let's Encrypt account setup is to give you a free HTTPS certificate for your site, be sure to set that up if you want your site secure.

This will generate an app.yml configuration file on your behalf, and then kicks off bootstrap. Bootstrapping takes between 2-8 minutes to set up your Discourse. If you need to change these settings after bootstrapping, you can run ./discourse-setup again (it will re-use your previous values from the file) or edit /containers/app.yml manually with nano and then ./launcher rebuild app, otherwise your changes will not take effect.

 


 

Share On