{"id":117,"date":"2021-09-30T19:26:34","date_gmt":"2021-09-30T19:26:34","guid":{"rendered":"https:\/\/dinodevs.com\/blog\/?p=117"},"modified":"2024-06-11T20:01:54","modified_gmt":"2024-06-11T17:01:54","slug":"installing-gogs-git-server-on-raspberry-pi","status":"publish","type":"post","link":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/","title":{"rendered":"Installing Gogs Git Server on Raspberry Pi"},"content":{"rendered":"\n<p>Git is a must-have utility for programmers. It allows you to track code changes and easily share your code with others enabling remote collaboration. Online git services like GitHub, GitLab, and Bitbucket are nowadays accessible for everyone, though sometimes the need to self-host a private service arises.<\/p>\n\n\n\n<p>Gogs is an open-source git server, light enough to run on a Raspberry Pi. It is written in Go Lang and provides pre-compiled binaries for arm architectures.<\/p>\n\n\n\n<p>In this tutorial, we will install <a href=\"https:\/\/gogs.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Gogs<\/a> on a Raspberry Pi 2. So, first, connect to your Raspberry, and let&#8217;s start!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"update-your-system\">Update your system<\/h2>\n\n\n\n<p>To start with, update our system and install any missing dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo apt update\nsudo apt install wget unzip git -y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prepare-for-installation\">Prepare for installation<\/h2>\n\n\n\n<p>We will create a special user called git to operate the Gogs server. The following command will create the user and disable his password:<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo adduser --system --shell \/bin\/bash --gecos \"User for managing of gogs server\" --group --disabled-password --home \/home\/git git<\/code><\/pre>\n\n\n\n<p>The next thing we will have to do is to download the pre-compiled Gogs package. Check the latest versions available at <a href=\"https:\/\/dl.gogs.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/dl.gogs.io\/<\/a>. At the time of writing this report the latest version is 0.12.3 so we downloaded the <code>gogs_0.12.3_linux_armv7.zip<\/code> package (armv7architecture is compatible with Raspberry Pi 2, 3, and 4).<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo su -c 'su git -c \"wget https:\/\/dl.gogs.io\/0.12.3\/gogs_0.12.3_linux_armv7.zip -O ~\/gogs_download.zip\"'<\/code><\/pre>\n\n\n\n<p>After the download completes, unzip the package and then you may delete it.<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo su -c 'su git -c \"unzip ~\/gogs_download.zip -d ~\/\"'\nsudo su -c 'su git -c \"rm ~\/gogs_download.zip\"'<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"start-the-server\">Start the server<\/h2>\n\n\n\n<p>Now let&#8217;s setup the Gogs service to manage the server. Download the service script from the Gogs repo:<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo wget https:\/\/raw.githubusercontent.com\/gogs\/gogs\/main\/scripts\/systemd\/gogs.service -O \/lib\/systemd\/system\/gogs.service<\/code><\/pre>\n\n\n\n<p>And then, enable the service and run it.<\/p>\n\n\n\n<pre class=\"wp-block-code lang-shell\"><code>sudo systemctl enable gogs\nsudo service gogs start<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"follow-the-web-installer\">Follow the web installer<\/h2>\n\n\n\n<p>Now browse to the installation located at <code>http:\/\/&lt;your-raspbery-ip&gt;:3000\/install<\/code> and complete the installation steps.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git is a must-have utility for programmers. It allows you to track code changes and easily share your code with others enabling remote collaboration. Online git services like GitHub, GitLab, and Bitbucket are nowadays accessible for everyone, though sometimes the need to self-host a private service arises. Gogs is an open-source git server, light enough [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":189,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15,4,7,14],"class_list":["post-117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-git","tag-linux","tag-raspberry-pi","tag-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing Gogs Git Server on Raspberry Pi - DinoDevs<\/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:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Gogs Git Server on Raspberry Pi - DinoDevs\" \/>\n<meta property=\"og:description\" content=\"Git is a must-have utility for programmers. It allows you to track code changes and easily share your code with others enabling remote collaboration. Online git services like GitHub, GitLab, and Bitbucket are nowadays accessible for everyone, though sometimes the need to self-host a private service arises. Gogs is an open-source git server, light enough [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"DinoDevs\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-30T19:26:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-11T17:01:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"346\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Athanasios Grammatopoulos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Athanasios Grammatopoulos\" \/>\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\":\"Article\",\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\"},\"author\":{\"name\":\"Athanasios Grammatopoulos\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/fccac7bcc5374cede43de49a450dfaf3\"},\"headline\":\"Installing Gogs Git Server on Raspberry Pi\",\"datePublished\":\"2021-09-30T19:26:34+00:00\",\"dateModified\":\"2024-06-11T17:01:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\"},\"wordCount\":251,\"publisher\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg\",\"keywords\":[\"git\",\"linux\",\"raspberry pi\",\"server\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\",\"url\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\",\"name\":\"Installing Gogs Git Server on Raspberry Pi - DinoDevs\",\"isPartOf\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg\",\"datePublished\":\"2021-09-30T19:26:34+00:00\",\"dateModified\":\"2024-06-11T17:01:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage\",\"url\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg\",\"contentUrl\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg\",\"width\":1024,\"height\":346},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dinodevs.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Gogs Git Server on Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#website\",\"url\":\"https:\/\/dinodevs.com\/blog\/\",\"name\":\"DinoDevs\",\"description\":\"When in doubt, code it out.\",\"publisher\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dinodevs.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#organization\",\"name\":\"DinoDevs\",\"url\":\"https:\/\/dinodevs.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2025\/05\/dinodevs.cube_.png\",\"contentUrl\":\"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2025\/05\/dinodevs.cube_.png\",\"width\":600,\"height\":600,\"caption\":\"DinoDevs\"},\"image\":{\"@id\":\"https:\/\/dinodevs.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/fccac7bcc5374cede43de49a450dfaf3\",\"name\":\"Athanasios Grammatopoulos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0271fabc59edad96ed659fb1a3c4caf867a7324609e22d0b2cc25ad71d4c0d8c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0271fabc59edad96ed659fb1a3c4caf867a7324609e22d0b2cc25ad71d4c0d8c?s=96&d=mm&r=g\",\"caption\":\"Athanasios Grammatopoulos\"},\"sameAs\":[\"https:\/\/github.com\/GramThanos\"],\"url\":\"https:\/\/dinodevs.com\/blog\/author\/gramthanos\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing Gogs Git Server on Raspberry Pi - DinoDevs","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:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/","og_locale":"en_US","og_type":"article","og_title":"Installing Gogs Git Server on Raspberry Pi - DinoDevs","og_description":"Git is a must-have utility for programmers. It allows you to track code changes and easily share your code with others enabling remote collaboration. Online git services like GitHub, GitLab, and Bitbucket are nowadays accessible for everyone, though sometimes the need to self-host a private service arises. Gogs is an open-source git server, light enough [&hellip;]","og_url":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/","og_site_name":"DinoDevs","article_published_time":"2021-09-30T19:26:34+00:00","article_modified_time":"2024-06-11T17:01:54+00:00","og_image":[{"width":1024,"height":346,"url":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg","type":"image\/jpeg"}],"author":"Athanasios Grammatopoulos","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Athanasios Grammatopoulos","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#article","isPartOf":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/"},"author":{"name":"Athanasios Grammatopoulos","@id":"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/fccac7bcc5374cede43de49a450dfaf3"},"headline":"Installing Gogs Git Server on Raspberry Pi","datePublished":"2021-09-30T19:26:34+00:00","dateModified":"2024-06-11T17:01:54+00:00","mainEntityOfPage":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/"},"wordCount":251,"publisher":{"@id":"https:\/\/dinodevs.com\/blog\/#organization"},"image":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg","keywords":["git","linux","raspberry pi","server"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/","url":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/","name":"Installing Gogs Git Server on Raspberry Pi - DinoDevs","isPartOf":{"@id":"https:\/\/dinodevs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg","datePublished":"2021-09-30T19:26:34+00:00","dateModified":"2024-06-11T17:01:54+00:00","breadcrumb":{"@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#primaryimage","url":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg","contentUrl":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2021\/09\/raspberry-pi-gogs.jpg","width":1024,"height":346},{"@type":"BreadcrumbList","@id":"https:\/\/dinodevs.com\/blog\/installing-gogs-git-server-on-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dinodevs.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Installing Gogs Git Server on Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/dinodevs.com\/blog\/#website","url":"https:\/\/dinodevs.com\/blog\/","name":"DinoDevs","description":"When in doubt, code it out.","publisher":{"@id":"https:\/\/dinodevs.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dinodevs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dinodevs.com\/blog\/#organization","name":"DinoDevs","url":"https:\/\/dinodevs.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dinodevs.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2025\/05\/dinodevs.cube_.png","contentUrl":"https:\/\/dinodevs.com\/blog\/wp-content\/uploads\/2025\/05\/dinodevs.cube_.png","width":600,"height":600,"caption":"DinoDevs"},"image":{"@id":"https:\/\/dinodevs.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/fccac7bcc5374cede43de49a450dfaf3","name":"Athanasios Grammatopoulos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dinodevs.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0271fabc59edad96ed659fb1a3c4caf867a7324609e22d0b2cc25ad71d4c0d8c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0271fabc59edad96ed659fb1a3c4caf867a7324609e22d0b2cc25ad71d4c0d8c?s=96&d=mm&r=g","caption":"Athanasios Grammatopoulos"},"sameAs":["https:\/\/github.com\/GramThanos"],"url":"https:\/\/dinodevs.com\/blog\/author\/gramthanos\/"}]}},"_links":{"self":[{"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":6,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions\/252"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/media\/189"}],"wp:attachment":[{"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dinodevs.com\/blog\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}