How to Install Fossil Version Control System in Linux

by Lenny Zulauf
22 minutes read

How to Install Fossil Version Control System in Linux

A image of a computer system display display sporting JavaScript code.

Fossil is a effective incarnation manipulate system (VCS) for Linux. It is an substitute to Github, however polymorphous Git, it works by presenting a extensive caboodle of contraptions for prospering, equalizing, and even sharing your repository online. This write-up will show you how to install and deploy Fossil on Ubuntu Linux.

Material
  • Why Utilise Fossil Over Git
  • Bring Fossil’s Requirements and Docker
  • Earn-up and Placing Fossil in Linux
  • Rushing Fossil and Eliciting an SSL Reverse Proxy
  • Eliciting Your Initially Fossil Documents source

Why Utilise Fossil Over Git

One of the greatest selling junctures of Fossil is that it’s an with one voice-in-one caboodle for taking care of your resource code online. This supplies it madly convenient for users who simply cramp to share a singular repository through other human beings without prospering either a Github or Gitlab account.

Aside from that, Fossil is similarly highly versatile and madly simplified to self-host. It can dashed either as a singular static binary in your system or in a self-contained Docker canister. Subsequently, it’s awfully petite to invade Fossil and readjust it for your super own needs.

While Fossil and Git share unmodified operating phrase look, Fossil offers second features that are hard to enforce in Git. For instance, Fossil discourages the “detached HEAD” priority by presenting an interior file source that trails the referrals in between previous and future perpetrates. Subsequently, Fossil repos are extraneous sleek and discourage-unshackle contrasted to Git.

Another merit of Fossil over Git is that it needs less dependences and memory to dashed while presenting features right out of the box. A Fossil instance has its elaboration board, wiki, and priority tracker. This supplies Fossil an paired solution for any guy who wants a “no-rumpus” seating for sharpening and publishing code.

Nice to understand: situate out some of the tidy Git hooks to take treatment of your repository.

Bring Fossil’s Requirements and Docker

The initially interfere sending out Fossil is to extensive the repository documents for Docker. To implement that, bring the signing secret for the Docker job:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg<br>sudo chmod a+r /etc/apt/keyrings/docker.gpg

Invent a new-fashioned paper under “/etc/appropriate/resources.list.d.” This will have the repository institution where Ubuntu will bring the Docker packages:

sudo nano /etc/apt/sources.list.d/docker.list

Paste the coordinating through code within your new-fashioned repository paper:

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable

Preserve your Docker repository paper, after that install the core snap scheme:

sudo snap install core

Download the Certbot snap scheme from the Electronic Frontier Cornerstone:

sudo snap install certbot --classic

Run the coordinating through command to freshen your system’s scheme listings:

sudo apt update && sudo apt upgrade

Mount Docker and Nginx along through their dependency packages:

sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-buildx-plugin nginx

Earn-up and Placing Fossil in Linux

Navigate to the download web page for Fossil, after that pick the resource tarball for the newest stable cost-free of charge. In my shuck, I will download incarnation 2.23 of Fossil.

A screenshot accentuating the institution for the newest stable cost-free of charge for Fossil.

Relocation the resource tarball to your abode magazine, after that remove it:

mv ~/Downloads/fossil-src-2.23.tar.gz<br>tar xvzf ~/fossil-src-2.23.tar.gz

Go within your tarball’s folder, after that amenable Fossil’s Dockerfile making gain serviceability of of your favorite message editor:

cd ~/fossil-src-2.23<br>nano ./Dockerfile

Scroll down to the bottom of the paper, after that have the coordinating through in yesteryear the "--user", "admin" ] pitch:

"--https",              
A terminal accentuating the "--https" flag to enable HTTPS by default in Fossil.

Preserve your revised Dockerfile, after that construct your canister image:

sudo docker build -t fossil .

Rushing Fossil and Eliciting an SSL Reverse Proxy

You currently have a new-fashioned instance of Fossil VCS sprinting as a Docker canister on your server. To accesses it, you need to encrypt any type of outward rapports to Fossil.

To overture, model a new-fashioned DNS “A” document pointing to the IP address of your Fossil server.

A screenshot disclosing the A DNS document for Fossil.

Utilise your favorite message editor to model a new-fashioned web site arrangement paper for your Fossil instance:

sudo nano /etc/nginx/sites-available/fossil-scm

Paste the coordinating through block of code within your new-fashioned web site arrangement paper:

server {<br><br>        server_name SUBDOMAIN.YOUR-ROOT.DOMAIN;<br><br>        location / {<br>                proxy_pass http://127.0.0.1:7777;<br>                proxy_http_version 1.1;<br>                proxy_set_header Upgrade $http_upgrade;<br>                proxy_set_header Connection "upgrade";<br>                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>                proxy_set_header Host $host;<br>        }<br>}

Modification the server_name variable through your subdomain for Fossil.

A terminal disclosing a reverse proxy web site config paper in Nginx.

Invent a symbolic institution for your web site arrangement paper to “/etc/nginx/sites-permitted/”:

sudo ln -s /etc/nginx/sites-available/fossil-scm /etc/nginx/sites-enabled/

Overture your system’s Nginx daemon making gain serviceability of of systemctl:

sudo systemctl enable --now nginx.service<br>sudo systemctl reload nginx.service

Overture your new-fashioned Fossil Docker image by sprinting the coordinating through command:

sudo docker run <br>    --publish 7777:8080 <br>    --name fossil <br>    --cap-drop AUDIT_WRITE <br>    --cap-drop CHOWN <br>    --cap-drop FSETID <br>    --cap-drop KILL <br>    --cap-drop MKNOD <br>    --cap-drop NET_BIND_SERVICE <br>    --cap-drop NET_RAW <br>    --cap-drop SETFCAP <br>    --cap-drop SETPCAP <br>    fossil

Open a new-fashioned Tmux panel by pressuring Ctrl + B, after that C. Within, dashed the coordinating through command to entreaty an SSL certificate from Certbot:

sudo certbot --nginx -d fossil-scm.myvpsserver.top

Checkup if your Fossil instance is obtainable over the web by browsing to your subdomain.

A screenshot disclosing the landing web page for a freshly mounted Fossil instance.

Nice to understand: situate out how you can model petite webpages through automatic HTTPS making gain serviceability of of Caddy.

Eliciting Your Initially Fossil Documents source

Wearing Fossil up and sprinting in your Linux server, you can currently configure your new-fashioned instance. Click the setup/config institution under the Residence sector.

A screenshot accentuating the

Furnish the manager account’s niceties, after that click log in. You can situate the password for the admin account in the output log of your Docker canister.

A screenshot accentuating the random password for the admin account.

Fill in both the Vacancy Moniker and Vacancy Description textboxes through your repository niceties, after that click Use Remodellings to conserve it.

A screenshot accentuating the

Cloning and Making gain serviceability of of Your Fossil Documents source

To gain serviceability of your new-fashioned code repository, you need to initially model a plagiarise of it on your machine. To implement that, install a stretch incarnation of Fossil on your Linux desktop computer:

sudo apt install fossil

Yank the entire repository to your machine and go within its repository folder:

fossil clone https://SUBDOMAIN.YOUR-ROOT.DOMAIN<br>cd ./YOUR-REPO-NAME

Add your initially documents, after that lug out the readjusts to your Fossil repository:

nano ./sample.file<br>fossil add ./sample.file<br>fossil commit

Furnish the niceties of your initially lug out, after that conserve it by prospering a new-fashioned pitch that starts through a period (.).

A terminal disclosing the lug out message layout for Fossil.

FYI: situate out the basics of code dealing with by prospering your super own Git repository.

Inspiring Regional Remodellings to Your Noncombatant Fossil Documents source

By default, Fossil doesn’t administer any type of write sanctions to its remote databases. Any kind of readjusts you gain to your stretch repository will stay there and not reflect in your Fossil instance.

To modify this, attend your Fossil instance’s web user interface after that login as the manager account.

Click the Admin style on the control panel’s elevation nutrition selection.

A screenshot disclosing the locale of the "Admin" nutrition selection thing in the Fossil control panel.

Appoint Consumers on the manager’s manipulate panel.

A screenshot disclosing the

Click Add to model a new-fashioned user for your repository.

A screenshot disclosing the locale of the "Add" button for prospering new-fashioned users.

Furnish a username and a password for your new-fashioned user.

Tick the Creator checkbox on the Capacities style, after that click Use Remodellings to conserve your new-fashioned user.

A screenshot disclosing the default committer setup for a new-fashioned Fossil user.

Modification to your stretch terminal, after that dashed the coordinating through command:

fossil push https://YOUR-USERNAME@SUBDOMAIN.YOUR-ROOT.DOMAIN

Tab: you can similarly bring new-fashioned readjusts from your remote Fossil repository by sprinting fossil pull.

Type the password for your Fossil user, after that press Get in to push the stretch readjusts to your remote repository.

Attest that your remote Fossil repo has received your stretch lug out by browsing to its web user interface.

A screenshot disclosing the instance lug out paper in the self-hosted Fossil instance.

Placing and sending out your super own Fossil incarnation manipulate system is simply the initially interfere collaring previously manipulate of your online file. Detect out how you can peg your online involvements by hosting your super own email pen names server through SimpleLogin.

Pic credit: Panjak Patel through Unsplash. Unanimously amendments and screenshots by Ramces Red.

Related Posts