[GUIDE] Portainer docker on Container station

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

[GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

By request :D
peelos wrote: Wed Dec 07, 2022 5:41 pm On a side note, did you find a reliable way to update portainer from container station - if so, could you link to a guide pls?

alternative guides (if you don't trust mine :( or if u need as reference to doublecheck if i missed something out )
https://medium.com/digitalfrontiers/eas ... 82b2390854

viewtopic.php?t=161125#p817632


Portainer is basically similar in function to container station (but better so i'm told. which is why i installed to try out)



There are a few ways to install portainer

1. QPKG (this is probably the easiest)
2. manually (this felt like a hack job, so i didn't do it this way. Also you need to know what you are doing)
3. container station (this is what i used, and what the guide i will be posting will be about)



step1

install container station via qnap appcenter if u haven't already.


step2

open cs then click create application, then paste this docker compose code and click validate. when it says it works, click create

Code: Select all

version: '3'

services:
  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    restart: always
    security_opt:
      - no-new-privileges:true
    ports:
      - 9001:8000
      - 9000:9000
      - 9043:9443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /share/CACHEDEV1_DATA/Container/portainer-ce/data:/data:rw
    environment:
      TZ: Europe/Paris

you can get your timezone codes here
https://en.wikipedia.org/wiki/List_of_t ... time_zones



in the compose above, this part above is the one you want to change to your own folder. this is for persistent storage after updating. very important

/share/CACHEDEV1_DATA/Container/portainer-ce/data:/data:rw
environment:


step3

open portainer

it should be http://your nas ip:9000/


step4

in the wizard select LOCAL. This will then detect all your existing containers that were created previously using container station. They will also now be shown in portainer.

You can also now create your docker apps using portainer now if you want.


This is a demo of me following the same guide i posted. so the end result would be something similar to this. So if you initially created docker apps in cs, they would then appear listed in the screenshot below assuming u correctly selected local during the portainer wizard setup

Image



step5 (for maintenance)

If later you want to update the portainer docker app, just recreate the app using container station > applications. Your created portainer will be listed, select it and click recreate.

Image

Image

I'm not 100% sure if this will pull an update image from registry or not, but if it doesn't, you can go to cs images, then pull for the portainer image. This should get the latest image from the registry. Then you go back to applications and recreate. *this is assuming IF your first attempt did not update docker.

Image

To confirm if it updated or not, you can open portainer and see what version it's running, whether it matches portainer from the portainer docker webpage or not where this image was pulled from.


there is a guide on how container station works to understand it better
https://www.qnap.com/en/how-to/tutorial ... -station-3


I've tested the recreate myself. My portainer settings remains intact. All the apps i have in docker are all intact.

:wink:


questions you may be asking about this setup at this point

LiL0u-

I've been able to create the Portainer container and all my previous containers are detected automatically. So far so good.

What do I do with ContainerStation from now on? Won't conflict with Portainer?


AndroTux-

It will show all containers managed by Portainer as well. I personally use it to start Portainer and then leave it alone. As long as you don’t manage any containers using the ContainerStation, it should not interfere with Portainer.

https://www.reddit.com/r/qnap/comments/ ... portainer/



other comments

Honestly i flip back and forth between cs and portainer as i am still getting familiar with it.

If i am being perfectly honest, i felt that CS v3 was a bit easier for me as a newbie to manage. Not that i don't appreciate portainer (i'm not discounting some of the cons with CS implementation), but some parts felt simple like when setting up networking. Because to newbs like me, as long as it works, you don't care as much about other things. For the veterans out there, they'll probably feel better with portainer because it doesn't have the same limitations that CS has, and the're comfortable using portainer.

Also the fact that cs tends to allow you to adjust the settings before deploying. whereas when i tried the same with portainer, i would have to deploy first, then re-create to make the edits. it's different, you try it out and let me know if u felt the same or not :D


-Credits: Drauk from unofficial qnap discord for helping me figure this out using the docker compose to setup portainer :mrgreen:
Last edited by Moogle Stiltzkin on Thu Dec 08, 2022 11:56 am, edited 8 times in total.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

So why do people hate container station?

i felt ok with it, but the experts seem to know where to dig at it that i wasn't aware of

Spanner_Man

In docker volume mapping between host/container isn't limited to a file storage path, but also can use device paths & even unix socket paths.

In container station try map /var/run/docker.sock between both host and container and see how well you get along.

"Container Station" is a joke.
Spanner_Man-

Now that is a straw man if I ever saw.

Editing/creating a text based file is not the same as using Container Stations built in "create container".

If the only way around the ** poor limitations of a GUI is to use docker-compose I might as well just SSH and do it myself manually. Or give Container Station the middle finger and use portainer.

At least that allows for creating actual proper binds.
vadalus911-

That’s great. And this will work ok with watch tower etc.. ? I hate using container station as it’s so brittle with updates etc but also the qnapclub portainer also seemed a bit limited .

My only real struggle with not using container station is things it makes easy like bridge networks.. I like my containers have their own IP’s etc
https://www.reddit.com/r/qnap/comments/ ... r_station/





other interesting posts
SirHades13-

You should probably install portainer as.. a container. Check out linuxserver guide on how to use containers on qnap, and search for portainer on qnap. There's a handy guide out there on how to install the portainer-ce image and give it the credentials to access your container station. From then, you can do everything docker related in portainer.

Edit.. Here's the guide from linuxserver : https://www.linuxserver.io/blog/2017-09 ... rs-on-qnap

And the one on portainer as a container, with the qnap cert and so on : https://medium.com/digitalfrontiers/eas ... 82b2390854
https://www.reddit.com/r/qnap/comments/ ... portainer/


SirHades13-

I did it this way..

Created a Docker user, checked its PUID and PGID and now I use those for every new container.

I created a shared folder eg. /dockerdata and create a folder for every new container in there. This way, all my persistent Docker data is in one place, created by a user which is not root or equivalent.

Basically, I followed this guide : linuxserver.io Docker on Qnap
https://www.linuxserver.io/blog/2017-09 ... rs-on-qnap

It has helped me start with Docker, and I use similar practice on my raspberry pi docker instances.
Zeroflops-

I’m sure there are many ways to do it. But what I did was….

create a user named docker

in the docker user create a volumes folder.

in the docker folder I created a docker-compose that triggers portainer.

I create all my containers in portainer, with were volumes set to container specific folders in the volumes folder. So something like /shared/homes/docker/volumes/portainer

Now when I backup my home folders it backs up my persistent volumes.

Although container station and portainer can see what each other are controlling they are separated.

I can update everything from within portainer. But to update portainer I usually ssh into the docker home folder and update it. There is probably an easier way, but it’s quick and easy so have not looked for one yet.
talios-

I made the mistake of trying to update Portainer from Portainer :(

Ended up blowing it all away and reinstalling Portainer - ewps ;p


https://www.reddit.com/r/qnap/comments/ ... r_station/


stephenhouser-

Curious if you are using container station or portainer as your main management consone. I have portainer launched from container station and then all my other containers are managed from Portainer. My hope was that Portainer would be more flexible, portable, expandable. Not sure that I’m finding that to be true though.

As for backing up containers, depending on what is running within it you might have to to the backup within the container to maintain consistency. E.g. with a database, backing up the disk at a point in time might not get you anything usable if the database server is caching data in memory.
https://www.reddit.com/r/qnap/comments/ ... s_on_here/
Last edited by Moogle Stiltzkin on Thu Dec 08, 2022 1:07 pm, edited 1 time in total.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

Watchtower is a great app to have as it monitors and updates your docker apps automatically for you. unfortunately i haven't yet figured this one out myself. but you can check it out yourself :D
https://containrrr.dev/watchtower/
A container-based solution for automating Docker container base image updates.

With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command:
docker compose

Code: Select all

version: "3"
services:
  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: unless-stopped


Usage overview
https://containrrr.dev/watchtower/usage-overview/

Auto update containers in Docker using Watchtower and update Portainer manually
https://www.youtube.com/watch?v=t8_RzPRnvjA

How To Update Docker Container automatically with nearly zero downtime
https://www.youtube.com/watch?v=5lP_pdjcVMo&t=445s

How to Update Docker Containers using Watchtower with Portainer
https://www.youtube.com/watch?v=mS0ylPhwQDU



https://forum.openmediavault.org/index. ... -clean-up/

https://www.jamescoyle.net/how-to/docke ... watchtower


*update

following the first youtube guide did a preliminary test, and sure enough it worked (much easier than i had thought initially)

see it ran and detected an update for one of my docker apps, so it updated the image, stopped the app to reinstall with new image. from then on it kept scanning for any new updates or not. but for my test i set it to scan every 30 seconds. the default is 24 hours. i think 24 hours is more reasonable rather than polling every 30 seconds. but i only did that just for testing purposes (because i'm not gonna wait 24 hours to find out :roll: )
Image

there is still a lot more editting for the settings i need to do. this was just a preliminary test for the basic usage.


so anyway this is definitely an app i highly recommend to work really well with portainer to update and remove outdated images and maintain your sanity managing your docker apps :D



other interesting posts for watchtower
33Fraise33

FYI watchtower has the --cleanup command removing old images on update: https://containrrr.dev/watchtower/arguments/#cleanup



*update

this is the docker compose i am using

Code: Select all

version: "3"
services:
  watchtower:
    image: containrrr/watchtower
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_POLL_INTERVAL=21600
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
watchtower time interval poll works. it updates images correctly and seemingly updates the docker app as well. but what i did not see working is cleanup, because i noticed old images are not auto removed which the cleanup should be doing. so that part i haven't gotten to work just yet. if u figure it out plz let me know.

one possible solution might have been enabling labels. this guide explains how
https://www.jamescoyle.net/how-to/docke ... watchtower
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Sevenfeet
Starting out
Posts: 43
Joined: Sat Jul 24, 2021 11:44 pm

Re: [GUIDE] Portainer docker on Container station

Post by Sevenfeet »

My problem is that I used the guide that cocoates wrote a while back to do exactly what this guide does....create a portioner application (docker compose). This works well. But updating Portainer is now a problem. I created the old Portainer container in Container Station 2. Recreating the container is not an option in CS3 for the older container. So I could delete the container and start over, but I'm a newbie with this and have no idea how to do this. I think I'll need to ssh into the box and do some docker compose commands, but it would be nice to know where to start. Once it's dead, i think I can recreate everything quickly.
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

Sevenfeet wrote: Sat Dec 10, 2022 9:48 am My problem is that I used the guide that cocoates wrote a while back to do exactly what this guide does....create a portioner application (docker compose). This works well. But updating Portainer is now a problem. I created the old Portainer container in Container Station 2. Recreating the container is not an option in CS3 for the older container. So I could delete the container and start over, but I'm a newbie with this and have no idea how to do this. I think I'll need to ssh into the box and do some docker compose commands, but it would be nice to know where to start. Once it's dead, i think I can recreate everything quickly.
so u want to update portainer ya?

i bit a bullet for you to try test this out Image

i went to cs v3, then in apps i select portainer, edit, recreate.
Image

after that, i check portainer is it working

http://nas ip:9000

yes it does
Image


tested one of my portainer docker apps called dashy. this worked fine too.


so basically what i did was, recreate the docker app using container station v3. i assume it pulled an updated image (usually when i recreate there will be a prompt asking if u want to pull the image before recreating), but if it didn't, then you just need to go to the images and pull an updated image for portainer

Image


but i had installed watchtower that monitors for updated dockers. this should auto pull latest docker apps (there is even a cleanup function to remove old versions, but i did not manage to get it setup to work for this function, but others have). I verified it updated the docker app i created in portainer using docker compose (the interspeedtest app), so this why i know watchtower correctly detects a new docker app version, updates, and recreates automatically.

So i suspect it will do the same for portainer even though i created it in cs v3. But i cannot say for sure, this is just my guess. But if it doesn't, then the fall back is recreate app via csv3 which i tested and posted the screenshots as well as proof. I did not notice any ill effect doing so :D



However i should remind you, when i reinitialized (did a full nas reinstall clean setup from scratch), i saw that csv3 and portainer did not show any of the previously setup dockers. But the solution to that was to install cs (i used v3), then setup portainer again using cs. Then in portainer, my previously saved custom templates and stacks where all still there (basically the backup for this was working because i used persistent storage for my portainer config prior and backed that up and restored after reinit). So i simply stop/start the stack or just recreated the stack or custom template. Then everything was back in working order without a hitch :mrgreen:



So in summary, i've explained how i update portainer; and also as bonus, how the process of recovery from reinitializing qnap was i able to restore everything back to working order Image
Last edited by Moogle Stiltzkin on Sat Dec 10, 2022 11:50 am, edited 2 times in total.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

if your question is about going back and forth between csv2 and csv3, i don't think that will work. at least it gave me a prompt and warned me that it couldn't used the csv3 data when trying to run csv2. so doesn't seem like there is any backward compatibility for that. so u must commit to either csv2 or csv3 afaik Image

so i scrapped that and started from scratch. most of my dockers are being done via portainer anyway, where i have the custom templates saved.

So there is very little setup i have to do from cs, other then just installing portainer using the docker compose i posted in my guide Image



yes i tried csv2 since it's stable, but i much prefered csv3 (although i must warn you it's beta...so...)
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

My problem is that I used the guide that cocoates wrote a while back to do exactly what this guide does....create a portioner application (docker compose). This works well. But updating Portainer is now a problem.

I created the old Portainer container in Container Station 2.

Recreating the container is not an option in CS3 for the older container.

So I could delete the container and start over, but I'm a newbie with this and have no idea how to do this. I think I'll need to ssh into the box and do some docker compose commands, but it would be nice to know where to start.

Once it's dead, i think I can recreate everything quickly.
so which cs do u want to use? cs v3? if thats the case then i think u need to start cs from scratch. uninstall cs, and delete the container-station-data folder.

But as for your docker, i think you should be able to save your config if you had set your portainer install (i assume you used a docker compose?) to add persistent storage? If you didn't add persistent storage, then you are gonna have trouble restoring it later, so i hope u had setup persistent storage?

and the other part is, hope for your other apps you had also use custom templates to save your docker compose. this will make redeploying easier. And also same like portainer, all your apps you should set persistent storage ... same reason.

like i said earlier, you just install csv3 then setup portainer as i mentioned earlier, then restore your apps in portainer as mentioned as well.

hopefully then u can successfully move from csv2 to csv3 from a clean slate, while still retaining your portainer config, and the other docker app configs.


disclaimer: i take no responsibility for any data loss. any advice provided is one i would do for myself (i practise what i preach) and to the best of my knowledge (i'm not an expert. i'm just a bit better than the average newb Image ). so if you want to seek a 2nd opinion, plz do
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Sevenfeet
Starting out
Posts: 43
Joined: Sat Jul 24, 2021 11:44 pm

Re: [GUIDE] Portainer docker on Container station

Post by Sevenfeet »

Moogle Stiltzkin wrote: Sat Dec 10, 2022 11:43 am
Sevenfeet wrote: Sat Dec 10, 2022 9:48 am My problem is that I used the guide that cocoates wrote a while back to do exactly what this guide does....create a portioner application (docker compose). This works well. But updating Portainer is now a problem. I created the old Portainer container in Container Station 2. Recreating the container is not an option in CS3 for the older container. So I could delete the container and start over, but I'm a newbie with this and have no idea how to do this. I think I'll need to ssh into the box and do some docker compose commands, but it would be nice to know where to start. Once it's dead, i think I can recreate everything quickly.
so u want to update portainer ya?

i bit a bullet for you to try test this out Image
Well what you had laid out was what I was trying to do before I came here. :). But here's my problem....there is no "Edit" button for the Portainer application or the associated container.
Screen Shot 2022-12-10 at 8.53.47 AM.png
Why? My quess is that if you mouseover the information icon for the application, you read this:
Screen Shot 2022-12-10 at 8.56.27 AM.png
And I thought I had created this in Container Station 2 as part of a YAML script. So i have very little control over it. I can't even delete the application from CS3. So I'm trying to figure out how to start over from scratch and perhaps delete it from the command line in a SSH session and then begin again. I'm not using Watchtower yet, but that would be next if I can fix this problem.

Any ideas on how to nuke my portainer? I don't seem to have this problem for the other two containers I am running now.
You do not have the required permissions to view the files attached to this post.
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

Sevenfeet wrote: Sat Dec 10, 2022 11:04 pm
Why? My quess is that if you mouseover the information icon for the application, you read this:

Screen Shot 2022-12-10 at 8.56.27 AM.png

And I thought I had created this in Container Station 2 as part of a YAML script. So i have very little control over it. I can't even delete the application from CS3. So I'm trying to figure out how to start over from scratch and perhaps delete it from the command line in a SSH session and then begin again. I'm not using Watchtower yet, but that would be next if I can fix this problem.

Any ideas on how to nuke my portainer? I don't seem to have this problem for the other two containers I am running now.
sems like your on cs v3 :'

in your screenshot for applications, click portainer. then in the next page, select the tick box for portainer, then click the triangle to the right of edit. it should show the recreate. at least mine does.


*update

oo i c now. Yours has the bubble hover on thing. mine doesn't. Because i created the portainer using container station v3.

Not sure how you did yours, but if you want to follow my setup which initially sets up portainer using container station v3, you may need to DELETE that portainer container within cs. Then re-add it again using my portainer install guide (and check if it still has the hover on).

I'll post a screenshot what mine looks like.
Image

see my portainer DOES NOT have the "i" or the hover on indicator warning. And it does have the recreate.

The reason why the OTHER apps beside portainer has the "i" + pop over tooltip similar to yours, is because those were created using docker composer using portainer :D

basically you created your portainer some other method, so this is why you're locked out from the recreate option like you said.


Only solution is probably to delete portainer (from cs), then reinstall that. backup your docker permanent storage locations before you do :'
I use templates to quickly redeploy the apps, and when point to the app permanent storage location, the apps correctly restore to their previous working condition.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

i see u click the tick box for your portainer. do you see actions? if you click that it will have a pulldown menu. are you able to remove there? if so do that. *backup first

*update

i just tested myself. If the docker item has that "i" hover over thing you mentioned, it doesn't provide the option within the UI to remove..... (i can remove for the portainer which doesn't have those things. thats the difference between the 2).

i don't have a commandline solution for you as this is outside my expertise :S


all i can think of is to attempt to remove container station, then delete container-station-data, then install cs v3 from scratch.

Then from there to install portainer as per my guide.

Then from portainer, use your previously saved custom templates to redeploy your apps. or if your stacks are showing active, try stop then start to see if your apps go back online? if not just deploy from your stack.


Recovery though HINGES on whether you had previously setup permnanet/persistent storage locations for your docker apps which will retain your saved config and other important stuff for those apps to be able to make a recovery of the previous settings for those apps. OTHERWISE u will have to start from scratch.


the important stuff for successful recovery of docker apps.

1. persistent storage for docker apps.
2. save custom templates for docker compose (for easy deploys)
3. backup your persistent storage being used for the docker apps
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Sevenfeet
Starting out
Posts: 43
Joined: Sat Jul 24, 2021 11:44 pm

Re: [GUIDE] Portainer docker on Container station

Post by Sevenfeet »

Uninstalling Container Station I guess is the ultimate "nuke" option. I'm currently running three containers inclduing Portainer....Transmission (which is fairly easy to recreate and has a persistent storage folder) and Homebridge which I have a couple of things configured but I don't use much and I could easier redo all of it. Homebridge doesn't have a folder so I'd lose the environment but again, not a huge problem.
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

Sevenfeet wrote: Sun Dec 11, 2022 12:57 am Uninstalling Container Station I guess is the ultimate "nuke" option. I'm currently running three containers inclduing Portainer....Transmission (which is fairly easy to recreate and has a persistent storage folder) and Homebridge which I have a couple of things configured but I don't use much and I could easier redo all of it. Homebridge doesn't have a folder so I'd lose the environment but again, not a huge problem.
if you nuke your container station, start a new, you can then setup portainer as i did.

then using portainer you can setup your apps using custom templates by saving docker compose for your docker apps.

also use persistent storage for your docker apps.

this way you can backup your docker appss (the persistent storage location you are using), and are able to recover if for some reason you need to reintiailize your qnap at some point. i tested this out and explained what happened when i did so, and how i successfully backed up and recovered my docker apps.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

Found more sources that discuss the issue for how to setup static ips using portainer


viewtopic.php?t=130446

https://www.reddit.com/r/qnap/comments/ ... rr_bazarr/

https://www.reddit.com/r/qnap/comments/ ... ing_fubar/

https://www.reddit.com/r/qnap/comments/ ... 250312_if/

https://www.reddit.com/r/qnap/comments/ ... s_macvlan/

https://www.baeldung.com/ops/docker-** ... -container




some interesting posts
lunamonkey-

I know this is an old post, but it's the second hit on google for this issue.

If you find yourself without a QNAP network, and you try making a new one in Portainer (which fails) and then try in Docker (which fails)

> Then go back to Container station (which you forgot existed) and make a new simple Container, like NGINX, but choose BRIDGE in the network, select a random MAC.

Let this spin up, and when you return to Portainer, you will find your QNAP / QNET network created under networks.

(Tested on Container Station 2.6)
sauce
https://www.reddit.com/r/qnap/comments/ ... ing_fubar/

JumbledThought-

There's a bit of documentation for the Qnet docker network driver in the container station docs.
https://qnap-dev.github.io/container-st ... er-command

The "application" info there is useful if you want to use the command line to create docker-compose applications that you can interact with via the UI (like your docker-compose.yml file here).
sauce
https://www.reddit.com/r/qnap/comments/ ... rr_bazarr/




the easiest way i know is to create application in container station (i used v3 beta) using your docker compose, then in the container go advance, network, change to custom, bridge mode, enable static ip (modify to the ip you want), then deploy/recreate.

Image



Problem doing this though, because you created using cs, it gets flagged in portainer as limited, which is not ideal. So this is what i am researching right now, so i can setup the static ip using portainer, rather than having to do it via container station v3 like i am right now.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
peelos
Been there, done that
Posts: 580
Joined: Sun Jun 26, 2016 9:28 pm

Re: [GUIDE] Portainer docker on Container station

Post by peelos »

that is a loooot of info to dig through, thanks for all of the links of reading..

I solved it this way:

1. Create a backup of current portainer settings from within portainer>settings

2. Stopper portainer running in container station

3. Created a share folder: /config/portainer/

4. Connected to qnap via SSH and followed these steps to install :

https://install.portainer.io/be-standalone-linux

quick version ran this:

Code: Select all

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer_new --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v /share/config/portainer/portainer_data:/data \
    portainer/portainer-ce:latest
5. Restored the backup file

EDIT: updated the volume to the correct share path
Last edited by peelos on Wed Jan 04, 2023 2:26 am, edited 1 time in total.
NAS: TVS-1282-i7-7700-40G / 4 x 500GB SSD 2.5" RAID 10 / 2 x 500GB M.2 SSD / 8 x 12TB WD Whites 3.5" RAID 6 / Noctua L9x65 / 3 x 80mm PWM Noctua fans / Corsair 600W PSU / Asus Turbo GTX 1060 6GB GPU
Software: Plex Media Server / Transmission / Sonarr / Radarr / Bazarr / Jackett / Tautulli / Home Assistant / Resilio Sync / Python / NetData / SortMyQPKGs
pfSense Firewall / OpenVPN Server: QOTOM Fanless Mini PC / Core i5 / 8GB RAM / 128GB SSD / 4 Gigabit NICs / AES-NI
Wireless Routers: 2 x Netgear AC1900 R7000 Nighthawk / 1 x Netgear AC3200 R8000 Nighthawk / FreshTomato Firmware
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Portainer docker on Container station

Post by Moogle Stiltzkin »

peelos wrote: Thu Dec 15, 2022 4:02 pm that is a loooot of info to dig through, thanks for all of the links of reading..

I solved it this way:

1. Create a backup of current portainer settings from within portainer>settings

2. Stopper portainer running in container station

3. Created a share folder: /config/portainer/

4. Connected to qnap via SSH and followed these steps to install :

https://install.portainer.io/be-standalone-linux

quick version ran this:

Code: Select all

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer_new --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v /config/portainer/portainer_data:/data \
    portainer/portainer-ce:latest
5. Restored the backup file
good tip. i'll try this next time first. if it doesn't work well i can always revert. but i suspect it should be fine :} i just wasn't aware of this other method.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Post Reply

Return to “Users' Corner”