In order to import a server it must run a fresh installation of Ubuntu 18.04 or 16.04 and be reachable through SSH. Moss will log into it and set up everything to manage and monitor the server on your behalf. Contrary to launching a new server, in this case Moss cannot configure the provider firewall but he will set up the corresponding iptables rules to keep your server secure.
Head to the 'Add server' form and follow the steps below:
- Choose 'Other' as the provider.
- Provide the host address that Moss will use to reach your server. The host must be either the public IP address of the server (e.g. '18.104.22.168') or a domain name that resolves to the public IP of the server (e.g. 'vps01.myprovider.com').
- Provide the username that Moss will use to log into your server via SSH and set up everything. The corresponding user must be privileged or able to run privileged commands with sudo (e.g. some common usernames are 'root' or 'ubuntu'). In order for Moss to log into your server, you must manually authorize the public SSH key of Moss for the given username. Just log into your server as such user and copy&paste the command you're given in Moss.
- Provide the name that your server will have in Moss (e.g. 'my-server' or 'vps01'). Moss will also configure the hostname of the server using the value you provide here. Note that the name of the server must be unique within your workspace.
- Choose the timezone that Moss will set in your server. Moss suggests your current timezone as the default option, but choose whichever you prefer.
- Choose the SSH Key to upload onto the server (if any). This is your public SSH key: Moss will upload this key onto the new server so that you can always log into it via SSH as user moss (can run privileged operations with sudo). You may choose to upload your key later on.
- Check the monitoring box if you want Moss to gather server metrics and send you an alert whenever it's down or under resource pressure. For this to work, port tcp/9100 must be open. Usually you'll want to monitor your servers, unless they're for testing or similar environments.
Once you're done with the previous configuration, click the 'Add' button and wait until Moss finishes the process.
It may take a while depending on a number of factors like the capabilities of your server or the state of the network, to name a few. Moss shows the last completed step at any moment so that you can track the progress of the process.
Awesome! You've added you server to Moss :-) He has started to work for you. You'll receive a notification whenever the server is upgraded with security patches. If you also enabled server monitoring, you'll get an alert whenever it's down or any resource is under pressure (cpu, memory, disk or i-nodes). You can check the metrics Moss is gathering in the 'Metrics' tab of the server details.
Now you may want to add more servers from any provider (cloud, vps, dedicated or even your physical servers at your facilities) or to create some websites on them.