Toggle navigation

Gogs Image Guide

Version 0.11.34

Websoft9 Gogs is a pre-configured, ready to run image for running Gogs on Cloud.

Gogs is a painless self-hosted Git service.The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across ALL platforms that Go supports, including Linux, Mac OS X, Windows and ARM.

Application Software(Gogs)
Gogs directory:/data/wwwroot/gogs

Application Server(Nginx1.12,Go)
Nginx configure file:/etc/nginx/sites-available/default

MySQL data directory:/data/mysql

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address and you can enter the installation page directly,if there no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Local Chrome or Firefox to visit http://Internet IP Address to start the installation:

  1. Complete you Database Settings(We suggest you modify the MySQL default password of root,refer to Will be used Usernames and Passwords)
  2. Complete the Application General Settings
  3. Click the button “Install Gogs”,if intall successfully,you can see the log in page below:
  4. Click the link “dd” to create an administrator account
  5. After complete the register,log in to Gogs

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、Gogs:Username and Password is set by youself when installation,
2、MySQL Database:Default username and password is root/123456

3、Linux Server:Username is root,Password is set by youself when buying.
Please Using the Putty for ssh remote and WinSCP for SFTP

Note:You can reset the password of OS through Cloud Console if you have forgotten it

Connect to a Linux instance using Windows OS

This section uses PuTTY as an example. PuTTY can be downloaded here.

You can connect to a Linux instance via PuTTY as follows:

  1. Start Putty.exe.
  2. Enter the public IP address of the instance in Host Name (or IP address).
  3. Use the default port 22.
  4. Select SSH as Connection Type.
  5. Type a session name in Saved Sessions, and then click Save. In later logins, you may directly load the session without re-entering the IP address.
  6. Click Open to connect.
  7. Upon first connection, the following dialog box will be displayed. Click Yes.
  8. As prompted, enter the username and password for the Linux ECS instance. The password will not be displayed on-screen. Press the Enter key to complete connection to the instance.

When you connect your computer to the Linux instance successfully, you can operate the instance from your computer.

Use SFTP you can mange file,upload and download file,configure Server.

  1. Start WinSCP. Login Dialog will appear.
  2. Then select your File protocol(SFTP) on the dialog
  3. Enter your host name to Host name field, username to User name and password to Password like below
  4. You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  5. When appear the dialog below,please select the “yes”
  6. You can manane Linux file below
  7. WinSCP can integrate the Putty and transfer the log in information to Putty
  8. Now you can use Putty(Not need to log in) from the menu bar of WinSCP

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup,manual local backup,using plugin to backup in three ways, three of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

This is coming soon…

Use domain you should complete the following steps:

Step One:Domain resolution

Domain Name Resolution indicates the way your domain names are resolved to their mapped IP address. The majority of resolutions from domain names to IP addresses are done through a procedure called DNS. After the resolution, the domain name can be used to access Internet in a much more convenient way.

You can use Alibaba Cloud DNS in sync with the Domain service. Alibaba Cloud DNS provides authoritative DNS servers and DNS management services.

  1. Login Cloud Console->DNS Settings->Add Record,set Domain Resolution:
  2. The type is A record,host is your sub domain,value is your Internet IP Address.Confirm it
    Host use @ to exactly match the original domain name (for example, yourdomain.tld).
  3. After the Domain Name Resolution please waite for some time until it’s useful(This time is different for different provider of Domain,from 1 minute to 24h)

Note:Please clear the browser cache when Domain Name Resolution is useful but you browser seem is also feedback the old contents of your site


~# systemctl restart gogs


This document is original from Websoft9.In order to ensure the seriousness and usability of the documentation, no one may misappropriate or modify the second distribution. The need for friends reproduced please mark the source, otherwise we reserve the right to give legal action.

We will periodically update the documentation. Please visit the online documentation for the latest version

This document URL:
Support & Partnership: