Bonum Certa Men Certa

How to Set Up a Gemini Server of Your Own, Even on a Simple Single-Board Computer

Gemini Turntable



Summary: Using Agate to start one's own Gemini capsule (self-hosted) is a lot simpler than one might be inclined to believe; this is a detailed HOWTO, hoping to encourage more people to join Gemini space, which is fast-growing and free of garbage

THE one thing that stunned me was how easy it was to set up a Gemini server. A lot simpler than setting up a Web server. The harder part is certificates, but that too is trivial once it's done a couple of times, potentially with errors at first.



Here's a quick recipe for setting up one's own instance and Gemini capsule.

First, create a new user's account. Gemini ought to have its own account, as it'll make things a lot simpler (backup, permissions etc.) and for the sake of this example we'll assume the user account is "gemini" (with home directory /home/gemini)

Then, in the user's top-level (home) directory:

mkdir gemini bin certs

This will set up directories for the capsule, the programs, and the certificates, respectively.

There's not so much left to do now.

Go to the directory gemini (e.g. cd ~/gemini/ or equivalent using a graphical file browser)

In that directory, create or place a file called index.gmi

It can be empty or contain something simple like Hello world! (just to make sure that the server is set up and works)

Now let's get the server software. Go to the bin directory (e.g. cd ~/bin/). For most practical purposes agate (Apache Licence) seems to be OK and it supports quite a few architectures. Unfortunately it's hosted on GitHub (Microsoft), with latest versions shown at the top of this page. If you are not sure what architecture to choose, run uname -a

The correct binary can be downloaded using a Web browser or a tool like wget/curl. That program is quite small and needs to be placed in bin in order to stay consistent with this manual.

Unpack and set 'executable' (x) permission for the file, e.g. using

gunzip [binary_file]
chmod +x [binary_file]


Depending on the name of the binary file in question.

For my ARM SBC it is gunzip agate.armv7-unknown-linux-gnueabihf.gz and chmod +x agate.armv7-unknown-linux-gnueabihf

All the pieces are now in place except the certificate and the service setup.

On a systemd-based operating system create a new file at /etc/systemd/system/agate.service

It should look something like this:

[Unit]
Description=agate
After=network.target



[Service] User=gemini Type=simple ExecStart=[your settings]

[Install] WantedBy=default.target


Wherein [your settings] ties together the program, the root directory for hosting (capsule), and the certificate.

In the case of Techrights on ARM, it's something as follows:

/home/gemini/bin/agate.armv7-unknown-linux-gnueabihf -s --content /home/gemini/gemini/ --key /home/gemini/certs/key.pem --cert /home/gemini/certs/cert.pem --hostname your hostname --lang en-GB

In our case, your hostname is gemini.techrights.org (how you set up your hostname may depend on how you manage domains and where). That hostname needs to point to your device's IP address.

All that's left now is certificate setup and service initiation.

Go to the certificates directory (e.g. cd ~/certs/) as this will likely involve the command line (unless you have some graphical tools that do the same).

A simple self-signed certificate ought to be sufficient:

openssl req -new -subj "/CN=your hostname" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 365 -nodes -out cert.pem -keyout key.pem

That's for 1 year. It can be set to anything.

The command then leaves the two files required by the service/server, namely cert.pem and key.pem. These can be modified and regenerated at any time, so there's no need to worry if at any point they're wrongly generated or made for the 'wrong' domain.

To get it all started, assuming systemd:

sudo systemctl restart agate
sudo systemctl enable agate


Use a Gemini browser (or Web proxy) to then test access to the hostname over gemini:// (it will attempt to connect over port 1965, so make sure there's no firewall standing in the way at the level of the device or the network it is in). This is pretty much it, with the exception of variation for non-systemd systems. All that systemd does is, it starts the server using the suitable command and arguments, even after restarts. That command can instead be run manually, or set up for any init system of choice. The hardest part is setting up the domain, generating the key/certificate correctly, and then lowering the filters (if any) to allow access over port 1965.

We don't typically do HOWTO-type articles, but for this one we make an exception. If you get stuck, ask us in IRC for help. Gemini needs to grow and for faster growth we need to help one another.

Agate is quite small and simple. As of the time of writing, it does not support server-side CGI scripts (for something like in-capsule search), but Gemini ought to be kept light and simple anyway; we're not trying to just replicate the bloated Web.

Credit: Chris Were, for some initial notes and suggestions. gemini://chriswere.uk/

Recent Techrights' Posts

Datamation, Where I Used to Publish Articles, Appears to Have Been Sold to TechnologyAdvice Only to Become a Slopfarm
I'd prefer to not associate with that site anymore
 
How Software Patents Were Viewed or Their General Status Changed Over Time
A rough summary
We Are Turning 19 in One Month, FSF Turns 40 in 3 Hours (CET)
For our anniversary next month we still have no concrete plans
Patent Docs (or PatentDocs) Learned the Wrong Lessons From the Death of TypePad
Had they gone ahead with an SSG, they'd become a lot more future-proof
USPTO Patent Bubble Already Imploding, After Decades of Artificial Inflation, Entire Offices Close for Good
we can deduce that financial pressures (lack of "demand" for monopolies) play a role
TikTok is Not Harmless (Being CheeTok in the US Will Advance Orange Agenda)
Social control media isn't "fun and games"; it's a digital weapon that lets hostile groups or nations infiltrate others, then turn them against themselves
Andy Farnell and Helen Plews Explain What "Modern" Tech Does to Old People
Imposing terrible tech "religion" on people is not helping them
Tomorrow the Free Software Foundation (FSF) Turns 40 and Its Web Site is Still Slow Due to DDoS by LLM Slop Bots
For an advocacy group, uptime is important (for its message to remain accessible)
Slopwatch: Google News as a Firehose of LLM Slop About "Linux"
Google News is really bad
Links 03/10/2025: "NPR’s Economics Lessons Come With Neoliberal Spin" and Canada Post at Risk
Links for the day
Gemini Links 03/10/2025: Panic Attacks and Food Adulteration
Links for the day
Links 03/10/2025: Lawyers Caught Using LLM Slop Explain Why They Did It, LibreSSL 4.1.1 and 4.0.1 Released
Links for the day
FSF Board Grew 50% Since Last Year, Has New President, Turns 40 in Two Days
It's a good move for the FSF and - by extension - for software freedom
Links 03/10/2025: Conflicts, Death of TypePad, and TikTok/CheeTok Gives a Boost to Far Right Groups in Europe
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, October 02, 2025
IRC logs for Thursday, October 02, 2025
Slopwatch: Linux Journal, Google News, and LinuxSecurity
They carry on polluting the Web with fake articles
Gemini Links 02/10/2025: Kubernetes With FreeBSD and robots.txt
Links for the day
Links 02/10/2025: 'Open' 'AI' Resorting to Gimmicks and Fake Funding, Europe’s ‘Drone Wall’ Discussed
Links for the day
Links 02/10/2025: Brave Passes 100M Users Milestone, Kodak Selling Its Own Film Again
Links for the day
Michael “Monty” Widenius: It Started in 1983 With Richard Stallman (RMS)
The other co-founder of MySQL is a bit notorious for confronting RMS rather viciously
For the Second Time in a Few Weeks Microsoft Lunduke Makes False Accusations Against Senior Red Hat Staff to Incite a Despicable 'Troll Army'
Nothing that Microsoft Lunduke claims of says can be trusted
su lisa && rm -rf /home/ibm/power
Novell was ruined by another person from IBM, Ronald Hovsepian
A Record Demand at Microsoft: Demand to Cancel
What we're witnessing is a very ungraceful destruction of XBox
Microsoft is Losing Europe
Hence all the "support" and "discount" offers that are limited to Europe
The Free Software Foundation Starts Fund-raising for 40th Anniversary
New pop-up 2-3 days ahead of the 40th anniversary event
Systemd Breaks Networking in Debian and Microsoft Staff Rushes to Make Face-Saving Excuses in LWN
Microsoft's bluca is already there in the comments, his Microsoft money pays for LWN to let him leave comments early
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, October 01, 2025
IRC logs for Wednesday, October 01, 2025
What the End of XBox Will Look Like: a Fiery Crash
XBox is the next Skype. It won't last much longer. Expect many more layoffs.
Richard Stallman is Going to Finland to Give a Talk Next Thursday
A day later he speaks in Sweden
Gemini Links 02/10/2025: SMTP Pipelining and End of ROOPHLOCH 2025
Links for the day
Slopwatch: Plagiarism, Fake Articles, and FUD About Linux
not a day goes by without Google News feeding FUD from slopfarms
Gemini Links 01/10/2025: Chat Control and End of Life
Links for the day
Links 01/10/2025: Long Covid Risk Reiterated, "Bitcoin Queen" Caught
Links for the day
Links 01/10/2025: EA $55 Billion Deal is Debt and Slop "Raises Vishing Risks"
Links for the day
Bluewashing at Red Hat Means Redundancies
The man who sold Red Hat to IBM meanwhile became a Microsoft Mono booster
After Killing OpenSource.com, IBM ('Red Hat') and OSI Told Us OpenSource.net Would Replace It (But That Didn't Happen)
Now it's time to move on, perhaps tarnishing the "Open Source" label some more (for whatever sponsor wants this)
Linux is Not a Community Project, It's a Wall Street Product
The core goal should be freedom
Bad Actors Abusing the Free Software Community, Vandalising It Using Rogue Politics and Old Tactics
Oil giants have long attempted to do this; now, the digital equivalent of Big Oil does this in technology
Social Control Media Isn't the Future, The Federation or Fediverse Isn't Growing, People's Accounts Vanish for Good
users' accounts will get deleted, not just become inactive
IBM is Failing, This Helps Show Wall Street is Entirely Detached From Actual Commercial Performance
IBM is unable to grow, it's just constantly shrinking
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, September 30, 2025
IRC logs for Tuesday, September 30, 2025
Clerical Aspects of Publishing and Development
In Free software, the management aspects are considerably reduced
Slopwatch: Fake Articles and Google News Promoting "Linux" Spam or Bot-Generated Fear, Uncertainty, Doubt (FUD)
These slopfarms help misplace blame
Third Wave of Microsoft Layoffs in September, This Time Many in Liverpool Affected
Be ready for more waves of layoffs ahead of the so-called "results" in late October