Help With SSL

I was following

and got my site online with the domain but I’m having trouble adding SSL. I have a NodeJS setup using Docker and deployed to Digital Ocean. If you go to example.com or www.example.com it works but when you add https it can’t reach the page.

My resource manager didn’t show anything under cloud providers, so I added Digital Ocean with the API and SSH key.

When I go to import my server, I can select it, but it says “No public user key found: ~/.ssh/id_rsa.pub”

I confirmed that I selected the key when I setup the provider. If I try to make a new key when setting up the provider I get “Key already exists”

Anyone got any ideas on what I’m doing wrong and/or if there is a different way to setup SSL with Docker/DigitalOcean?

Seen a few other people have this problem but I couldn’t find a solution

Hi Eric_F,

Please post a screenshot of the remote target settings for the Docker Remote and Web fields, there could be a misconfiguration of these settings.

Not to confirm the super-obvious, but you do have the correctly-named key file on the local machine you’re issuing the deploy from AND have added the key to the docker machine’s allowable-keys file, correct? I only ask since it sounds like D-O was NOT under your resource manager until after initial deploy, so this may be a choke point that a manual check can confirm is ok.



To be honest I’m not sure what you’re asking. I’m new to most of this.
Are you saying I need to add the SSH key to Docker?

Try after removing Port 80 from the Web Server URL and Port fields. The project will need to be re-deployed after making these changes.

Changed it and redeployed

Now it doesn’t work with https or without

Still get

As mentioned by @xsfizzix, the error message is indicating that the public key that has been used when creating the DO instance is not available on the local computer under ssh folder.

You can confirm whether the id_rsa.pub file exists by running this command in the terminal (On Mac) ls ~/.ssh

The error could also be due to the mismatch between the public keys on your computer and DO.

Running the command in Wappler shows

which matches

or am I supposed to run the command elsewhere?

As per the error message, the server is looking for id_rsa.pub ssh key type. But the ssh key on your computer is id_ed25519.pub which uses a different algorithm to generate private/public key pair. It looks like the ssh key that had been used to create DO machines initially was ` id_rsa.pub’ ssh key type.

You can check and confirm the ssh key file here ~/.docker/machine/machines/SkinsClick folder (shown as Cert Folder under Docker Remote)

I haven’t tried to import an existing remote server. But I think you can try to delete the existing server instances in Wappler Docker Remote and Resource Manager. This will ensure that there are no conflicting ssh keys on the local system. Then re-import the DO server via the Resource Manager and re-deploy.

Sorry for all the trouble but I still can’t get it.

I decided to try fresh so I deleted all the SSH keys on DigitalOcean and my PC

I removed everything from resource manager.

Removed DigitalOcean target

deleted my Droplets.

Then added a provider via resource manager and selected to make a new RSA SSH key

It made the keys

I create a new server

And it says

Any ideas?

All good, Eric_F, I have experienced many issues in the past and wappler team / forum / community have always been very helpful in troubleshooting and finding solutions.

This error seems to be related to the Docker image installation on the droplet. Check on the DO portal whether the server has already been created. If it has, then you may have to reinstall the Ubuntu with Docker image before attempting to add the server under Resources Manager.

2 Likes

Finally got it working!

Part of my problem was that I didn’t know I had to add the SSH key to the SSH agent.
Thanks a ton for all the help.

1 Like

Incase any in the future needs help with this.

On the

E: Could not get lock /var/cache/apt/archives/lock. It is held by process 2254 (apt-get)
E: Unable to lock directory /var/cache/apt/archives/

just wait a little bit and then do system check and it should work

and then if you get this

add the SSH key to the SSH agent and make sure the SSH agent is started

1 Like

You are welcome Eric_F! I am glad to hear that it is working for you now.

Sorry, one last question.
Since I setup the Digital Ocean droplet with the resource manager do I need to set the target type to be SSH rather than sockets?


If I do that the database doesn’t seem to work

Cloud Providers - SSH setting is correct for the remote docker target.

Could it be an issue with the port 9906 not opened on the server and allowed through the firewall on the DO droplet? I haven’t setup any project with MySQL DB on a Remote Docker, I use MSSQL DB on a separate remote server. I am not fully across the settings that are required for connecting to the Docker DB.