- Container Station: If this is not already on your device then install it from the QNAP App Store. Setup with all default options.
- Portainer Container: If this is not already up and running see my “Three Tips” post for ideas how to create the container. Also, create the admin user if you have not already done so.
When you log into Portainer for the first time it will prompt you to connect to a Docker endpoint. For our purposes that endpoint will be Container Station. If Portainer is running on the same machine as Container Station choose the Local option. Otherwise, choose Remote.
This option is super easy …if… you started Portainer with the correct Docker flag:
If you did, then click the Connect button and you are all set. Yay!
If you did NOT, then your options are either to restart the container using that flag or to follow the remote connection process outlined below.
Remote Endpoint #1 - Modify Container Station to accept Portainer as a connection
A few adjustments need to be made to Container Station before it will allow Portainer to connect. Big Picture: this process communicates via TLS through a specified port on your NAS’s IP address.
- Open Container Station and go to: Preferences > Docker Certificate
- Click the Download button to save a zipped certificate to your PC
- Unzip the certificate file to a temp folder (we’ll return to this in step 5 in the next section)
- Upload the zipped certificate file to
/share/Container/on your NAS (via local share, File Station, etc.)
- Login to your NAS via SSH with a user that has admin privileges
- Create a hidden directory by executing
mkdir -pv ~/.docker
- Unzip and copy the cert file contents to the hidden directory:
unzip /share/Container/cert.zip -d ~/.docker
- Now execute:
export DOCKER_HOST=tcp://192.168.xxx.xxx:2376 DOCKER_TLS_VERIFY=1
- Update the above with your NAS’s IP address
Remote Endpoint #2 - Portainer: add Container Station as an endpoint
While logged in as the admin user:
- Choose Remote
- Enter an environment or device name
- Enter endpoint URL: use the same one listed in #1 above (include the port number). Example: 192.168.xxx.xxx:2376
- Turn on TLS
- Use the certificate files you unzipped in the section above to make the following selections/matchings:
- TLS CA certificate == ca.pem
- TLS certificate == cert.pem
- TLS key == key.pem
- Click Connect