{"id":122,"date":"2020-11-16T14:01:33","date_gmt":"2020-11-16T13:01:33","guid":{"rendered":"https:\/\/ptdb.ch\/?p=122"},"modified":"2020-11-16T14:01:33","modified_gmt":"2020-11-16T13:01:33","slug":"how-to-deploy-postgresql-12-4-on-qnap-nas-tvs-682","status":"publish","type":"post","link":"https:\/\/ptdb.ch\/?p=122","title":{"rendered":"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682)"},"content":{"rendered":"<p>In older versions of the Qnap software, you could install PostgreSQL only via the AppCenter, which had the drawback that it supported usually a quite old PostgreSQL version. However, with newer firmware versions (4.5.1.1480 in my case) you are much more flexible. The reason for that is the container station, which is a very powerful feature.<\/p>\n<p>In this little blog post I will show you how to deploy PostgreSQL 12.4 on Debian 10 which runs directly on the Qnap NAS itself. I could have picked PostgreSQL 12.3 or 12.5 as well. But this is just to illustrate you how flexible you are.<\/p>\n<p>Sidenote: Before you deploy bigger databases on Qnap, I really would recommend to upgrade your physical RAM.<\/p>\n<p>So lets get started by just opening the container station and search for the image that you like to deploy. In my case it is PostgreSQL. \ud83d\ude42 It will point you to images from bitnami. For more information check out the following link: <a href=\"https:\/\/hub.docker.com\/r\/bitnami\/postgresql\">https:\/\/hub.docker.com\/r\/bitnami\/postgresql<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-123 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-001-300x164.jpg\" alt=\"\" width=\"300\" height=\"164\" \/><\/p>\n<p>After you have chosen your PostgreSQL Docker Image, you can select the version that you like. In my case it is PostgreSQL 12.4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-124 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-002-300x125.jpg\" alt=\"\" width=\"300\" height=\"125\" \/><\/p>\n<p>The next step is to give your container a name and specify the CPU and Memory limits.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-125 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-003-300x181.jpg\" alt=\"\" width=\"300\" height=\"181\" \/><\/p>\n<p>If you click on advanced settings, you can fine tune your new container ever more. An important piece is the environment variable POSTGRESQL_PASSWORD. You might choose a more secure password, than I did. \ud83d\ude42<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-126 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-004-300x242.jpg\" alt=\"\" width=\"300\" height=\"242\" \/><\/p>\n<p>And adjust the network settings according to your needs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-127 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-005-300x158.jpg\" alt=\"\" width=\"300\" height=\"158\" \/><\/p>\n<p>That&#8217;s more or less it. Afterwards you will see only the Summary screen and the backgroud task that builds your container.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-128 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-006-300x222.jpg\" alt=\"\" width=\"300\" height=\"222\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-129 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-007-300x154.jpg\" alt=\"\" width=\"300\" height=\"154\" \/><\/p>\n<p>Now the fun part begins where you can start the container and fire up the terminal and create your first PostgreSQL database on Qnap.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-130 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-008-300x123.jpg\" alt=\"\" width=\"300\" height=\"123\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-131 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-009-300x191.jpg\" alt=\"\" width=\"300\" height=\"191\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-132 zoooom\" src=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-010-300x138.jpg\" alt=\"\" width=\"300\" height=\"138\" \/><\/p>\n<p>Ready.<\/p>\n<h3>Conclusion<\/h3>\n<p>The container station is a very powerful part of the Qnap software stack, where you can easily deploy any PostgreSQL version that you wish.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In older versions of the Qnap software, you could install PostgreSQL only via the AppCenter, which had the drawback that it supported usually a quite old PostgreSQL version. However, with newer firmware versions (4.5.1.1480 in my case) you are much more flexible. The reason for that is the container station, which is a very powerful [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[6],"tags":[16,21,22],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-postgresql","tag-debian","tag-postgresql","tag-qnap","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ptdb.ch\/?p=122\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB\" \/>\n<meta property=\"og:description\" content=\"In older versions of the Qnap software, you could install PostgreSQL only via the AppCenter, which had the drawback that it supported usually a quite old PostgreSQL version. However, with newer firmware versions (4.5.1.1480 in my case) you are much more flexible. The reason for that is the container station, which is a very powerful [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ptdb.ch\/?p=122\" \/>\n<meta property=\"og:site_name\" content=\"ptdb - Platinum DB\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-16T13:01:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-001-300x164.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ptdb.ch\/?p=122\",\"url\":\"https:\/\/ptdb.ch\/?p=122\",\"name\":\"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB\",\"isPartOf\":{\"@id\":\"https:\/\/ptdb.ch\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ptdb.ch\/?p=122#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ptdb.ch\/?p=122#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-001-300x164.jpg\",\"datePublished\":\"2020-11-16T13:01:33+00:00\",\"author\":{\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\"},\"breadcrumb\":{\"@id\":\"https:\/\/ptdb.ch\/?p=122#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ptdb.ch\/?p=122\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ptdb.ch\/?p=122#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ptdb.ch\/?p=122#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ptdb.ch\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ptdb.ch\/#website\",\"url\":\"https:\/\/ptdb.ch\/\",\"name\":\"ptdb - Platinum DB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ptdb.ch\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ptdb.ch\"],\"url\":\"https:\/\/ptdb.ch\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ptdb.ch\/?p=122","og_locale":"en_US","og_type":"article","og_title":"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB","og_description":"In older versions of the Qnap software, you could install PostgreSQL only via the AppCenter, which had the drawback that it supported usually a quite old PostgreSQL version. However, with newer firmware versions (4.5.1.1480 in my case) you are much more flexible. The reason for that is the container station, which is a very powerful [&hellip;]","og_url":"https:\/\/ptdb.ch\/?p=122","og_site_name":"ptdb - Platinum DB","article_published_time":"2020-11-16T13:01:33+00:00","og_image":[{"url":"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-001-300x164.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ptdb.ch\/?p=122","url":"https:\/\/ptdb.ch\/?p=122","name":"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682) - ptdb - Platinum DB","isPartOf":{"@id":"https:\/\/ptdb.ch\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ptdb.ch\/?p=122#primaryimage"},"image":{"@id":"https:\/\/ptdb.ch\/?p=122#primaryimage"},"thumbnailUrl":"https:\/\/ptdb.ch\/wp-content\/uploads\/2020\/11\/PostgreSQL-Qnap-Container-Station-Create-001-300x164.jpg","datePublished":"2020-11-16T13:01:33+00:00","author":{"@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b"},"breadcrumb":{"@id":"https:\/\/ptdb.ch\/?p=122#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ptdb.ch\/?p=122"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ptdb.ch\/?p=122#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/ptdb.ch\/?p=122#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ptdb.ch\/"},{"@type":"ListItem","position":2,"name":"How To Deploy PostgreSQL 12.4 on Qnap NAS (TVS-682)"}]},{"@type":"WebSite","@id":"https:\/\/ptdb.ch\/#website","url":"https:\/\/ptdb.ch\/","name":"ptdb - Platinum DB","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ptdb.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/ptdb.ch"],"url":"https:\/\/ptdb.ch\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}