Digital Ocean

Use this link to register Digital Ocean with $10 credit.

Droplet Setup (Ubuntu) for Node.js App (Meteor etc)

Optional:

change editor to use vi sudo update-alternatives --config editor

References:

If you want nginx support:

More security setup from this linux workstation checklist:

MongoDB

automatic backup

crontab:

How to manually backup or restore

http://stackoverflow.com/questions/11024888/is-there-a-simple-way-to-export-the-data-from-a-meteor-deployed-app/16380978#16380978

Oplog

How to enable oplog if the db is already in use?

ref:

SSL

How to check?

Online tool: https://www.sslshopper.com/ssl-checker.html

Or use ssl-cert-check on server (reference):

(LATEST 2021) With Mup you don't need to do manual setup SSL anymore

Setup SSL using mupx and Let’s Encrypt

Steps

Make sure A record is already updated for your domain first

SSH to server:

The following 4 files will be generated in the archive folder: /etc/letsencrypt/archive/YOURDOMAIN.COM (Note the ones in /etc/letsencrypt/live/YOURDOMAIN.COM is symlinked to archive folder)

  • cert1.pem

  • chain1.pem

  • fullchain1.pem

  • privkey1.pem

Now we want to copy those files to your local machine:

Put the downloaded two files (fullchain.pem and privkey.pem) in your local folder where mup can access (see mup.json)

Update mup.json

Don't forget to add force-ssl package: meteor add force-ssl

Renew automatically

NOTE this will NOT work because the server has to be stopped

Let’s Encrypt expires 90 days, so we create cron job to automatically update:

To renew manually

Key points:

  • You need to stop server before running renew.

  • if cert is expired, you need to run mpux setup again

  • if you run letsencrypt renew, new files will be generated (such as cert2.pem)

    • cert.pem: Your domain's certificate

    • chain.pem: The Let's Encrypt chain certificate

    • fullchain.pem: cert.pem and chain.pem combined

    • privkey.pem: Your certificate's private key

Reference:

Additional:

Last updated