Fossil SCM

fossil-scm / www / selfhost.wiki
1
<title>Fossil Self-Hosting Repositories</title>
2
3
Fossil has self-hosted since 2007-07-21. As of 2025-02-11
4
there are three publicly accessible repositories for the Fossil source code:
5
6
1. [https://fossil-scm.org/]
7
2. [https://www2.fossil-scm.org/]
8
3. [https://www3.fossil-scm.org/]
9
10
The canonical repository is (1). Repositories (2) and (3) automatically
11
stay in synchronization with (1) via a
12
<a href="http://en.wikipedia.org/wiki/Cron">cron job</a> that invokes
13
"fossil sync" at regular intervals.
14
Repository (2) also publishes a
15
[https://github.com/drhsqlite/fossil-mirror|GitHub mirror of Fossil]
16
as a demonstration of [./mirrortogithub.md|how that can be done].
17
18
Note that the two secondary repositories are more than just read-only mirrors.
19
All three servers support full read/write capabilities.
20
Changes (such as new tickets or wiki or check-ins) can be implemented
21
on any of the three servers and those changes automatically propagate to the
22
other two servers.
23
24
Server (1) runs as a [./aboutcgi.wiki|CGI script] on a
25
<a href="http://www.linode.com/">Linode</a> located in Dallas, TX
26
- on the same virtual machine that
27
hosts <a href="http://www.sqlite.org/">SQLite</a> and over a
28
dozen other smaller projects. This demonstrates that Fossil can run on
29
a low-power host processor.
30
Multiple fossil-based projects can easily be hosted on the same machine,
31
even if that machine is itself one of several dozen virtual machines on
32
a single physical box. The CGI script that runs the canonical Fossil
33
self-hosting repository is as follows:
34
35
<pre>
36
#!/usr/bin/fossil
37
repository: /fossil/fossil.fossil
38
</pre>
39
40
Server (3) ran for 10 years as a CGI script on a shared hosting account at
41
<a href="http://www.he.net/">Hurricane Electric</a> in Fremont, CA.
42
This server demonstrated the ability of
43
Fossil to run on an economical shared-host web account with no
44
privileges beyond port 80 HTTP access and CGI. It is not necessary
45
to have a dedicated computer with administrator privileges to run Fossil.
46
As far as we are aware,
47
Fossil is the only full-featured configuration management system
48
that can run in
49
such a restricted environment. The CGI script that ran on the
50
Hurricane Electric server was the same as the CGI script shown above,
51
except that the pathnames are modified to suit the environment:
52
53
<pre>
54
#!/home/hwaci/bin/fossil
55
repository: /home/hwaci/fossil/fossil.fossil
56
</pre>
57
58
In recent years, virtual private servers have become a more flexible and
59
less expensive hosting option compared to shared hosting accounts.
60
So on 2017-07-25, server (3) was moved
61
onto a $5/month "droplet" [https://en.wikipedia.org/wiki/Virtual_private_server|VPS]
62
(update: $6/month now)
63
from [https://www.digitalocean.com|Digital Ocean]
64
located in San Francisco.
65
66
Server (3) is synchronized with the canonical server (1) by running
67
a command similar to the following via cron:
68
69
<pre>
70
/usr/local/bin/fossil all sync -u
71
</pre>
72
73
Server (2) is a
74
<a href="http://www.linode.com/">Linode</a> located in Newark, NJ
75
and set up just like the canonical server (1) with the addition of a
76
cron job for synchronization. The same cron job also runs the
77
[/help/git|fossil git export] command after each sync in order to
78
[./mirrortogithub.md#ex1|mirror all changes to GitHub].
79

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button