The public key is not available: NO_PUBKEY 68818C72E52529D4

After adding a mongodb you may experience an error about the GPG PUB KEY like teh following.

W: GPG error: xenial/mongodb-org/testing Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68818C72E52529D4
E: The repository ‘ xenial/mongodb-org/testing Release’ is not signed.

You can fix this issue by adding the PUB KEY for MongoDB’s repository.

apt-key adv --keyserver --recv-keys 68818C72E52529D4

Try update again

apt update

Meteor Remote MongoDB

I don’t like to use big repeating command and I was searching for a solution where I will be setting a variable embedded with something so every time I start my meteor app; the MONGO_URL will set to environment automatically. So this what I did:

In the package.json file I replaced the start parameter as below:

"scripts": {
    "start": "MONGO_URL=mongodb://username:password@host_url:portnumber/dbname meteor run"



Connect to a remote Mongodb instance with local meteor instance

Great for development. Say you want to share the database with someone else in a remote location.

  • Create a package.json file with npm init, if you don’t have one already.

  • Enter and modify the following line in that file (replacing all the <...>‘s):

"scripts": {
"meteor": "MONGO_URL=mongodb://<USER>:<PASSWORD>@<SERVER>:<PORT>/<DB> meteor"

For meteor to start using your remote MongoDB start meteor with 


npm run meteor