Free and easy SSL certificate for your website

This guide talks about Certbot and is related to Nginx running on Arch Linux, because that’s what I use 🙂

  1. Install certbot and certbot-nginx packages: sudo pacman -S certbot certbot-nginx
  2. Check you have a certificate file in /etc/ssl/certs/ca-certificates.crt. If not, search for a valid one in your system or create a new self-signed one. In Arch you can use the one in /etc/ca-certificates/extracted/ca-bundle.trust.crt. So, if you miss it, just create a symbolic link: sudo ln -s /etc/ca-certificates/extracted/ca-bundle.trust.crt /etc/ssl/certs/ca-certificates.crt
  3. Run certbot. It’s magic and will do everything for us, just follow the simple instructions on screen: sudo certbot --nginx
  4. At this point your website(s) has a valid SSL certificate up and running. Let’s set up a Systemd service which will do the renewal for us automatically.
  5. Create a Systemd service file in /etc/systemd/system/certbot.service with this content:
    [Unit]
    Description=Let's Encrypt renewal
    
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/certbot renew --quiet --agree-tos
    ExecStartPost=/bin/systemctl reload nginx.service
  6. Create a Systemd timer file in /etc/systemd/system/certbot.timer with this content:
    [Unit]
    Description=Twice daily renewal of Let's Encrypt's certificates
    
    [Timer]
    OnCalendar=0/12:00:00
    RandomizedDelaySec=1h
    Persistent=true
    
    [Install]
    WantedBy=timers.target
  7. Reload the Systemd services with sudo systemctl daemon-reload
  8. Enable the timer with sudo systemctl enable certbot.timer

Done! You just set up a free SSL certificate and the auto renewal services on Systemd, that will run twice a day (at a random second of the minute).

Warning: if this SSL certificate is critical for your business, don’t rely on auto-renewal. Instead set-up a reminder in your calendar few days before the expire date.

Enjoy 🙂

Fasd as oh-my-zsh plugin

I wanted to try fasd, so I installed it from Arch Linux official packages and enabled it as oh-my-zsh plugin. In Arch Linux, you can install oh-my-zsh from AUR.

It is great, but there was an issue with the cache file, which was stored in /usr/share/oh-my-zsh which is not writable, so the initialization was failing. I have already opened a pull request for that.

In the meantime, if you have the same problem, you can edit the /usr/share/oh-my-zsh/plugins/fasd/fasd.plugin.zsh file changing this line fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache" into fasd_cache="${HOME}/.fasd-init-cache".

Xbox controller with xboxdrv

It took me a while but I managed to make it work properly. I play video-games on Linux through Liquidsky, which runs properly with wine. There is a troubleshooting page about that.

The Xbox controller didn’t work properly as is. I had to remove the xpad kernel module with sudo rmmod xpad. You may want to blacklist it so it won’t be loaded every time you boot your machine.

Next step on my Arch, was to install the xboxdrv-git package from AUR. The configuration file is located at /etc/conf.d/xboxdrv.

This is my current configuration for playing GTA 5:

I hope this may help somebody 🙂

LiquidSky for Linux

I’m struggling to make it work on Arch Linux. I will keep this post updated with the results.

If you have a problem not listed here, please add a comment below and I’ll try to help you.

Wine Staging

You should use wine-staging, which contains extra features and bug fixes not released yet. If you need help installing it on your distribution, just add a comment below and I’ll try to help.

It crashes on startup

Run winecfg and then select Windows 7 from Windows Version drop-down.

The interface is messed up

The second problem you will probably have is that the interface is messed up.


To fix it just install winetricks and install allfonts.

Log files

To find out what the problem is you need to read the log files of LiquidSky, which are created in this folder:
~/.wine/drive_c/users/$USER/Temp

Data centers file is missing

Some people had this problem: the file with data centers location were missing from their systems.

To fix that download the datacenters.dat file and put it in
~/.wine/drive_c/users/$USER/Application Data/LiquidSky/datacenters.dat

Testing data centers

For me, the client was getting stuck in this step. I solved that by running it from a Windows 7 vm. You can get one for free (legally) from here.

Freezing at benchmark testing

If that happens, try to run it with --force-player --disable-gpu flags:

June 2017 update

They have put an introduction video that you have to watch before accessing the server. That is not working for me with Wine, so I got stuck there and couldn’t access the server (which did start in the background). To fix that I simply ran the Liquidsky from Windows and watched the video there. Once you watch it you will get 10 credits but, most important, you won’t be asked to watch it again and you will able to access your server from Wine.
You can get a free (and legal) Windows virtual machine here.