
1. Configuration Requirements
1 GB of available memory works, but it is noticeably slow in testing. 2 GB of memory just meets the requirement.
2. Installation
2.1 SSH into the Cloud Server
sudo -i
Enter root mode.
2.2 Download Discourse
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers
You need to use the root user for the remaining setup and bootstrap process.
2.3 Install
./discourse-setup
2.3 When Prompts Appear, Answer the Following Questions
Hostname for your Discourse? [discourse.example.com]:
Email address for admin account(s)? [me@example.com,you@example.com]:
SMTP server address? [smtp.example.com]:
SMTP port? [587]: // Keep the default for Tencent email. Do not change it to 465.
SMTP user name? [user@example.com]:
SMTP password? [pa$$word]:
Let's Encrypt account email? (ENTER to skip) [me@example.com]: // Enter your email
Optional Maxmind License key () [xxxxxxxxxxxxxxxx]: // Default is fine
Be sure to configure the email service correctly, because logging in to the forum requires email activation.
The installation usually takes about 2 to 8 minutes. Wait for it to complete.
3. Modify the Forum
Sometimes you may need to modify the forum or add new plugins.
Edit /containers/app.yml, then use:
./discourse-setup
or
./launcher rebuild app
to apply the changes.
4. Backup and Restore
mkdir -p /var/discourse/shared/standalone/backups/default
./launcher enter app
cp /file-path/backup-file.tar.gz /var/discourse/shared/standalone/backups/default
discourse enable_restore
discourse restore backup-file.tar.gz
./launcher rebuild app
5. Notes
5.1 Notes for Tencent Email
Use port 587, the default port. Do not change it to 465, or you will not be able to send and receive mail.
5.2 ARM Servers
Installation on ARM servers may report an error like this:
discourse-setup: line 260: *0: syntax error: operand expected (error token is "*0") Hostname for your Discourse? [discourse.example.com]:
Modify line 260:
vi discourse-setup
:set nu // Show line numbers in the editor
Change line 260 to:
avail_cores=$((`lscpu --parse=core | awk 'NF==1' | sort -u | wc -l`))



