Comment on page
Setup Misago on your Server
We are finally ready to set up Misago!
Prepare your droplet's IP address and password (if you haven't selected the SSH key as an authentication method).
If you are on Linux or Mac, you are ready to sign in to your server. If you are on Windows, you will first need to install an SSH client. DigitalOcean has a guide for connecting to a droplet using PuTTY on Windows.
*nix-like systems already implement program for connecting to server. Open your terminal and run following command, replacing the part after
@with your droplet's IP address:
After running this command, your terminal will attempt to connect to your droplet using the
rootusername. Since this is your first connection to the server, you will be prompted to confirm. Enter
yesand press Enter to proceed:
Warning about connecting to the unknown server
If you've selected a password as the authentication method, you will now be asked to enter it.
After successful sign-in, you should see a welcome message from your server:
Droplet welcome screen
You are now connected to your server as the
rootuser. Digital Ocean has already performed several configurations on the server, but for safety, it's recommended to do an update.
We can accomplish that by running a series of commands. If any of the commands prompt you to confirm whether you wish to continue, type
yand press the "Enter" key to confirm. If the updater warns you that one of the files to be updated would overwrite a locally modified file, select the option to "keep the local version currently installed."
The commands to run are as follows:
1. `apt-get update`
2. `apt-get upgrade`
3. `apt-get dist-upgrade`
No new updates were found
The internet is patrolled by bots trying to brute-force "root" user passwords on discovered servers. In addition to setting a long and hard-to-guess password for "root," we can also enable a mechanism that will ban an IP address from logging into the server for 10 minutes if they fail to enter the correct password three times.
To do that run the following command:
apt-get install fail2ban
If you are asked for confirmation, continue as you did in the previous step.
Run the following command:
git clone https://github.com/rafalp/misago_docker.git --depth=1
cd misago_dockercommand to enter the directory containing our Misago site. You can use the
lscommand to list the contents of the current directory:
We can see that a bunch of files and directories have been downloaded, including
logs, and more. Your list may be different depending on the changes in the new Misago versions.
One item on the list stands out more than the rest:
This is an executable script that Misago provides for administrators to make it easier to set up and manage Misago sites.
To run it, enter
./appctl. This will result in a list of available options being displayed:
We see that we can use the
setupoption to set up a new Misago site. To use the option, run
./appctlfollowed by the option's name:
You will be asked to enter the hostname for your site. Enter the domain name you have pointed to the server and confirm it by pressing Enter.
Note: You may remember that in the domain guide, we created two records for our domain: one without "www" and the other with. Enter either of those. Misago will create a 301 redirection from the other domain to ensure there are no duplicate content problems with links to your site.
Next, enter the email address for the Let's Encrypt certificate. Misago uses the Let's Encrypt service to secure your users' connections with your site. It is 100% free, safe, and GDPR compliant. However, Let's Encrypt requires your email address to be able to contact you in case there is something wrong with your HTTPS certificate.
You will also be asked to enter the language code for your site's locale. The locale affects the language of the site's interface and the search feature's accuracy. You can find a list of all supported locales here.
Note: You can always change your answers later using the dedicated option in
Continue answering the questions until you are asked if you want to initialize the default database. Confirm this with "Y" and grab a cup of coffee (or a tea) as the installer does its magic.
Eventually, you will be asked to enter a username, email, and password for your superuser account. Make sure you remember these inputs. At the start, this will be the only user on your site with access to the admin control panel.
After the user is created, the setup will perform a few more actions before finally displaying the "setup completed" message. You should now be able to visit your site and log in to your account using the credentials you entered during the setup.
If your browser tells you that there is an HTTPS error on your site, wait a few minutes and try again. If your site still lacks HTTPS after a few minutes, it may be because you have reached the [limit on the number of certificates]](https://letsencrypt.org/docs/rate-limits/) that Let's Encrypt can issue for a single domain in a week.
yourdomain.com/admincp/in your browser and log in to the admin control panel to set up the site name, categories, and other settings.
Note: If you are still signed in to your server, run
docker system pruneto delete no longer necessary Docker build caches and free up extra disk space.