Deploying a self-hosted Rails App
Monday June 09 2025 • 09:37 PM
It’s been about two weeks since the initial release of powRSS.com and the fediverse community has given it a welcome reception.
The app is currently running on Sinatra, but this weekend I’ve been doing a rewrite to Rails to redo the software architecture and have support for future features.
As this is the first time I self-host a Rails app, I want to take notes for reference.
The Server
I’m going with Hetzner. It’s what I’m using for powRSS now (which shares a server with this very blog) but I’ll be spinning up a new server for the Rails app alone. Same specs as last time.
First step was logging in via SSH, updating, upgrading packages, and rebooting the system.
New User
Next, I created a non-root user to enact the principle of least privilege:
$ adduser [username]
After providing a new password for the user, I gave it sudo privileges and logged out.
Next I created .ssh/authorized_keys
in the server and updated my local .ssh/config
file so I could login via SSH.
Disable Password Login
To disable password login I edited /etc/ssh/sshd_config
as sudo and set PasswordAuthentication
to no and uncommented PubkeyAuthentication
and set it to yes.
Dokku
To install Dokku and followed my notes from last month.