[BEGINNER] Need help launching gogs at startup and creating deployment scripts


I’m currently running gogs on a Rasbian Stretch, binary version 0.11.29 with a MySQL server.

I’m afraid I can’t figure out how to add gogs properly at launch. I think I’ve located the script I should be using in “/home/git/gogs/scripts/init/debian” but I don’t know how to add it properly.

Question 1: how do I add gogs at startup?

I started contributing by putting our website’s source code (PHP/CodeIgniter) on it, but I don’t know how to automatically copy it over to our webserver when a major version is contributed.

Question 2: where can I make gogs execute a deployment script when a major version is contributed?

Thanks in advance


Hi, I’m not sure what is your question…

But for start part, you can Google for how to start a process in the background and to use Gogs you have to have basic knowledge of Git Version Control System otherwise it’s impossible to use this software.


For Debian users, here is the complete modop for adding it to startup:

sudo cp /home/git/gogs/scripts/init/debian/gogs /etc/init.d
sudo chmod 755 /etc/init.d/gogs 
sudo chown root:root /etc/init.d/gogs
sudo update-rc.d gogs defaults


Now I’m even more confused, what are you trying to ask/know?


I answered the first question I had. So that people having the same issue can find a fast answer :slight_smile:

I’ll add the deployment part as soon as I’ve figured it out.


If you’re looking for a simple deployment solution, here is one: https://gist.github.com/nichtich/5290675