Skip to content

Instantly share code, notes, and snippets.

@tanyuan
Created July 15, 2025 17:52
Show Gist options
  • Save tanyuan/ef622d23cef373710a41838a7fbcf83e to your computer and use it in GitHub Desktop.
Save tanyuan/ef622d23cef373710a41838a7fbcf83e to your computer and use it in GitHub Desktop.
How to host Linkding on Python Anywhere

How to host Linkding on Python Anywhere

This is step-by-step to host Linkding on Python Anywhere without using docker. This way you have the flexibility to edit all the code as you like.

Replace all username with your own username.

1. Install node

Using NVM to get the most up-to-date version of node | PythonAnywhere Help

2. Install Linkding

git clone https://github.com/sissbruecker/linkding.git && cd linkding

And follow the Development setup at sissbruecker/linkding.

Create virtual environment:

python -m venv venv
source venv/bin/activate

Install Python packages:

pip install -r requirements.txt -r requirements.dev.txt

If you are using Python 3.13, greenlet won't compile, open and change requirement.dev.txt by removing the version numbers for greenlet and playwright(which depends on greenlet).

Install node packages:

npm install

Initialize data:

mkdir -p data
python manage.py migrate

Create an admin user:

python manage.py createsuperuser --username=joe [email protected]

Enter the password afterwords.

Run this one time and cancel it:

npm run dev

Collect static files to static directory:

python manage.py collectstatic

(How to setup static files in Django | PythonAnywhere Help)

3. Configure web app (manually)

Edit /var/www/links-tengshanyuan_pythonanywhere_com_wsgi.py:

# +++++++++++ DJANGO +++++++++++
import os
import sys

path = '/home/username/linkding'
if path not in sys.path:
    sys.path.insert(0, path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'bookmarks.settings'

## Uncomment the lines below depending on your Django version
###### then, for Django >=1.5:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
###### or, for older Django <=1.4
#import django.core.handlers.wsgi
#application = django.core.handlers.wsgi.WSGIHandler()

(Deploying an existing Django project on PythonAnywhere | PythonAnywhere Help)

Setup static files:

  • URL: /static/
  • Directory: /home/username/linkding/static

4. Reload the web app. Hooray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment