diff --git a/dicos/50_gogs.xml b/dicos/50_gogs.xml
index c32fd95..ea723d0 100644
--- a/dicos/50_gogs.xml
+++ b/dicos/50_gogs.xml
@@ -33,6 +33,9 @@
/var/db/gogs/repo
+
+ non
+
3000
diff --git a/tmpl/gogs.conf b/tmpl/gogs.conf
index 0d9c915..22656cb 100644
--- a/tmpl/gogs.conf
+++ b/tmpl/gogs.conf
@@ -76,8 +76,13 @@ ACTIVE_CODE_LIVE_MINUTES = 180
RESET_PASSWD_CODE_LIVE_MINUTES = 180
; User need to confirm e-mail for registration
REGISTER_EMAIL_CONFIRM = false
+%if %%getVar('gogs_registration','non') == 'non'
; Does not allow register and admin create account only
DISABLE_REGISTRATION = false
+%else
+; Does not allow register and admin create account only
+DISABLE_REGISTRATION = true
+%end if
; User must sign in to view anything.
REQUIRE_SIGNIN_VIEW = false
; Cache avatar as picture