Encryption and Certificates

By default a self-signed certificate is used. You may upload your own signed certificates or automatically provision them through Lets Encrypt. This configuration applies to both FTPS and HTTPS.

Uploading Certificates

  1. Upload the certificate files to the server.

On Windows, you may install PuTTY, which includes PSCP (SCP for Windows).

pscp -scp cert.pem ubuntu@198.51.100.0:/etc/filemage/
pscp -scp key.pem ubuntu@198.51.100.0:/etc/filemage/

On Linux, you may use the included scp command.

scp cert.pem ubuntu@198.51.100.0:/etc/filemage/
scp key.pem ubuntu@198.51.100.0:/etc/filemage/
  1. Open the FileMage Gateway configuration file.
sudo vi /etc/filemage/config.yml
  1. Add or modify the following settings, and then save the changes:
tls_certificate: /etc/filemage/cert.pem
tls_certificate_key: /etc/filemage/key.pem
  1. Restart the server:
sudo systemctl restart filemage

Your certificate is now active and used by the server.

Let's Encrypt Automatic Certificates

FileMage Gateway can be configured to automatically request and renew TLS certificates from Let's Encrypt using the ACME protocol, using the http-01 challange type.

In order for this to work you must:

  • Create a DNS entry under a custom domain (Azure domains will not work) which resolves to your FileMage Gateway virtual machine public IP address.
  • Make port 80 and 443 publicly reachable to your FileMage Gateway virtual machine.

Note

You may not exceeded the maximum number of certificates and certificate requests allowed by Let's Encrypt. (See Rate Limits)

Enabling Automatic Certificates

  1. Create a public DNS record that resolves to the servers public IP address.

  2. Open the FileMage Gateway configuration file.

sudo vi /etc/filemage/config.yml
  1. Add, or modify, the following settings, and then save the changes:
acme_use_auto_tls: true
acme_hostname: <PUBLIC_DNS_NAME>
  1. Restart the server:
sudo systemctl restart filemage

Let's Encrypt is now enabled and signed certificates will automatically be issued and renewed for free.