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

Patients' Data Should Not be Outsourced to Any Party at All, Let's Redo the Storage Scheme
Far better than giving all our data to Microsoft and Palantir (US)
The Second-Largest Institution in Europe (EPO) is Playing With Fire and Now It Puts the Largest One (EU) at Risk
The EPO will have some more shake-ups
The EPO's Own 'Drug Bust': Berenguer is Gone, But Who Else?
EPO latest news
Improving Clarity When Presenting LLM Slop and Slop Images
There will likely be more changes (improvements) to improve the visibility of our labels
Articles About "Linux" That Are Actually Promotions of Microsoft Windows
The solution is to leave Windows, not get something "like Linux" or "similar to Linux"
Local Occupational Health, Safety and Ergonomics Committee (LOHSEC) in The Hague: Staff Representation Surprised at "Recent Changes in the Staffing of OHS Occupational Health Services (OHS)"
Once upon a time the Office offered to-notch services to all staff
IBM Exits Continue This Week
Some people talk about it anonymously, naming their role/position/unit, number of years (or band) etc.
 
British Army Officer Said Ubuntu Needed to Abandon Sudo for Rust's Imitation of Sudo and You Can Guess What Happened Next...
The not-so-drop-in replacement
The Open Web Has Fallen, It's Just Chrome
We cannot envision any other rendering engine (or "base") making any measurable headway
The EPO's Central Staff Committee Complains About the EPO's Management Faking "Production" (Monopolies) to Make More Money
The Central Staff Committee has a new communication
Ethical Consumer Could Use a Mention of "Ethical Software"
Maybe the Free Software Foundation (FSF) can get in touch with them
Links 12/11/2025: A US President (Insurrectionist) Attacking British Media, Hyundai's Digital Restrictions (DRM)
Links for the day
Gemini Links 12/11/2025: Trains in Switzerland, Software Survival, and More
Links for the day
Trying to Cancel People and Projects That You Don't Like by Changing the Focus to Politics
Don't fall for it
What Kind of Bubble is AI? We'll Find Out Very Soon
In 2022 and 2023 Cory Doctorow was one among many who asserted "AI" was a bubble
Mandrake's Gaël Duval Debunks Clickbait Nonsense From ZDNet, a Non-Coder Pushing Bot-Made 'Code' (Plagiarism Done Poorly)
"Why AI won't "Kill Open Source”
Groklaw Won't be the Latest (Nor the Last) Major Site We Lose
Many other sites will go offline; the more popular among those will get hijacked by rogue actors
Slopwatch Turns 1 Next Month
2024-12-14 is when Slopwatch began
The Issue With Firefox is Not Its Brand
Mozilla seems to be the biggest enemy of Firefox at this point
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, November 11, 2025
IRC logs for Tuesday, November 11, 2025
Gemini Links 11/11/2025: Kentucky, Bluesky, and Slop
Links for the day
The European Patent Office (EPO) is Still Hiding From Scandals
"No answers from VP1 to our letters to two Directors"
Like the Serial Strangler From Microsoft, Donald Trump is Out of Time and Has Jurisdiction Issues in the UK
The court system or the courts of a nations are meant to serve the nation and its media, not media lawyers or litigation profiteers
Slopwatch: Many Fake Articles About "Linux" on Monday and Today
A lot of the Web is pure garbage. A lot of 'articles' are 100% fake.
Richard Stallman to be First Speaker at Ethereum Cypherpunk Congress 5 Days From Now, FSF Looking to Raise $400,000 by Year's End
the 40+ years-old FSF, which Dr. Stallman created to help promote Software Freedom and support GNU, is starting a new fund-raising campaign
Links 11/11/2025: Misinformation/Disinformation in Twitter/X and BBC in Trouble
Links for the day
Links 11/11/2025: Slop Ruins Music, Facebook "to Discontinue Like and Comment Buttons on Third-Party Websites"
Links for the day
Adrian & Diana von Bidder-Senn, Debian: detailed history of a death
Reprinted with permission from Daniel Pocock
The Voice of Microsoft
Marketing disguised as a science
"MIT Technology Review Insights" is the Selling of Ponzi Schemes for Sponsors (MIT Lacks Integrity)
Just like IBM, they're chaining buzzwords now
Rust Keeps Breaking Ubuntu in All Sorts of Extraordinary Ways (and All Distros Based on Ubuntu Will Break Also)
The FSF's stance on this is unclear
Boot-locking Laptops and Desktops After Falsely Marketing That As 'Security' and Not Obligatory
If anyone can confirm this to us
With Net Income of One Billion Dollars Tesla Claims It Can Pay a Fake Founder (Who Paid for This Lie) 1,000 Billions
What does this tell us about Wall Street?
GNU/Linux Cannot Buy Fake Journalism and It Won't Bribe Large Publishers
Free software developers don't purchase "sponsored" placements and that will never change
The 'Politics' of Operating Systems (or Exclusion for Inclusion's Sake)
This whole 'wrongthink' policing is getting out of hand
Static Site Generators (SSGs) Save You Lots of Money and Problems
We've basically reduced the environmental/carbon footprint of the site by a factor of ~100 (2 orders of magnitude)
IBM Does Not Care About Families, Communities, and Even Its Own Workers
Red Hat isn't a family and to believe that it is would be the makeup of cults
Too Much of Today's Web is Fake, Not Just Fake News
We'll continue to advocate for adoption of Gemini Protocol
Simulating a Downtime Tomorrow Night
It is expected that network redundancy will make this maintenance invisible to us, but IRC hangups or general slowness are still a possibility
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, November 10, 2025
IRC logs for Monday, November 10, 2025
Links 11/11/2025: Conflicts and Politics From National Broadcasters
Links for the day
Gemini Links 11/11/2025: Poetry and Electronics Studies
Links for the day
Apple's Debt Grew by About 16 Billion Dollars This Past Year, "Disappointing iPhone Sales" Reported
People who buy Apple's goods based on some false notion that Apple is "cool" or ethical or "underdog" (late 90s) aren't just living in the past; they're fools
Turning Down Proprietary Software is About Making Society Better
We should not be tempted to shame people for merely trying to keep programmers honest and human rights-respecting
Debian GNU/Linux Became the Most Popular (Most Distros Are Based on It) Owing to Richard Stallman
New presentation
The Internet is Becoming Dead or a Zombie
The Internet is becoming like a giant botfarm
A Day for Poppies
This site will run as usual today. We continue our fight for Software Freedom.
"Modern" Doesn't Mean Better, It Typically Just Means Newer
RMS demonised as someone who rejects "modern society" ("rejecting modern society") by a site that uses slop extensively
The Cocaine Patent Office - Part IV: European Patent Office to Come Under Media and Political Scrutiny
We'll persist until we get some answers
Gemini Links 10/11/2025: Homelabs and KeePassRX Manual Now Available
Links for the day
63-Page Response to the EPO's Effort to Decrease the Salaries of Workers While EPO Management Snorts Cocaine for 20,000 Euros a Month
"Read more in these written comments we sent to the members of the GCC"
Response to Another New Hit Piece About Richard Stallman (RMS)
We see similar smears floating about and tackling them can help not only RMS but anyone who thinks similarly about computers
Shrinking and Cheapening the Workforce: the Future of Red Hat and IBM
Does Red Hat cheapen the workforce?
Links 10/11/2025: BBC Turmoil and Iranian Drought Crisis
Links for the day
The Register MS Still Occasionally Uses Slop
some articles don't use real images
Links 10/11/2025: "Scam Altman Gets Served Subpoena" and "China will Rule Renewable Energy"
Links for the day
ubuntupit.com Has Paused the LLM Slop (for Now)
No slopfarm ever offered any real value
More Media Coverage From Austria Regarding Cocaine Use by EPO Management
The ultimate goal is full accountability
Ponzi Economics and the Media's Role in Defending Ponzi Economics
We occasionally notice weak or almost-non-existent coverage regarding the economy
Links 10/11/2025: Very High Windows TCO and XBox Continues to Languish
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, November 09, 2025
IRC logs for Sunday, November 09, 2025