🖥️ Migrating to NearlyFreeSpeech.NET
2024 December 15Earlier this year, I moved my sites off of Neocities and onto NearlyFreeSpeech.NET and posted my notes about doing it to cohost (RIP). john videogames on Bluesky was very kind to send me a cached copy of that post, and here it is!
- Uploading your site
- Set up SSL
- Set up domain alias
- Set up error pages
- Enable MultiViews
- Set up custom Bluesky username
Uploading your site
- If you didn’t already do this for Neocities, download something like FileZilla or Cyberduck.
- Make a new connection profile for your site. In the “Protocol” drop-down menu, select SFTP - SSH File Transfer Protocol. (Your program might call this field something else, but in any case look for something that lets you connect with SFTP aka SSH File Transfer Protocol.)
- Go to your NearlyFreeSpeech.NET > Sites > whatever site you are setting up. Make a note of your username, password, and the SSH/SFTP Hostname.
- Back in your file transfer program, enter the NearlyFreeSpeech SSH/SFTP Hostname in the Host field, then your username and password.
- When you connect for the first time, it will ask if you allow the SSH fingerprint. Click “Allow,” and if available, check the “Always Allow” box so it won’t ask again.
- Now you can upload your files to your site!
Set up SSL
This is so you can have https://
for your domain name.
- Go to NearlyFreeSpeech.NET > Sites > whatever site you are setting up. Make a note of your username, password, and the SSH/SFTP Hostname.
- If you are on Windows, hit Win+R, type in cmd and hit Enter. (If you are not on Windows, open whatever terminal you use.)
- Type in
ssh YOUR_USERNAME@THE_SSH_HOSTNAME
. It should ask for your password, enter that in. - Type
tls-script.sh
and then Enter. It should ask if you agree to the user license, typeY
and then Enter again. - It should install a
.well-known
folder with all the proper SSL files on your site that will let you connect to your domain withhttps://
instead of onlyhttp://
.
EDIT: NFS apparently does this automatically for users now, so you probably don’t need to do this step!
Set up domain alias
This is so that https://www.yoursite.com
and https://yoursite.com
both work.
- Go to NearlyFreeSpeech.NET > Sites > whatever site you’re setting up.
- Near the top, it should list your NFS subdomain and your
www.yoursite.com
domain name. Click “Add a New Alias.” - Enter in
yoursite.com
.
Set up error pages
- Open a text editor and create a file named
.htaccess
. - In that file, paste in
ErrorDocument 404 /not_found.html
(or whatever your filename is). - If you want, you can do the same for 401, 403, and 500 errors.
- Save it, then upload it to the root of your site.
Enable MultiViews
This is to have URLs point to pages even without the .html
at the end, which is how Neocities does it.
- Open your
.htaccess
file in your text editor. - Paste in
Options +MultiViews
. - Save and upload to the root of your site.
Set up custom Bluesky username
- In your text editor, create a new file named
atproto-did
. - Go to Bluesky, go to Settings > Account > Handle, then click “I have my own domain.”
- Click the “No DNS Panel” tab and then copy the contents of “That contains the following:”. Paste that code into your
atproto-did
file, and save it. - Upload the
atproto-did
file into the aforementioned.well-known
folder. - Back in Bluesky, click “Verify Text File,” and if that was successful, “Update to (domain name)”