[BUG] Cannot Register or Log In on a Fresh Docker Installation
Hello,
6
7 I performed a fresh installation of SurfSense using the official Docker Compose method on Arch Linux.
8
9 I am unable to create a user or log in.
10
11 What we tried:
12 1. The web UI at http://localhost:3000 does not show a "Register" or "Sign Up" option, only "Sign In".
13 2. We manually configured the backend to enable registration by setting REGISTRATION_ENABLED=TRUE and AUTH_TYPE=LOCAL. This did not make the registration option
appear in the UI.
14 3. We then manually created an admin user directly in the database by executing a script inside the backend container. The script confirmed the user was created
successfully.
15 4. However, trying to log in with the credentials of the manually created user still fails without any specific error.
16
17 It seems the authentication flow is broken in the current version.
" or "Sign Up" option, only "Sign In". 13 2. We manually configured the backend to enable registration by setting
REGISTRATION_ENABLED=TRUEandAUTH_TYPE=LOCAL. This did not make the registration option appear in the UI. 14 3. We then manually created an admin user directly in the database by executing a script inside the backend container. The script confirmed the user was created successfully. 15 4. However, trying to log in with the credentials of the manually created user still fails without any specif
You should be able to register using http://localhost:3000/register
Moving to register just pushes the content back to Login Screen.
I cannot believe I just spent two hours getting this to run only to not be able to log in.
@Leehughes21 @nomonkeynodeal It is mostly env config issue.
For Docker:
Make sure you set this https://github.com/MODSetter/SurfSense/blob/2b82f32b8c337d646916f41fc4729322afbbbf1a/.env.example#L10
as LOCAL
For Manual:
Make sure you set this https://github.com/MODSetter/SurfSense/blob/2b82f32b8c337d646916f41fc4729322afbbbf1a/surfsense_web/.env.example#L2
as LOCAL
Yes it was set to local but I couldnt get to registration, not sure whats happened but I downloaded again and docker built it again and now I can get to register and all is good. thanks
@Leehughes21 @nomonkeynodeal It is mostly env config issue.
For Docker:
Make sure you set this
Line 10 in 2b82f32 NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL or GOOGLE (Default: LOCAL)
as LOCAL
For Manual:
Make sure you set this
SurfSense/surfsense_web/.env.example
Line 2 in 2b82f32 NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL or GOOGLE
as LOCAL
I tried all of it, but for me sadly the issue/bug persists: still /register just pushes the content back to Login Screen.
I spotted the problem. Login looks like it's working fine. But the register functionality is not.
return baseApiService.post(`/auth/register`, registerResponse, {
body: parsedRequest.data,
});
that in auth-api.service.ts is sending an Object instead of a JSON object. The backend endpoint is returning 422, thus not allowing registration. I will see if I can open a PR tomorrow to fix that.
@sebampuero I tried changing the line you refreenced/submitted a pull request for but no dice for me. Attempting to create an account continues simply return the nonspecific "An unexpected error occurred. Please try again"
edit: I cloned the repo again, rebuilt everything from scratched (change env variables to local, put the container IP in the correct places, added the jsonify line to the register functionality per the unmerged pull request) and the error has changed to "Connection failed
Please check your internet connection and try again"
@sebampuero I tried changing the line you refreenced/submitted a pull request for but no dice for me. Attempting to create an account continues simply return the nonspecific "An unexpected error occurred. Please try again"
edit: I cloned the repo again, rebuilt everything from scratched (change env variables to local, put the container IP in the correct places, added the jsonify line to the register functionality per the unmerged pull request) and the error has changed to "Connection failed
Please check your internet connection and try again"
seems like you didn't configure the addresses correctly. I don't think that has anything to do with this issue. I haven't played much with this project, but it seems to have many other problems
Hi , the root cause was sending plain JS object instead of JSON!
And it should affect (now) only register in auth flow because login use formdata!
I fixed it in the PR I recently opened : https://github.com/MODSetter/SurfSense/pull/493
as a newbie i came across the same problem, can anyone help me?
i cannot register and not even login (i have created account with chatgpt) when i type ip of this machine followed by the port (http://192.168.1.143:3001/) i get (the same error is for register)
Login failed
An unexpected error occurred. Please try again
and when i go with ssh -L 3001:localhost:3001 [email protected] and type http://localhost:3001/login it is just logging in forever, the same act is with register
https:// followed by ip gives ERR_SSL_PROTOCOL_ERROR
sudo docker exec -it surfsense psql -U postgres -d surfsense -c "SELECT id, email, issudo docker exec -it surfsense psql -U postgres -d surfsense -c "SELECT id, email, is_active, is_verified FROM \"user\";"
id | email | is_active | is_verified
--------------------------------------+-----------------+-----------+-------------
2e1ae323-155d-43e7-8a91-48d2ac143126 | [email protected] | t | t
(1 row)
even if i put
- AUTH_TYPE=${AUTH_TYPE:-GOOGLE}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID:-GOOGLE}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET:-GOOGLE}
it doesnt set google button login for some reason and i type sudo docker compose up -d --force-recreate
services:
# All-in-one SurfSense container
surfsense:
image: ghcr.io/modsetter/surfsense:latest
container_name: surfsense
ports:
- "${FRONTEND_PORT:-3001}:3000"
- "${BACKEND_PORT:-8001}:8000"
volumes:
- surfsense-data:/data
environment:
# Authentication (auto-generated if not set)
- SECRET_KEY=${SECRET_KEY:-}
# Auth Configuration
- AUTH_TYPE=${AUTH_TYPE:-LOCAL}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID:-LOCAL}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET:-LOCAL}
# AI/ML Configuration
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-sentence-transformers/all-MiniLM-L6-v2}
- RERANKERS_ENABLED=${RERANKERS_ENABLED:-FALSE}
- RERANKERS_MODEL_NAME=${RERANKERS_MODEL_NAME:-}
- RERANKERS_MODEL_TYPE=${RERANKERS_MODEL_TYPE:-}
# Document Processing
- ETL_SERVICE=${ETL_SERVICE:-DOCLING}
- UNSTRUCTURED_API_KEY=${UNSTRUCTURED_API_KEY:-}
- LLAMA_CLOUD_API_KEY=${LLAMA_CLOUD_API_KEY:-}
# Audio Services
- TTS_SERVICE=${TTS_SERVICE:-local/kokoro}
- TTS_SERVICE_API_KEY=${TTS_SERVICE_API_KEY:-}
- STT_SERVICE=${STT_SERVICE:-local/base}
- STT_SERVICE_API_KEY=${STT_SERVICE_API_KEY:-}
# Web Crawling
- FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY:-}
# Optional Features
- REGISTRATION_ENABLED=${REGISTRATION_ENABLED:-TRUE}
- SCHEDULE_CHECKER_INTERVAL=${SCHEDULE_CHECKER_INTERVAL:-1m}
# LangSmith Observability (optional)
- LANGSMITH_TRACING=${LANGSMITH_TRACING:-false}
- LANGSMITH_ENDPOINT=${LANGSMITH_ENDPOINT:-}
- LANGSMITH_API_KEY=${LANGSMITH_API_KEY:-}
- LANGSMITH_PROJECT=${LANGSMITH_PROJECT:-}
- OLLAMA_BASE_URL=http://ollama:11434 # Connect to Ollama
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000", "&&", "curl", "-f", "http://localhost:8000/docs"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
networks:
- ai-network
networks:
ai-network:
external: true
volumes:
surfsense-data:
name: surfsense-data
LOGS
surfsense | ===========================================
surfsense | 🏄 SurfSense All-in-One Container
surfsense | ===========================================
surfsense | ✅ PostgreSQL data directory already exists
surfsense | ✅ Redis data directory ready
surfsense |
surfsense | ===========================================
surfsense | 📋 Configuration
surfsense | ===========================================
surfsense | Frontend URL: http://localhost:3000
surfsense | Backend API: http://localhost:8000
surfsense | API Docs: http://localhost:8000/docs
surfsense | Auth Type: GOOGLE
surfsense | ETL Service: DOCLING
surfsense | TTS Service: local/kokoro
surfsense | STT Service: local/base
surfsense | ===========================================
surfsense |
surfsense | 🚀 Starting all services...
surfsense | 2025-12-13 16:42:33,986 INFO Set uid to user 0 succeeded
surfsense | 2025-12-13 16:42:33,986 INFO Set uid to user 0 succeeded
surfsense | 2025-12-13 16:42:33,994 INFO RPC interface 'supervisor' initialized
surfsense | 2025-12-13 16:42:33,994 INFO RPC interface 'supervisor' initialized
surfsense | 2025-12-13 16:42:33,994 CRIT Server 'unix_http_server' running without any HTTP authentication checking
surfsense | 2025-12-13 16:42:33,994 CRIT Server 'unix_http_server' running without any HTTP authentication checking
surfsense | 2025-12-13 16:42:33,994 INFO supervisord started with pid 1
surfsense | 2025-12-13 16:42:33,994 INFO supervisord started with pid 1
surfsense | 2025-12-13 16:42:34,997 INFO spawned: 'postgresql' with pid 11
surfsense | 2025-12-13 16:42:34,997 INFO spawned: 'postgresql' with pid 11
surfsense | 2025-12-13 16:42:34,998 INFO spawned: 'redis' with pid 12
surfsense | 2025-12-13 16:42:34,998 INFO spawned: 'redis' with pid 12
surfsense | 2025-12-13 16:42:34,999 INFO spawned: 'backend' with pid 13
surfsense | 2025-12-13 16:42:34,999 INFO spawned: 'backend' with pid 13
surfsense | 2025-12-13 16:42:35,000 INFO spawned: 'celery-worker' with pid 14
surfsense | 2025-12-13 16:42:35,000 INFO spawned: 'celery-worker' with pid 14
surfsense | 2025-12-13 16:42:35,004 INFO spawned: 'celery-beat' with pid 15
surfsense | 2025-12-13 16:42:35,004 INFO spawned: 'celery-beat' with pid 15
surfsense | 2025-12-13 16:42:35,005 INFO spawned: 'frontend' with pid 20
surfsense | 2025-12-13 16:42:35,005 INFO spawned: 'frontend' with pid 20
surfsense | 12:C 13 Dec 2025 16:42:35.004 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
surfsense | 12:C 13 Dec 2025 16:42:35.004 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=12, just started
surfsense | 12:C 13 Dec 2025 16:42:35.004 # Configuration loaded
surfsense | 12:M 13 Dec 2025 16:42:35.004 * Increased maximum number of open files to 10032 (it was originally set to 1024).
surfsense | 12:M 13 Dec 2025 16:42:35.004 * Running mode=standalone, port=6379.
surfsense | 12:M 13 Dec 2025 16:42:35.004 # Server initialized
surfsense | 12:M 13 Dec 2025 16:42:35.004 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
surfsense | 12:M 13 Dec 2025 16:42:35.005 * DB loaded from append only file: 0.000 seconds
surfsense | 12:M 13 Dec 2025 16:42:35.005 * Ready to accept connections
surfsense | 2025-12-13 16:42:35.048 UTC [11] LOG: starting PostgreSQL 14.20 (Ubuntu 14.20-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit
surfsense | 2025-12-13 16:42:35.048 UTC [11] LOG: listening on IPv4 address "0.0.0.0", port 5432
surfsense | 2025-12-13 16:42:35.048 UTC [11] LOG: listening on IPv6 address "::", port 5432
surfsense | 2025-12-13 16:42:35.063 UTC [11] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
surfsense | 2025-12-13 16:42:35.072 UTC [27] LOG: database system was shut down at 2025-12-13 16:42:30 UTC
surfsense | 2025-12-13 16:42:35.081 UTC [11] LOG: database system is ready to accept connections
surfsense | ▲ Next.js 15.5.9
surfsense | - Local: http://localhost:3000
surfsense | - Network: http://0.0.0.0:3000
surfsense |
surfsense | ✓ Starting...
surfsense | ✓ Ready in 127ms
surfsense | 2025-12-13 16:42:36,362 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
surfsense | 2025-12-13 16:42:36,362 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
surfsense | 2025-12-13 16:42:36,362 INFO success: redis entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
surfsense | 2025-12-13 16:42:36,362 INFO success: redis entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
surfsense | 2025-12-13 16:42:40,366 INFO success: frontend entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
surfsense | 2025-12-13 16:42:40,366 INFO success: frontend entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
surfsense | 2025-12-13 16:42:45,371 INFO success: backend entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
surfsense | 2025-12-13 16:42:45,371 INFO success: backend entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
surfsense | 2025-12-13 16:42:50,377 INFO success: celery-worker entered RUNNING state, process has stayed up for > than 15 seconds (startsecs)
surfsense | 2025-12-13 16:42:50,377 INFO success: celery-worker entered RUNNING state, process has stayed up for > than 15 seconds (startsecs)
surfsense | /usr/local/lib/python3.12/dist-packages/chonkie/chunker/code.py:82: UserWarning: The language is set to `auto`. This would adversely affect the performance of the chunker. Consider setting the `language` parameter to a specific language to improve performance.
surfsense | warnings.warn("The language is set to `auto`. This would adversely affect the performance of the chunker. " +
surfsense | /usr/local/lib/python3.12/dist-packages/chonkie/chunker/code.py:82: UserWarning: The language is set to `auto`. This would adversely affect the performance of the chunker. Consider setting the `language` parameter to a specific language to improve performance.
surfsense | warnings.warn("The language is set to `auto`. This would adversely affect the performance of the chunker. " +
surfsense | /usr/local/lib/python3.12/dist-packages/chonkie/chunker/code.py:82: UserWarning: The language is set to `auto`. This would adversely affect the performance of the chunker. Consider setting the `language` parameter to a specific language to improve performance.
surfsense | warnings.warn("The language is set to `auto`. This would adversely affect the performance of the chunker. " +
surfsense | /usr/lib/python3/dist-packages/blinker/base.py:96: SyntaxWarning: invalid escape sequence '\*'
surfsense | `sender=` as a single positional argument and any \*\*kwargs that
surfsense | /usr/lib/python3/dist-packages/blinker/base.py:174: SyntaxWarning: invalid escape sequence '\*'
surfsense | `sender=` as a single positional argument and any \*\*kwargs that
surfsense | /usr/lib/python3/dist-packages/blinker/base.py:242: SyntaxWarning: invalid escape sequence '\*'
surfsense | """Emit this signal on behalf of *sender*, passing on \*\*kwargs.
surfsense | /usr/local/lib/python3.12/dist-packages/celery/platforms.py:841: SecurityWarning: You're running the worker with superuser privileges: this is
surfsense | absolutely not recommended!
surfsense |
surfsense | Please specify a different user using the --uid option.
surfsense |
surfsense | User information: uid=0 euid=0 gid=0 egid=0
surfsense |
surfsense | warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
surfsense |
surfsense | -------------- celery@a45a0f5fd1c9 v5.6.0 (recovery)
surfsense | --- ***** -----
surfsense | -- ******* ---- Linux-6.8.0-90-generic-x86_64-with-glibc2.35 2025-12-13 16:42:54
surfsense | - *** --- * ---
surfsense | - ** ---------- [config]
surfsense | - ** ---------- .> app: surfsense:0x72096d20a3c0
surfsense | - ** ---------- .> transport: redis://localhost:6379/0
surfsense | - ** ---------- .> results: redis://localhost:6379/0
surfsense | - *** --- * --- .> concurrency: 2 (solo)
surfsense | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
surfsense | --- ***** -----
surfsense | -------------- [queues]
surfsense | .> celery exchange=celery(direct) key=celery
surfsense |
surfsense |
surfsense | [tasks]
surfsense | . check_periodic_schedules
surfsense | . generate_chat_podcast
surfsense | . index_airtable_records
surfsense | . index_bookstack_pages
surfsense | . index_clickup_tasks
surfsense | . index_confluence_pages
surfsense | . index_crawled_urls
surfsense | . index_discord_messages
surfsense | . index_elasticsearch_documents
surfsense | . index_github_repos
surfsense | . index_google_calendar_events
surfsense | . index_google_gmail_messages
surfsense | . index_jira_issues
surfsense | . index_linear_issues
surfsense | . index_luma_events
surfsense | . index_notion_pages
surfsense | . index_slack_messages
surfsense | . populate_blocknote_for_documents
surfsense | . process_extension_document
surfsense | . process_file_upload
surfsense | . process_youtube_video
surfsense | . reindex_document
surfsense |
surfsense | [2025-12-13 16:42:54,246: INFO/MainProcess] Connected to redis://localhost:6379/0
surfsense | [2025-12-13 16:42:54,248: INFO/MainProcess] mingle: searching for neighbors
surfsense | [2025-12-13 16:42:54,277: INFO/MainProcess] beat: Starting...
surfsense | 2025-12-13 16:42:55,252 INFO success: celery-beat entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
surfsense | 2025-12-13 16:42:55,252 INFO success: celery-beat entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
surfsense | [2025-12-13 16:42:55,252: INFO/MainProcess] mingle: all alone
surfsense | [2025-12-13 16:42:55,258: INFO/MainProcess] celery@a45a0f5fd1c9 ready.
surfsense | INFO: Started server process [13]
surfsense | INFO: Waiting for application startup.
surfsense | INFO: Application startup complete.
surfsense | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
surfsense | INFO: 127.0.0.1:39916 - "GET /docs HTTP/1.1" 200 OK
surfsense | [2025-12-13 16:43:00,001: INFO/MainProcess] Scheduler: Sending due task check-periodic-connector-schedules (check_periodic_schedules)
surfsense | [2025-12-13 16:43:00,004: INFO/MainProcess] Task check_periodic_schedules[f5ae1bbf-f147-47ca-a997-a53057673c0d] received
surfsense | [2025-12-13 16:43:00,044: INFO/MainProcess] Task check_periodic_schedules[f5ae1bbf-f147-47ca-a997-a53057673c0d] succeeded in 0.0392983310011914s: None
There is an issue with migrations files, I will fix this in few hours !
@kabbalah10 Can you please try again and LMK if the problem is fixed or not. Use the latest docker image.