NearlyFreeSpeech.NET Guide
While searching for alternatives to Neocities, I stumbled across the stalwart NearlyFreeSpeech.NET (NFSN). Since its release in 2002, it's hosted all manner of websites, which could also include yours!
This type of hosting is a step-up from Neocities, Nekoweb, Teacake, LeprdSpace and others. It lacks a conventional code-editor, and requires you to use an external tool such as Notepad or Phoenix. This is also the case for uploading your pages, which can substitute with a specialised client or your computer's command line. This guide will be going over the latter method, out of a personal suspicion of the programs I came across. While working in the terminal sounds intimidating, it becomes straightforward once you memorise the commands. Then it becomes a series of copying, pasting, and not accidentally uploading your System32 folder.
Section Menu
Part 1: Setting the Scene
NearlyFreeSpeech is different from most web hosts. Here is what makes it unusual and what you need to understand before diving in.
You Pay As You Go
NFSN does not charge a fixed monthly fee. Instead, you deposit money into your account and it gets deducted based on how much storage and bandwidth you use. For a small personal site, this is incredibly cheap, often just a few cents per month. You do need to keep a small balance in your account though, or your site will go offline.
- Check your balance
- Log into the member panel and click "Accounts" in the top navigation.
- Add funds
- Click your account number on the Accounts page and look for the option to add money. They accept credit cards and PayPal.
There's no in-browser editor
Your website files live in a folder on NFSN's server called /home/public/. Anything you put in that folder is publicly accessible on the web. For example:
/home/public/home.html→ your homepage/home/public/CSS/style.css→ your stylesheet/home/public/assets/bg.png→ an image
The folder structure on the server should mirror the folder structure on your PC. If your CSS is in a folder called "CSS" on your PC, it needs to be in a folder called "CSS" on the server too.
It uses Linux
If your PC runs Windows, it tends to be case-insensitive. "CSS" or "css" can often mean the same thing to it. Linux is not like this, and demands far more precision from the user. Here, "CSS" and "css" are completely different folder names on a Linux. As a result, you'll have to check if your folder names on the server match what is written in your HTML files.
It uses SSH
SSH (Secure Shell) allows you to run commands directly from your terminal, some of which are for remotely uploading to your NFS server. While there are clients for this purpose, the terminal poses far less risk than an unfamiliar program.
It doesn't have a profile, it has a Member Panel
The NFSN member panel at members.nearlyfreespeech.net is where you manage everything. The main sections are:
- Member Home
- Overview and quick links.
- Profile
- Your personal account settings, SSH keys, and password management.
- Accounts
- Billing and balance.
- Sites
- Manage your individual websites.
- Domains
- Domain name management.
- Support
- Help and documentation.
Creating a New Site
Step 1: Create a NearlyFreeSpeech Account
- Go to
nearlyfreespeech.net - Click "Sign Up" and fill in your details.
- Choose a member login name, as this becomes part of your SSH username later (e.g. "lutzbug").
- Set a strong password. This will also be your SSH password initially, so make it something you can actually type.
- Verify your email address.
Step 2: Add Funds to Your Account
Before you can create a site you need a small balance.
- Log in and click "Accounts".
- Click on your account number.
- Add funds, even $5 is plenty to start with for a small site.
Step 3: Create a New Site
- Click "Sites" in the top navigation.
- Click "Create a New Site".
- Choose a short name for your site (e.g. "mywebsite"). This becomes your NFSN subdomain:
sitename.nfshost.com. - Choose a type of site most relevant to you. For example, if you sell wares online, you'll want to select the "Production" option.
- Choose "Apache 2.4 Static Content" as the server type (unless you need PHP or other server-side tools).
- Select your account to bill to.
- Click "Create Site".
Your site is now created! It won't have any files yet.
Step 4: Enable SSH Access
- On your site's information page, find "SSH/SFTP Information".
- If it says "Disabled", click "Toggle" to enable it.
- Note your SSH username, which takes the format
sitename_membername(e.g.yoursite_yourname). - Also note the SSH hostname shown on this page. This guide uses
ssh.nyc1.nearlyfreespeech.netin all examples, but NFSN has multiple server clusters and yours may be different (e.g.ssh.nyc3.nearlyfreespeech.netorssh.sea1.nearlyfreespeech.net). Always use the hostname shown in your member panel, not just the one from this guide.
Step 5: Set Your Password
Important: NFSN accounts sometimes have a null password by default, which means SSH will always fail even though you think you have a password set.
- Click "Profile" in the top navigation.
- In the Actions panel on the right, click "Change Password".
- Set a new password.
- Wait about a minute before trying to use it for SSH.
You can verify the password is set by looking at "Password Age" on your profile page. If it says "(null)", it hasn't been set.
Step 6: Set Up an SSH Key (Recommended)
Passwords on SSH can be quite tedious. Assuming pasting the password maintains the tedium, you can establish an SSH key instead.
In PowerShell on your PC, generate a key:
ssh-keygen -t ed25519 -f C:\Users\yourname\.ssh\id_ed25519 -C "yoursitename"
When it asks you for a passphrase, press Enter twice. This lets you proceed without a conventional password, but you must treat this key as if it were any other password. Then display your public key:
type C:\Users\yourname\.ssh\id_ed25519.pub
Copy the entire output (it should start with "ssh-ed25519 AAAA..."). Then go to your NFSN profile page, click "Add SSH Key" in the Actions panel, paste your key in the box, and save it. SSH and SCP will now work without a password!
Step 7: Add a Custom Domain
If you have your own domain name, you can connect it to your NFSN site. Namecheap is my provider of choice, and notably they include free WHOIS privacy on all domains, which keeps your personal details off public domain registration lookups.
On NFSN:
- Go to your site's information page.
- Under "Site Names & Aliases", click "Add a New Alias".
- Enter your domain (e.g.
www.yourdomain.com). - Save it.
On your domain registrar (e.g. Namecheap):
- Log in and go to your domain list.
- Click "Manage" next to your domain.
- Find "Nameservers" and change to Custom DNS.
- Enter these nameservers:
ns1.nearlyfreespeech.netns2.nearlyfreespeech.net
- Save the changes.
DNS propagation can take between an hour to a day. Until then, your site is only accessible via the .nfshost.com address. When you feel inclined, you can check if DNS has propagated at https://dnschecker.org.
Once the DNS is pointing to NFSN, they will automatically request an SSL certificate for your domain so it works on https://. If it has been more than 24 hours after the DNS propagated and HTTPS still is not working, go to your site's information page and click "Retry TLS Setup".
Step 8: Uploading Your Files
See Part 3 for the full upload process, including the System32 warning you'll want to read before running anything.
A note on your homepage filename: Apache looks for index.html (or index.php) by default when someone visits the root of your site. If your homepage is named something else, like home.html, visitors going to yoursitename.nfshost.com/ will get a directory listing or a Forbidden error instead of your page. You have two options:
- Name your homepage
index.html, the simplest fix. Apache finds it automatically. - Or, create a
.htaccessfile in your site folder with the line:DirectoryIndex home.html, which tells Apache to use your custom filename. See Part 3 for how to upload hidden files like.htaccess.
Step 9: Fixing Permissions
After uploading for the first time, you may need to fix file permissions. See the Fixing Permissions section in Part 3 for the commands and an explanation of what they do.
Part 2: SSHing Into Your Server
SSH gives you direct command-line access to your server. You can run commands, manage files, check what is there, and fix problems without needing to upload anything.
Connecting
ssh yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net
Your prompt will change to show you're on the server, something like [yoursitename /home/public]$. This means you're logged in and your current directory is /home/public.
Basic Navigation Commands
ls- List files in the current folder.
ls -1- List files, one per line (cleaner output).
ls /home/public- List files in a specific folder.
cd /home/public- Change to a specific folder.
pwd- Print current folder path, useful if you lose track of where you are.
File Management Commands
rm filename- Delete a file.
rm *.dll- Delete all files with a given extension.
rm -rf foldername- Delete a folder and everything inside it. No confirmation, no undo, no recycle bin. Double-check what you're pointing it at before pressing Enter.
mv oldname newname- Rename a file or folder.
cp source dest- Copy a file.
Useful Tricks
Check if a file is accessible to the web:
curl https://yoursitename.nfshost.com/CSS/style.css
Check disk usage:
du -sh /home/public
Disconnecting
exit
Browser Alternative: Run Shell Command
If SSH is not working for some reason, NFSN has a "Run Shell Command" option on your site's management page, found in the Actions panel on the right side. This lets you run individual commands directly through your browser without needing SSH. It is slower but works in a pinch.
Part 3: Uploading from the Terminal
This is what you will do every time you make changes to your site. It may be more hands-on than what you expect (especially if you're coming off services like Neocities or Nekoweb), but you'll eventually get into a rhythm.
The Basic Upload Process
- Navigate to your website folder. Always do this first. Every single time. No exceptions.
cd C:\Users\yourname\Documents\yoursite - Verify you're in the right place.
dir
Look at the output. You must see your HTML files in the list. If you see things likesystem32,Windows, orSysWOW64, STOP. You're in the wrong place. Run thecdcommand again. - Upload everything.
scp -r * yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/
You will see your files scroll past as they upload. Wait for the prompt to come back before closing the terminal. - Check your site.
Open your browser and go to your.nfshost.comaddress. Hard refresh withCtrl+Shift+Rif you do not see changes.
Uploading Just One File
If you've only changed one file, uploading is much faster:
cd C:\Users\yourname\Documents\yoursite
scp home.html yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/home.html
For a file inside a subfolder:
scp CSS/style.css yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/CSS/style.css
Uploading a Whole Subfolder
scp -r CSS yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/CSS
What the SCP Command Means
scp- Secure copy, the program doing the work.
-r- Recursive, includes subfolders and their contents.
*- Everything in the current folder, except hidden files (filenames starting with a dot, like
.htaccess). See below. username@server- Your NFSN username and the server address.
:/home/public/- The destination folder on the server.
Hidden Files and .htaccess
The * wildcard in PowerShell does not include hidden files (files whose names start with a dot). This matters because .htaccess is a hidden file, and it is a very useful one. It is an Apache configuration file that sits in /home/public/ and lets you customise how the web server behaves for your site.
Common things to put in .htaccess:
- Force HTTPS
- Redirect anyone who visits
http://tohttps://automatically:
This is worth setting up once you have a custom domain and HTTPS working. NFSN also has an "Always Use HTTPS" toggle in your site's Config Information section if you prefer not to useRewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301].htaccessfor this. - Custom 404 page
- Show your own page instead of the default Apache 404 error:
Create aErrorDocument 404 /404.html404.htmlfile in your site folder, upload it, and add this line to your.htaccess. - Custom homepage filename
- If your homepage is not called
index.html:DirectoryIndex home.html
Because .htaccess starts with a dot, scp -r * will silently skip it. To upload it, name it explicitly:
scp .htaccess yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/.htaccess
If you add a .htaccess file and nothing seems to change, this is almost certainly why. You can confirm it made it to the server by SSHing in and running ls -a /home/public/ (the -a flag shows hidden files).
The System32 Disaster
This is the most important warning in this entire guide. Read it. Remember it. Never forget it.
When PowerShell opens, it starts in C:\windows\system32 by default. This folder contains thousands of Windows system files: .dll files, .exe files, config files, and so on. If you run the scp upload command without first navigating to your website folder with cd, you will upload your entire Windows system32 folder to your web server. Your NFSN server will be flooded with thousands of junk files and your site will be extremely slow as a result.
If you see any of these scrolling past during an upload, stop immediately with Ctrl+C:
AarSvc.dllAPMon.dllARP.EXE@AppHelpToast.png- Any filename with random hex characters
If it happens:
- Press
Ctrl+Cimmediately to stop the upload. - Take a breath, your PC files are fine, they've only been copied.
- SSH into your server:
ssh yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net - Clean up the junk files:
And any other obvious Windows junk you can see.rm /home/public/*.dll rm /home/public/*.EXE rm /home/public/@* - Check what is left:
ls /home/public - Exit the server:
exit - Do the upload again correctly this time.
Make it a habit. Before every single upload, no exceptions: cd to your site folder, then dir and look for your HTML files in the output. Then and only then run scp. Even if you're in a hurry. Even if you just did it five minutes ago.
Fixing Permissions
Linux file permissions control who can read, write, and execute files. If your permissions are wrong, your website files will be uploaded to the server but the web server will not be able to serve them to visitors. Symptoms include: the site loading but with no styling, images not appearing, or direct file URLs returning a "Forbidden" error.
When you upload files from Windows using scp, they sometimes arrive with permissions that are too restrictive for a Linux web server. Running the following after a first-time upload is just part of the process. SSH into your server, then run:
find /home/public -type d -exec chmod 755 {} \;
find /home/public -type f -exec chmod 644 {} \;
The first command fixes all folders. The second fixes all files. This covers everything in one go, no matter how deep the folders go. Once you have done it once for a set of files, you do not need to repeat it unless you re-upload them.
What the Numbers Mean
Permissions are written as three digits, each between 0 and 7. The three digits represent: owner, group, everyone else.
- 755
- Owner can read/write/execute; everyone else can read and execute. Correct for folders.
- 644
- Owner can read/write; everyone else can only read. Correct for regular files.
- 777
- Everyone can do everything. This is far too permissive and you'll want to avoid this.
- 600
- Only the owner can read/write; nobody else can access at all. This is too restrictive for web services and you'll also want to avoid this.
If you only need to fix one specific folder:
chmod 755 /home/public/CSS
chmod 644 /home/public/CSS/*
Note that if a folder contains subfolders, you need to fix those too. The find commands above handle this automatically, which is why they are recommended.
Part 4: Maintaining Your Site
Once your site is up and running, here is what ongoing maintenance looks like.
Making Changes
- Edit your files in your preferred editor.
- Save your changes.
- Open PowerShell.
cdto your site folder.- Run
dir, always check! scpthe changed files to the server.- Hard refresh your browser (
Ctrl+Shift+R) to see changes.
Keeping Your Balance Topped Up
Log into NFSN occasionally and check your account balance. A small static site costs almost nothing, but if it hits zero your site goes offline. NFSN will email you a warning before this happens, and there is a short grace period before anything is deleted, so a low-balance email is not a crisis, but do top up promptly. Adding a small amount at a time is plenty.
Checking for Errors
If something on your site stops working:
- Check the event log on your site's information page.
- Open browser developer tools (F12) and look at the Console and Network tabs for error messages.
- Try visiting the broken resource directly in your browser (e.g.
https://yoursitename.nfshost.com/CSS/style.css) to see if it is a permissions or missing file issue.
Backing Up Your Site
Your files are on your PC already, which is your primary backup. But it is worth also keeping a copy somewhere else, such as an external drive, a USB stick, GitHub, or a cloud service. The NFSN "Last Backup" field will say "Never" unless you set up backups there specifically, so do not rely on NFSN for backups.
Updating a Single Page vs the Whole Site
For small edits (fixing a typo, adding a post), just upload the one changed file. For big changes (new images, CSS overhaul, restructuring), upload everything.
Things to Do Eventually
- favicon.ico
- The tiny icon that shows in browser tabs. You can make one at
https://favicon.io, then upload it to/home/public/favicon.ico. - robots.txt
- Tells search engine crawlers what they can and cannot index. A basic one that allows everything needs two lines:
User-agent: *on the first line, andDisallow:(with nothing after it) on the second. The emptyDisallow:is the standard way to signal "crawl everything", and some crawlers do not recogniseAllow: /. - Backup routine
- Consider backing up your site files to a second location. GitHub is free and good for this.
Quick Command Reference
On Your PC (PowerShell)
- Navigate to your site folder (do this first, every time):
cd C:\Users\yourname\Documents\yoursite- Confirm you're in the right place:
dir- Upload entire site:
scp -r * yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/- Upload one specific file:
scp home.html yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/home.html- Upload a file in a subfolder:
scp CSS/style.css yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/CSS/style.css- Upload an entire subfolder:
scp -r CSS yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/CSS- Upload a hidden file (e.g. .htaccess):
scp .htaccess yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net:/home/public/.htaccess- Connect to server via SSH:
ssh yoursitename_yourmembername@ssh.nyc1.nearlyfreespeech.net- View your SSH public key:
type C:\Users\yourname\.ssh\id_ed25519.pub- Generate a new SSH key:
ssh-keygen -t ed25519 -f C:\Users\yourname\.ssh\id_ed25519 -C "yoursitename"
On the Server (After SSH)
- List public folder:
ls /home/public- List a subfolder:
ls /home/public/CSS- List including hidden files:
ls -a /home/public- Fix all folder permissions:
find /home/public -type d -exec chmod 755 {} \;- Fix all file permissions:
find /home/public -type f -exec chmod 644 {} \;- Fix permissions on one folder:
chmod 755 /home/public/foldername- Fix permissions on one file:
chmod 644 /home/public/filename.html- Fix permissions on all files in one folder:
chmod 644 /home/public/CSS/*- Delete a file:
rm /home/public/filename.txt- Delete all files of a type:
rm /home/public/*.dll- Delete a folder and its contents:
rm -rf /home/public/foldername- Delete a folder/file with spaces in the name:
rm -rf "/home/public/folder name"- Check disk usage:
du -sh /home/public- Disconnect from server:
exit
Congratulations! You've established a website on NearlyFreeSpeech! Enjoy your new home online, and don't forget, never rm -rf / and never rm -rf ~!