Don’t want to push your code to a hosted Git repository?

Then run your own Git server in-house.

Gogs is the easiest way to do that.

Right-click context menu with “Extract” option highlighted

Here’s how to set it up.

The Problem With Cloud-Hosted Repositories

Without a doubt,Gitis the preeminent version control system.

Even with single-developer projects, Git provides value and benefit because of its versioning functionality.

The extracted directory, named after the downloaded file

For multi-developer projects, Git brings another dimension entirely.

Related:What Is GitHub, and What Is It Used For?

That’s why services likeGitHub,GitLab, andBitBucketexist, and why they’ve seen such uptake and growth.

The gogs directory

GitHub alone hosts over 200 million repositories.

But cloud-hosted repositories don’t suit everyone.

Most of them charge to host private repositories.

Right-click context menu with “open in Terminal” option highlighted

Some of them impose storage limits, user limits, or data transfer limits on free accounts.

That’s where Gogs comes in.

What Is Gogs?

Starting the gogs Git server

Gogsis a relatively new project, written inGo, that delivers an easy-to-install, yet fully-featured Git instance.

There are no limits to team size, storage, or anything else.

You fill out a few forms, and Gogs initializes your repository and adds you as the admin user.

The database selection menu portion of the Gogs configuration screen

it’s possible for you to then browse to your Gogs instance and add users and create repositories.

Gogs uses a database for its back-end storage.

It supportsMySQL,MariaDB,PostgreSQL, andTiDB.

The “Run User” field of the Gogs configuratrion screen

For smaller teams, it’s possible for you to useSQLite3.

If you opt for SQLite3, it’s installed for you.

Of course, you’ll need tohave

installed, too.

The “Email Service Settings” portion of the Gogs configuration screen

We downloaded the “Linux amd64” ZIP file, for installation onto a 64-bit computer with Ubuntu 22.10.

The file is small—only about 25MB—so don’t be surprised if it downloads very quickly.

Locate the file in your file system.

The Gogs home page

Some file browsers might use “Extract Here” instead.

A directory is extracted from the ZIP file.

It’s named after the downloaded file.

Creating an account on the Gogs server

In our case, it was called “gogs_0.11.91_linux_amd64.”

Double-poke the extracted directory and you’ll see another directory called “gogs.”

Double-poke the “gogs” directory.

Signing in to Gogs

You’ll see the Gogs files and directories.

Right-click in the file net internet ride window and select “Open in Terminal” from the context menu.

Add “:3000” after the IP address or internet name.

The Gogs dashboard before any repositories have been created

Don’t include any whitespace.

The first time you do this, you’ll see the form that captures some initial setup information.

If you want to set up email notifications you’ll need to configure a few extra steps.

Creating a new repository by providing a name and other details

This will require options on the mail server to allow your account to accept and relay the email.

These parameters vary from mail server to mail server.

Gogs requires you to enter the following information about your email server.

Three fields that control the creation of default files from templates

smack the blue “Install Gogs” button when you’re ready to proceed.

Gogs writes a configuration file, initializes the database storage, and starts up your Git instance.

You’ll see the main Gogs home page.

A newly created repository containing three auto-generated files

The first user account you create will automatically be given administrator rights.

nudge the “Register” link.

smack the green “Create New Account” button.

Adding a file to the local repository and pushing it to Gogs

You’ll see the “Sign In” page.

slide in your account name and password, and choose the green “Sign In” button.

The Gogs “Dashboard” view is a little sparse until you have a repository to work with.

The repository with the new file successfully pushed to it

tap the blue “+” button, and complete the “New Repository” form.

It asks for a repository name, whether it is private or public, and a description.

The next three fields createfilesfrom templates.

The contents of the auto-generated README.md file

Your new repository is displayed for you.

All of this was done using standard Git commands.

As expected, our new file shows up in our Gogs repository.

The updated README.md file

“README.md” files are usually written in Markdown.

By clicking on the “Edit” pencil icon, we can directly edit our “README.md” file.

We added some more text, used Markdown tags to insert hyperlinks and italics, and committed our changes.

The updated README.md file with a new commit message and timestamp

All from within Gogs.

The Easiest Git Server - Bar None

Gogs is an absolute triumph.

It perfectly blends functionality with simplicity.

Out of the box, it will meet the needs of the majority of hobbyist or small development teams.

Note that the path will reflect the version of Gogs you’re using.

General system administration can be performed from the admin panel, found at

.

If you’re wary aboutcloud-hostedrepositories that are ultimately under the control of others, consider using Gogs locally.

You won’t lose functionality, but you will gain control and guaranteed privacy.

Related:How to Check and refresh your Git Version