💾 Archived View for ilonagabor.de › posts › docker.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
___| | _ \ __ `__ \ __| _ \ __| \ \ / | | __/ | | | \__ \ __/ | \ \ / \____|\___| _| _| _| ____/ \___| _| \_/
I have recently joined the Gemini space and decided to make my own gemini:// webpage on day 1.
I run my own Ubuntu-based server from my home. At first, I installed the Gemserv binary along with 450 MB of Rust dependencies, this setup took up about 1 GB of space, all to serve a 1 kB .gmi file :-) I was annoyed by this, and as I am a big fan of Docker, I started searching in Gemini space if there are similarly inclined people. All it took was one search on gus.guru to find the page of Hannu Hartikainen, who had a similar idea and wrote a Dockerfile that allowed me to wrap Gemserv as a single static binary measuring just above 8 MB.
Hannu Hartikainen's Gemini space
That's more like it! This is the setup I am running right now and as I am only planning to serve static pages, I am very satisfied with its low footprint.
I decided to write this tutorial on my chosen setup for all of you people looking to start hosting your own Gemini webpages. Drop me a mail if you have any comments, corrections or would just like to get in touch.
🌍makeworld-the-better-one/amfora
sudo apt update && sudo apt install docker docker-compose
or in Terminal
amfora gemini://ilonagabor.de/assets/gemserv.tar
sudo docker load -i <path to gemserv.tar>
mkdir <your gemini folder> chown -R <gemini user>:<gemini group> <your gemini folder> && cd <your gemini folder>
I suggest you use a non-sudo user to upload content into <your gemini folder>.
or in Terminal
amfora gemini://ilonagabor.de/assets/docker-compose.yml
pro-Tipp! If you are using Amfora, it will show you `docker-compose.yml` rather than downloading it. Press `ctrl + s` once open to save the file to your downloads folder.
or in Terminal
amfora gemini://ilonagabor.de/assets/config.toml
openssl req -newkey rsa:2048 -nodes -keyout <your gemini folder>/gemini.key -x509 -days 365 -out <your gemini folder>/gemini.crt
mkdir <your gemini folder>/srv echo "# Hello World" > <your gemini folder>/srv/index.gmi
sudo ufw allow 1965 && sudo ufw reload
sudo docker-compose up -d
note: the docker compose file is set to always restart this container. Your Gemserv will start automatically, even if you reboot your server.
amfora gemini://<your domain>
note: in case of issues, check docker logs!
sudo docker logs gemserv
Last updated: 18 Feb 2021 22:42:02 CET