<\/span><\/h2>\n\n\n\nFirst, we will add the GPG keys and Docker repository since it is not added by default in the Ubuntu 22.04 official repository.<\/p>\n\n\n\n
curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -\n\nsudo add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu focal stable\"\n<\/pre>\n\n\n\nOnce the keys and repo are added, install Docker with the following command:<\/p>\n\n\n\n
sudo apt install docker-ce docker-ce-cli containerd.io -y<\/pre>\n\n\n\nAfter successful installation, start and enable the Docker service.<\/p>\n\n\n\n
sudo systemctl start docker && sudo systemctl enable docker<\/pre>\n\n\n\nTo check the status of the Docker service, execute the following command:<\/p>\n\n\n\n
sudo systemctl status docker<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
root@host:~# systemctl status docker\n\u25cf docker.service - Docker Application Container Engine\n Loaded: loaded (\/lib\/systemd\/system\/docker.service; enabled; vendor preset: enabled)\n Active: active (running) since Thu 2023-03-02 16:28:53 CST; 21s ago\nTriggeredBy: \u25cf docker.socket\n Docs: https:\/\/docs.docker.com\n Main PID: 96031 (dockerd)\n Tasks: 9\n Memory: 24.8M\n CPU: 525ms\n CGroup: \/system.slice\/docker.service\n \u2514\u250096031 \/usr\/bin\/dockerd -H fd:\/\/ --containerd=\/run\/containerd\/containerd.sock\n<\/pre>\n\n\n\n<\/span>Step 3. Install Discourse<\/span><\/h2>\n\n\n\nFirst, we need to download the Discourse repo from GitHub.<\/p>\n\n\n\n
sudo mkdir -p \/home\/discourse\n\ncd \/home\/discourse\/\n\nsudo git clone https:\/\/github.com\/discourse\/discourse_docker.git .\n<\/pre>\n\n\n\nNow, once the Discourse is downloaded, we can execute the following command for the script to start installing the software.<\/p>\n\n\n\n
sudo bash .\/discourse-setup<\/pre>\n\n\n\nThe installation will start, and you will be asked for a couple of inputs, explained in bold below:<\/p>\n\n\n\n
Checking your domain name . . .\nConnection to yourdomain.com<\/b> succeeded.\nEmail address for admin account(s)? [me@example.com,you@example.com]: admin@yourdomain.com<\/b>\nSMTP server address? [smtp.example.com]: smtp.yourdomain.com<\/b>\nSMTP port? [587]:\nSMTP user name? [user@example.com]: user@yourdomain.com<\/b>\nSMTP password? [pa$word]: YourStrongPasswordHere<\/b>\nnotification email address? [noreply@yourdomain.com]:\nOptional email address for Let's Encrypt warnings? (ENTER to skip) [me@example.com]:\nOptional Maxmind License key (ENTER to continue without MAXMIND GeoLite2 geolocation database) [1234567890123456]:\n\nDoes this look right?\n\nHostname : yourdomain.com\nEmail : admin@yourdomain.com\nSMTP address : smtp.yourdomain.com\nSMTP port : 587\nSMTP username : user@yourdomain.com\nSMTP password : YourStrongPasswordHere\nNotification email: noreply@yourdomain.com\nMaxmind license: (unset)\n\nENTER to continue, 'n' to try again, Ctrl+C to exit:\nletsencrypt.ssl.template.yml enabled\n\n\nConfiguration file at containers\/app.yml updated successfully!\n<\/pre>\n\n\n\n The installation script will proceed with downloading the Discourse base image for Docker and building it. After successful installation will be displayed the following output:<\/p>\n\n\n\n
DISCOURSE_HOSTNAME=yourdomain.com -e DISCOURSE_DEVELOPER_EMAILS=admin@yourdomain.com -e DISCOURSE_SMTP_ADDRESS=smtp.yourdomain.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=user@yourdomain.com -e DISCOURSE_SMTP_PASSWORD=YourStrongPasswordHere -e DISCOURSE_SMTP_DOMAIN=yourdomain.com -e DISCOURSE_NOTIFICATION_EMAIL=noreply@yourdomain.com -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h host-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v \/var\/discourse\/shared\/standalone:\/shared -v \/var\/discourse\/shared\/standalone\/log\/var-log:\/var\/log --mac-address 02:a7:ac:92:6f:88 local_discourse\/app \/sbin\/boot\n48d8ab41804db85677cc197fd19e7d5510faec248d99ce16d5a31082956f3463<\/pre>\n\n\n\nNow, you can access the Web interface at https:\/\/yourdomain.com\/<\/b> and register an account.<\/p>\n\n\n\n
<\/figure><\/div>\n\n